From 90a551a4c143b94d5c9736c5241b52eb0467fb94 Mon Sep 17 00:00:00 2001 From: Raniz Date: Thu, 17 Sep 2020 14:20:29 +0200 Subject: [PATCH] Consolidated types and OpenGL interop Added all types into a shared crate called cuda-types-sys. Both cuda-driver-sys and cuda-runtime-sys depends on this crate and blacklists all types themselves. Added cuda-gl-interop-sys that contains all GL functions from cuda_gl_interop.h. It depends on cuda-types-sys as well as the external gl crate for OpenGL types like GLuint. --- Cargo.toml | 2 + cuda-driver-sys/Cargo.toml | 8 +- cuda-driver-sys/bindgen.sh | 7 +- cuda-driver-sys/src/cuda.rs | 5529 +--------- cuda-driver-sys/src/lib.rs | 3 + cuda-gl-interop-sys/Cargo.toml | 25 + cuda-gl-interop-sys/bindgen.sh | 14 + cuda-gl-interop-sys/build.rs | 18 + cuda-gl-interop-sys/src/cuda_gl_interop.rs | 59 + cuda-gl-interop-sys/src/lib.rs | 6 + cuda-runtime-sys/Cargo.toml | 5 +- cuda-runtime-sys/bindgen.sh | 4 +- cuda-runtime-sys/src/cuda_runtime.rs | 4877 +-------- cuda-runtime-sys/src/lib.rs | 3 + cuda-types-sys/Cargo.toml | 19 + cuda-types-sys/bindgen.sh | 20 + cuda-types-sys/build.rs | 18 + cuda-types-sys/src/cuda_types.rs | 10353 +++++++++++++++++++ cuda-types-sys/src/lib.rs | 2 + cuda-types-sys/wrapper.h | 7 + 20 files changed, 10909 insertions(+), 10070 deletions(-) create mode 100644 cuda-gl-interop-sys/Cargo.toml create mode 100755 cuda-gl-interop-sys/bindgen.sh create mode 100644 cuda-gl-interop-sys/build.rs create mode 100644 cuda-gl-interop-sys/src/cuda_gl_interop.rs create mode 100644 cuda-gl-interop-sys/src/lib.rs create mode 100644 cuda-types-sys/Cargo.toml create mode 100755 cuda-types-sys/bindgen.sh create mode 100644 cuda-types-sys/build.rs create mode 100644 cuda-types-sys/src/cuda_types.rs create mode 100644 cuda-types-sys/src/lib.rs create mode 100644 cuda-types-sys/wrapper.h diff --git a/Cargo.toml b/Cargo.toml index 964716d..5c29b6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,5 +3,7 @@ members = [ "cublas-sys", "cuda-config", "cuda-driver-sys", + "cuda-gl-interop-sys", "cuda-runtime-sys", + "cuda-types-sys", ] diff --git a/cuda-driver-sys/Cargo.toml b/cuda-driver-sys/Cargo.toml index 50a3fa6..ba0b7ff 100644 --- a/cuda-driver-sys/Cargo.toml +++ b/cuda-driver-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cuda-driver-sys" -version = "0.3.0" +version = "0.4.0-alpha.1" authors = ["Toshiki Teramura "] edition = "2018" @@ -15,6 +15,12 @@ license = "MIT/Apache-2.0" readme = "../README.md" categories = [] +[build-dependencies.bindgen] +version = "~0.55" + [build-dependencies.cuda-config] path = "../cuda-config" version = "0.1.0" + +[dependencies.cuda-types-sys] +path = "../cuda-types-sys" \ No newline at end of file diff --git a/cuda-driver-sys/bindgen.sh b/cuda-driver-sys/bindgen.sh index 2b06303..9d79a7b 100755 --- a/cuda-driver-sys/bindgen.sh +++ b/cuda-driver-sys/bindgen.sh @@ -2,12 +2,7 @@ set -exu bindgen \ - --whitelist-type="^CU.*" \ - --whitelist-type="^cuuint(32|64)_t" \ - --whitelist-type="^cudaError_enum" \ - --whitelist-type="^cu.*Complex$" \ - --whitelist-type="^cuda.*" \ - --whitelist-type="^libraryPropertyType.*" \ + --blacklist-type="^.*" \ --whitelist-var="^CU.*" \ --whitelist-function="^cu.*" \ --default-enum-style=rust \ diff --git a/cuda-driver-sys/src/cuda.rs b/cuda-driver-sys/src/cuda.rs index ef61be0..6fd45d8 100644 --- a/cuda-driver-sys/src/cuda.rs +++ b/cuda-driver-sys/src/cuda.rs @@ -1,6 +1,6 @@ /* automatically generated by rust-bindgen */ -pub const CUDA_VERSION: u32 = 10020; +pub const CUDA_VERSION: u32 = 11000; pub const CU_IPC_HANDLE_SIZE: u32 = 64; pub const CU_MEMHOSTALLOC_PORTABLE: u32 = 1; pub const CU_MEMHOSTALLOC_DEVICEMAP: u32 = 2; @@ -26,5219 +26,8 @@ pub const CU_TRSA_OVERRIDE_FORMAT: u32 = 1; pub const CU_TRSF_READ_AS_INTEGER: u32 = 1; pub const CU_TRSF_NORMALIZED_COORDINATES: u32 = 2; pub const CU_TRSF_SRGB: u32 = 16; +pub const CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION: u32 = 32; pub const CU_PARAM_TR_DEFAULT: i32 = -1; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __uint64_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] -pub struct float2 { - pub x: f32, - pub y: f32, -} -#[test] -fn bindgen_test_layout_float2() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(float2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(float2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) - ); -} -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] -pub struct double2 { - pub x: f64, - pub y: f64, -} -#[test] -fn bindgen_test_layout_double2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(double2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(double2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(double2), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(double2), - "::", - stringify!(y) - ) - ); -} -pub type cuFloatComplex = float2; -pub type cuDoubleComplex = double2; -pub type cuComplex = cuFloatComplex; -pub type cuuint32_t = u32; -pub type cuuint64_t = u64; -pub type CUdeviceptr = ::std::os::raw::c_ulonglong; -pub type CUdevice = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUctx_st { - _unused: [u8; 0], -} -pub type CUcontext = *mut CUctx_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUmod_st { - _unused: [u8; 0], -} -pub type CUmodule = *mut CUmod_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUfunc_st { - _unused: [u8; 0], -} -pub type CUfunction = *mut CUfunc_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUarray_st { - _unused: [u8; 0], -} -pub type CUarray = *mut CUarray_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUmipmappedArray_st { - _unused: [u8; 0], -} -pub type CUmipmappedArray = *mut CUmipmappedArray_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUtexref_st { - _unused: [u8; 0], -} -pub type CUtexref = *mut CUtexref_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUsurfref_st { - _unused: [u8; 0], -} -pub type CUsurfref = *mut CUsurfref_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUevent_st { - _unused: [u8; 0], -} -pub type CUevent = *mut CUevent_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUstream_st { - _unused: [u8; 0], -} -pub type CUstream = *mut CUstream_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphicsResource_st { - _unused: [u8; 0], -} -pub type CUgraphicsResource = *mut CUgraphicsResource_st; -pub type CUtexObject = ::std::os::raw::c_ulonglong; -pub type CUsurfObject = ::std::os::raw::c_ulonglong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUextMemory_st { - _unused: [u8; 0], -} -pub type CUexternalMemory = *mut CUextMemory_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUextSemaphore_st { - _unused: [u8; 0], -} -pub type CUexternalSemaphore = *mut CUextSemaphore_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraph_st { - _unused: [u8; 0], -} -pub type CUgraph = *mut CUgraph_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphNode_st { - _unused: [u8; 0], -} -pub type CUgraphNode = *mut CUgraphNode_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphExec_st { - _unused: [u8; 0], -} -pub type CUgraphExec = *mut CUgraphExec_st; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUuuid_st { - pub bytes: [::std::os::raw::c_char; 16usize], -} -#[test] -fn bindgen_test_layout_CUuuid_st() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CUuuid_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CUuuid_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUuuid_st), - "::", - stringify!(bytes) - ) - ); -} -pub type CUuuid = CUuuid_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUipcEventHandle_st { - pub reserved: [::std::os::raw::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_CUipcEventHandle_st() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CUipcEventHandle_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CUipcEventHandle_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUipcEventHandle_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUipcEventHandle_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUipcEventHandle = CUipcEventHandle_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUipcMemHandle_st { - pub reserved: [::std::os::raw::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_CUipcMemHandle_st() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CUipcMemHandle_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CUipcMemHandle_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUipcMemHandle_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUipcMemHandle_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUipcMemHandle = CUipcMemHandle_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUipcMem_flags_enum { - CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1, -} -pub use self::CUipcMem_flags_enum as CUipcMem_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemAttach_flags_enum { - CU_MEM_ATTACH_GLOBAL = 1, - CU_MEM_ATTACH_HOST = 2, - CU_MEM_ATTACH_SINGLE = 4, -} -pub use self::CUmemAttach_flags_enum as CUmemAttach_flags; -impl CUctx_flags_enum { - pub const CU_CTX_BLOCKING_SYNC: CUctx_flags_enum = CUctx_flags_enum::CU_CTX_SCHED_BLOCKING_SYNC; -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUctx_flags_enum { - CU_CTX_SCHED_AUTO = 0, - CU_CTX_SCHED_SPIN = 1, - CU_CTX_SCHED_YIELD = 2, - CU_CTX_SCHED_BLOCKING_SYNC = 4, - CU_CTX_SCHED_MASK = 7, - CU_CTX_MAP_HOST = 8, - CU_CTX_LMEM_RESIZE_TO_MAX = 16, - CU_CTX_FLAGS_MASK = 31, -} -pub use self::CUctx_flags_enum as CUctx_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUstream_flags_enum { - CU_STREAM_DEFAULT = 0, - CU_STREAM_NON_BLOCKING = 1, -} -pub use self::CUstream_flags_enum as CUstream_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUevent_flags_enum { - CU_EVENT_DEFAULT = 0, - CU_EVENT_BLOCKING_SYNC = 1, - CU_EVENT_DISABLE_TIMING = 2, - CU_EVENT_INTERPROCESS = 4, -} -pub use self::CUevent_flags_enum as CUevent_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUstreamWaitValue_flags_enum { - CU_STREAM_WAIT_VALUE_GEQ = 0, - CU_STREAM_WAIT_VALUE_EQ = 1, - CU_STREAM_WAIT_VALUE_AND = 2, - CU_STREAM_WAIT_VALUE_NOR = 3, - CU_STREAM_WAIT_VALUE_FLUSH = 1073741824, -} -pub use self::CUstreamWaitValue_flags_enum as CUstreamWaitValue_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUstreamWriteValue_flags_enum { - CU_STREAM_WRITE_VALUE_DEFAULT = 0, - CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1, -} -pub use self::CUstreamWriteValue_flags_enum as CUstreamWriteValue_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUstreamBatchMemOpType_enum { - CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1, - CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2, - CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4, - CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5, - CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3, -} -pub use self::CUstreamBatchMemOpType_enum as CUstreamBatchMemOpType; -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUstreamBatchMemOpParams_union { - pub operation: CUstreamBatchMemOpType, - pub waitValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st, - pub writeValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st, - pub flushRemoteWrites: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, - pub pad: [cuuint64_t; 6usize], - _bindgen_union_align: [u64; 6usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st { - pub operation: CUstreamBatchMemOpType, - pub address: CUdeviceptr, - pub __bindgen_anon_1: - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, - pub alias: CUdeviceptr, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 { - pub value: cuuint32_t, - pub value64: cuuint64_t, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1( -) { - assert_eq!( - ::std::mem::size_of::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 - ) - ) - ); - assert_eq!( - ::std::mem::align_of::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 - ) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, - >())) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 - ), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, - >())) - .value64 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 - ), - "::", - stringify!(value64) - ) - ); -} -impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!( - "Size of: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .operation as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), - "::", - stringify!(operation) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .address as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), - "::", - stringify!(address) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .flags as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .alias as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), - "::", - stringify!(alias) - ) - ); -} -impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st { - pub operation: CUstreamBatchMemOpType, - pub address: CUdeviceptr, - pub __bindgen_anon_1: - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, - pub alias: CUdeviceptr, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 { - pub value: cuuint32_t, - pub value64: cuuint64_t, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1( -) { - assert_eq!( - ::std::mem::size_of::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 - ) - ) - ); - assert_eq!( - ::std::mem::align_of::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 - ) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, - >())) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 - ), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, - >())) - .value64 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 - ), - "::", - stringify!(value64) - ) - ); -} -impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!( - "Size of: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .operation as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), - "::", - stringify!(operation) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .address as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), - "::", - stringify!(address) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .flags as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .alias as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), - "::", - stringify!(alias) - ) - ); -} -impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st { - pub operation: CUstreamBatchMemOpType, - pub flags: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st() { - assert_eq!( - ::std::mem::size_of::( - ), - 8usize, - concat!( - "Size of: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st) - ) - ); - assert_eq!( - ::std::mem::align_of::< - CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, - >())) - .operation as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st), - "::", - stringify!(operation) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, - >())) - .flags as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st), - "::", - stringify!(flags) - ) - ); -} -impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUstreamBatchMemOpParams_union() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CUstreamBatchMemOpParams_union)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUstreamBatchMemOpParams_union)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).operation as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union), - "::", - stringify!(operation) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).waitValue as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union), - "::", - stringify!(waitValue) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).writeValue as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union), - "::", - stringify!(writeValue) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flushRemoteWrites as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union), - "::", - stringify!(flushRemoteWrites) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pad as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUstreamBatchMemOpParams_union), - "::", - stringify!(pad) - ) - ); -} -impl Default for CUstreamBatchMemOpParams_union { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUstreamBatchMemOpParams = CUstreamBatchMemOpParams_union; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUoccupancy_flags_enum { - CU_OCCUPANCY_DEFAULT = 0, - CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1, -} -pub use self::CUoccupancy_flags_enum as CUoccupancy_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUarray_format_enum { - CU_AD_FORMAT_UNSIGNED_INT8 = 1, - CU_AD_FORMAT_UNSIGNED_INT16 = 2, - CU_AD_FORMAT_UNSIGNED_INT32 = 3, - CU_AD_FORMAT_SIGNED_INT8 = 8, - CU_AD_FORMAT_SIGNED_INT16 = 9, - CU_AD_FORMAT_SIGNED_INT32 = 10, - CU_AD_FORMAT_HALF = 16, - CU_AD_FORMAT_FLOAT = 32, -} -pub use self::CUarray_format_enum as CUarray_format; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUaddress_mode_enum { - CU_TR_ADDRESS_MODE_WRAP = 0, - CU_TR_ADDRESS_MODE_CLAMP = 1, - CU_TR_ADDRESS_MODE_MIRROR = 2, - CU_TR_ADDRESS_MODE_BORDER = 3, -} -pub use self::CUaddress_mode_enum as CUaddress_mode; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUfilter_mode_enum { - CU_TR_FILTER_MODE_POINT = 0, - CU_TR_FILTER_MODE_LINEAR = 1, -} -pub use self::CUfilter_mode_enum as CUfilter_mode; -impl CUdevice_attribute_enum { - pub const CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum = - CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK; -} -impl CUdevice_attribute_enum { - pub const CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK: CUdevice_attribute_enum = - CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK; -} -impl CUdevice_attribute_enum { - pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH: CUdevice_attribute_enum = - CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH; -} -impl CUdevice_attribute_enum { - pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT: CUdevice_attribute_enum = - CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT; -} -impl CUdevice_attribute_enum { - pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES: CUdevice_attribute_enum = - CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS; -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUdevice_attribute_enum { - CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1, - CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2, - CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3, - CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4, - CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5, - CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6, - CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7, - CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8, - CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9, - CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10, - CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11, - CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12, - CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13, - CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14, - CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15, - CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16, - CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17, - CU_DEVICE_ATTRIBUTE_INTEGRATED = 18, - CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19, - CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29, - CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30, - CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31, - CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32, - CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33, - CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34, - CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35, - CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36, - CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37, - CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38, - CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39, - CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40, - CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43, - CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49, - CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50, - CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67, - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74, - CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75, - CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76, - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77, - CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78, - CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79, - CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80, - CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81, - CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82, - CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83, - CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84, - CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85, - CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86, - CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87, - CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88, - CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89, - CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90, - CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91, - CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS = 92, - CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 93, - CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 94, - CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95, - CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96, - CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97, - CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98, - CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99, - CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 100, - CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 101, - CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 102, - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 103, - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 104, - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 105, - CU_DEVICE_ATTRIBUTE_MAX = 106, -} -pub use self::CUdevice_attribute_enum as CUdevice_attribute; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUdevprop_st { - pub maxThreadsPerBlock: ::std::os::raw::c_int, - pub maxThreadsDim: [::std::os::raw::c_int; 3usize], - pub maxGridSize: [::std::os::raw::c_int; 3usize], - pub sharedMemPerBlock: ::std::os::raw::c_int, - pub totalConstantMemory: ::std::os::raw::c_int, - pub SIMDWidth: ::std::os::raw::c_int, - pub memPitch: ::std::os::raw::c_int, - pub regsPerBlock: ::std::os::raw::c_int, - pub clockRate: ::std::os::raw::c_int, - pub textureAlign: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_CUdevprop_st() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CUdevprop_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CUdevprop_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxThreadsDim as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(maxThreadsDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxGridSize as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(maxGridSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sharedMemPerBlock as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(sharedMemPerBlock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).totalConstantMemory as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(totalConstantMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).SIMDWidth as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(SIMDWidth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memPitch as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(memPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regsPerBlock as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(regsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clockRate as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(clockRate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).textureAlign as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CUdevprop_st), - "::", - stringify!(textureAlign) - ) - ); -} -pub type CUdevprop = CUdevprop_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUpointer_attribute_enum { - CU_POINTER_ATTRIBUTE_CONTEXT = 1, - CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2, - CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3, - CU_POINTER_ATTRIBUTE_HOST_POINTER = 4, - CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5, - CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6, - CU_POINTER_ATTRIBUTE_BUFFER_ID = 7, - CU_POINTER_ATTRIBUTE_IS_MANAGED = 8, - CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9, - CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10, - CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11, - CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12, - CU_POINTER_ATTRIBUTE_MAPPED = 13, - CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14, -} -pub use self::CUpointer_attribute_enum as CUpointer_attribute; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUfunction_attribute_enum { - CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0, - CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1, - CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2, - CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3, - CU_FUNC_ATTRIBUTE_NUM_REGS = 4, - CU_FUNC_ATTRIBUTE_PTX_VERSION = 5, - CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6, - CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7, - CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8, - CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9, - CU_FUNC_ATTRIBUTE_MAX = 10, -} -pub use self::CUfunction_attribute_enum as CUfunction_attribute; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUfunc_cache_enum { - CU_FUNC_CACHE_PREFER_NONE = 0, - CU_FUNC_CACHE_PREFER_SHARED = 1, - CU_FUNC_CACHE_PREFER_L1 = 2, - CU_FUNC_CACHE_PREFER_EQUAL = 3, -} -pub use self::CUfunc_cache_enum as CUfunc_cache; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUsharedconfig_enum { - CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0, - CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1, - CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2, -} -pub use self::CUsharedconfig_enum as CUsharedconfig; -#[repr(i32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUshared_carveout_enum { - CU_SHAREDMEM_CARVEOUT_DEFAULT = -1, - CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 100, - CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0, -} -pub use self::CUshared_carveout_enum as CUshared_carveout; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemorytype_enum { - CU_MEMORYTYPE_HOST = 1, - CU_MEMORYTYPE_DEVICE = 2, - CU_MEMORYTYPE_ARRAY = 3, - CU_MEMORYTYPE_UNIFIED = 4, -} -pub use self::CUmemorytype_enum as CUmemorytype; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUcomputemode_enum { - CU_COMPUTEMODE_DEFAULT = 0, - CU_COMPUTEMODE_PROHIBITED = 2, - CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3, -} -pub use self::CUcomputemode_enum as CUcomputemode; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmem_advise_enum { - CU_MEM_ADVISE_SET_READ_MOSTLY = 1, - CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2, - CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3, - CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4, - CU_MEM_ADVISE_SET_ACCESSED_BY = 5, - CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6, -} -pub use self::CUmem_advise_enum as CUmem_advise; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmem_range_attribute_enum { - CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1, - CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2, - CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3, - CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4, -} -pub use self::CUmem_range_attribute_enum as CUmem_range_attribute; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUjit_option_enum { - CU_JIT_MAX_REGISTERS = 0, - CU_JIT_THREADS_PER_BLOCK = 1, - CU_JIT_WALL_TIME = 2, - CU_JIT_INFO_LOG_BUFFER = 3, - CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4, - CU_JIT_ERROR_LOG_BUFFER = 5, - CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6, - CU_JIT_OPTIMIZATION_LEVEL = 7, - CU_JIT_TARGET_FROM_CUCONTEXT = 8, - CU_JIT_TARGET = 9, - CU_JIT_FALLBACK_STRATEGY = 10, - CU_JIT_GENERATE_DEBUG_INFO = 11, - CU_JIT_LOG_VERBOSE = 12, - CU_JIT_GENERATE_LINE_INFO = 13, - CU_JIT_CACHE_MODE = 14, - CU_JIT_NEW_SM3X_OPT = 15, - CU_JIT_FAST_COMPILE = 16, - CU_JIT_GLOBAL_SYMBOL_NAMES = 17, - CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18, - CU_JIT_GLOBAL_SYMBOL_COUNT = 19, - CU_JIT_NUM_OPTIONS = 20, -} -pub use self::CUjit_option_enum as CUjit_option; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUjit_target_enum { - CU_TARGET_COMPUTE_20 = 20, - CU_TARGET_COMPUTE_21 = 21, - CU_TARGET_COMPUTE_30 = 30, - CU_TARGET_COMPUTE_32 = 32, - CU_TARGET_COMPUTE_35 = 35, - CU_TARGET_COMPUTE_37 = 37, - CU_TARGET_COMPUTE_50 = 50, - CU_TARGET_COMPUTE_52 = 52, - CU_TARGET_COMPUTE_53 = 53, - CU_TARGET_COMPUTE_60 = 60, - CU_TARGET_COMPUTE_61 = 61, - CU_TARGET_COMPUTE_62 = 62, - CU_TARGET_COMPUTE_70 = 70, - CU_TARGET_COMPUTE_72 = 72, - CU_TARGET_COMPUTE_75 = 75, -} -pub use self::CUjit_target_enum as CUjit_target; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUjit_fallback_enum { - CU_PREFER_PTX = 0, - CU_PREFER_BINARY = 1, -} -pub use self::CUjit_fallback_enum as CUjit_fallback; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUjit_cacheMode_enum { - CU_JIT_CACHE_OPTION_NONE = 0, - CU_JIT_CACHE_OPTION_CG = 1, - CU_JIT_CACHE_OPTION_CA = 2, -} -pub use self::CUjit_cacheMode_enum as CUjit_cacheMode; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUjitInputType_enum { - CU_JIT_INPUT_CUBIN = 0, - CU_JIT_INPUT_PTX = 1, - CU_JIT_INPUT_FATBINARY = 2, - CU_JIT_INPUT_OBJECT = 3, - CU_JIT_INPUT_LIBRARY = 4, - CU_JIT_NUM_INPUT_TYPES = 5, -} -pub use self::CUjitInputType_enum as CUjitInputType; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUlinkState_st { - _unused: [u8; 0], -} -pub type CUlinkState = *mut CUlinkState_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUgraphicsRegisterFlags_enum { - CU_GRAPHICS_REGISTER_FLAGS_NONE = 0, - CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1, - CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 2, - CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4, - CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8, -} -pub use self::CUgraphicsRegisterFlags_enum as CUgraphicsRegisterFlags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUgraphicsMapResourceFlags_enum { - CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0, - CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1, - CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2, -} -pub use self::CUgraphicsMapResourceFlags_enum as CUgraphicsMapResourceFlags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUarray_cubemap_face_enum { - CU_CUBEMAP_FACE_POSITIVE_X = 0, - CU_CUBEMAP_FACE_NEGATIVE_X = 1, - CU_CUBEMAP_FACE_POSITIVE_Y = 2, - CU_CUBEMAP_FACE_NEGATIVE_Y = 3, - CU_CUBEMAP_FACE_POSITIVE_Z = 4, - CU_CUBEMAP_FACE_NEGATIVE_Z = 5, -} -pub use self::CUarray_cubemap_face_enum as CUarray_cubemap_face; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUlimit_enum { - CU_LIMIT_STACK_SIZE = 0, - CU_LIMIT_PRINTF_FIFO_SIZE = 1, - CU_LIMIT_MALLOC_HEAP_SIZE = 2, - CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3, - CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4, - CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5, - CU_LIMIT_MAX = 6, -} -pub use self::CUlimit_enum as CUlimit; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUresourcetype_enum { - CU_RESOURCE_TYPE_ARRAY = 0, - CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1, - CU_RESOURCE_TYPE_LINEAR = 2, - CU_RESOURCE_TYPE_PITCH2D = 3, -} -pub use self::CUresourcetype_enum as CUresourcetype; -pub type CUhostFn = - ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_KERNEL_NODE_PARAMS_st { - pub func: CUfunction, - pub gridDimX: ::std::os::raw::c_uint, - pub gridDimY: ::std::os::raw::c_uint, - pub gridDimZ: ::std::os::raw::c_uint, - pub blockDimX: ::std::os::raw::c_uint, - pub blockDimY: ::std::os::raw::c_uint, - pub blockDimZ: ::std::os::raw::c_uint, - pub sharedMemBytes: ::std::os::raw::c_uint, - pub kernelParams: *mut *mut ::std::os::raw::c_void, - pub extra: *mut *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_CUDA_KERNEL_NODE_PARAMS_st() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CUDA_KERNEL_NODE_PARAMS_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_KERNEL_NODE_PARAMS_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).gridDimX as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(gridDimX) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).gridDimY as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(gridDimY) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).gridDimZ as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(gridDimZ) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).blockDimX as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(blockDimX) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).blockDimY as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(blockDimY) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).blockDimZ as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(blockDimZ) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemBytes as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(sharedMemBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelParams as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(kernelParams) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extra as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_KERNEL_NODE_PARAMS_st), - "::", - stringify!(extra) - ) - ); -} -impl Default for CUDA_KERNEL_NODE_PARAMS_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_KERNEL_NODE_PARAMS = CUDA_KERNEL_NODE_PARAMS_st; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_MEMSET_NODE_PARAMS_st { - pub dst: CUdeviceptr, - pub pitch: usize, - pub value: ::std::os::raw::c_uint, - pub elementSize: ::std::os::raw::c_uint, - pub width: usize, - pub height: usize, -} -#[test] -fn bindgen_test_layout_CUDA_MEMSET_NODE_PARAMS_st() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CUDA_MEMSET_NODE_PARAMS_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_MEMSET_NODE_PARAMS_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dst as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMSET_NODE_PARAMS_st), - "::", - stringify!(dst) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitch as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMSET_NODE_PARAMS_st), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMSET_NODE_PARAMS_st), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).elementSize as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMSET_NODE_PARAMS_st), - "::", - stringify!(elementSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMSET_NODE_PARAMS_st), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMSET_NODE_PARAMS_st), - "::", - stringify!(height) - ) - ); -} -pub type CUDA_MEMSET_NODE_PARAMS = CUDA_MEMSET_NODE_PARAMS_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_HOST_NODE_PARAMS_st { - pub fn_: CUhostFn, - pub userData: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_CUDA_HOST_NODE_PARAMS_st() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CUDA_HOST_NODE_PARAMS_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_HOST_NODE_PARAMS_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_HOST_NODE_PARAMS_st), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).userData as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_HOST_NODE_PARAMS_st), - "::", - stringify!(userData) - ) - ); -} -impl Default for CUDA_HOST_NODE_PARAMS_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_HOST_NODE_PARAMS = CUDA_HOST_NODE_PARAMS_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUgraphNodeType_enum { - CU_GRAPH_NODE_TYPE_KERNEL = 0, - CU_GRAPH_NODE_TYPE_MEMCPY = 1, - CU_GRAPH_NODE_TYPE_MEMSET = 2, - CU_GRAPH_NODE_TYPE_HOST = 3, - CU_GRAPH_NODE_TYPE_GRAPH = 4, - CU_GRAPH_NODE_TYPE_EMPTY = 5, - CU_GRAPH_NODE_TYPE_COUNT = 6, -} -pub use self::CUgraphNodeType_enum as CUgraphNodeType; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUstreamCaptureStatus_enum { - CU_STREAM_CAPTURE_STATUS_NONE = 0, - CU_STREAM_CAPTURE_STATUS_ACTIVE = 1, - CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2, -} -pub use self::CUstreamCaptureStatus_enum as CUstreamCaptureStatus; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUstreamCaptureMode_enum { - CU_STREAM_CAPTURE_MODE_GLOBAL = 0, - CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1, - CU_STREAM_CAPTURE_MODE_RELAXED = 2, -} -pub use self::CUstreamCaptureMode_enum as CUstreamCaptureMode; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaError_enum { - CUDA_SUCCESS = 0, - CUDA_ERROR_INVALID_VALUE = 1, - CUDA_ERROR_OUT_OF_MEMORY = 2, - CUDA_ERROR_NOT_INITIALIZED = 3, - CUDA_ERROR_DEINITIALIZED = 4, - CUDA_ERROR_PROFILER_DISABLED = 5, - CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6, - CUDA_ERROR_PROFILER_ALREADY_STARTED = 7, - CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8, - CUDA_ERROR_NO_DEVICE = 100, - CUDA_ERROR_INVALID_DEVICE = 101, - CUDA_ERROR_INVALID_IMAGE = 200, - CUDA_ERROR_INVALID_CONTEXT = 201, - CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 202, - CUDA_ERROR_MAP_FAILED = 205, - CUDA_ERROR_UNMAP_FAILED = 206, - CUDA_ERROR_ARRAY_IS_MAPPED = 207, - CUDA_ERROR_ALREADY_MAPPED = 208, - CUDA_ERROR_NO_BINARY_FOR_GPU = 209, - CUDA_ERROR_ALREADY_ACQUIRED = 210, - CUDA_ERROR_NOT_MAPPED = 211, - CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 212, - CUDA_ERROR_NOT_MAPPED_AS_POINTER = 213, - CUDA_ERROR_ECC_UNCORRECTABLE = 214, - CUDA_ERROR_UNSUPPORTED_LIMIT = 215, - CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 216, - CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 217, - CUDA_ERROR_INVALID_PTX = 218, - CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219, - CUDA_ERROR_NVLINK_UNCORRECTABLE = 220, - CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 221, - CUDA_ERROR_INVALID_SOURCE = 300, - CUDA_ERROR_FILE_NOT_FOUND = 301, - CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302, - CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 303, - CUDA_ERROR_OPERATING_SYSTEM = 304, - CUDA_ERROR_INVALID_HANDLE = 400, - CUDA_ERROR_ILLEGAL_STATE = 401, - CUDA_ERROR_NOT_FOUND = 500, - CUDA_ERROR_NOT_READY = 600, - CUDA_ERROR_ILLEGAL_ADDRESS = 700, - CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 701, - CUDA_ERROR_LAUNCH_TIMEOUT = 702, - CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 703, - CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 704, - CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 705, - CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 708, - CUDA_ERROR_CONTEXT_IS_DESTROYED = 709, - CUDA_ERROR_ASSERT = 710, - CUDA_ERROR_TOO_MANY_PEERS = 711, - CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 712, - CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 713, - CUDA_ERROR_HARDWARE_STACK_ERROR = 714, - CUDA_ERROR_ILLEGAL_INSTRUCTION = 715, - CUDA_ERROR_MISALIGNED_ADDRESS = 716, - CUDA_ERROR_INVALID_ADDRESS_SPACE = 717, - CUDA_ERROR_INVALID_PC = 718, - CUDA_ERROR_LAUNCH_FAILED = 719, - CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 720, - CUDA_ERROR_NOT_PERMITTED = 800, - CUDA_ERROR_NOT_SUPPORTED = 801, - CUDA_ERROR_SYSTEM_NOT_READY = 802, - CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 803, - CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 804, - CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 900, - CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 901, - CUDA_ERROR_STREAM_CAPTURE_MERGE = 902, - CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 903, - CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 904, - CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 905, - CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 906, - CUDA_ERROR_CAPTURED_EVENT = 907, - CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 908, - CUDA_ERROR_TIMEOUT = 909, - CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 910, - CUDA_ERROR_UNKNOWN = 999, -} -pub use self::cudaError_enum as CUresult; -impl CUdevice_P2PAttribute_enum { - pub const CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum = - CUdevice_P2PAttribute_enum::CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED; -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUdevice_P2PAttribute_enum { - CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1, - CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2, - CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3, - CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4, -} -pub use self::CUdevice_P2PAttribute_enum as CUdevice_P2PAttribute; -pub type CUstreamCallback = ::std::option::Option< - unsafe extern "C" fn( - hStream: CUstream, - status: CUresult, - userData: *mut ::std::os::raw::c_void, - ), ->; -pub type CUoccupancyB2DSize = - ::std::option::Option usize>; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_MEMCPY2D_st { - pub srcXInBytes: usize, - pub srcY: usize, - pub srcMemoryType: CUmemorytype, - pub srcHost: *const ::std::os::raw::c_void, - pub srcDevice: CUdeviceptr, - pub srcArray: CUarray, - pub srcPitch: usize, - pub dstXInBytes: usize, - pub dstY: usize, - pub dstMemoryType: CUmemorytype, - pub dstHost: *mut ::std::os::raw::c_void, - pub dstDevice: CUdeviceptr, - pub dstArray: CUarray, - pub dstPitch: usize, - pub WidthInBytes: usize, - pub Height: usize, -} -#[test] -fn bindgen_test_layout_CUDA_MEMCPY2D_st() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(CUDA_MEMCPY2D_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_MEMCPY2D_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcXInBytes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcXInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcY as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcMemoryType as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcMemoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcHost as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcHost) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPitch as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(srcPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstXInBytes as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstXInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstY as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstMemoryType as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstMemoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstHost as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstHost) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPitch as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(dstPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).WidthInBytes as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(WidthInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY2D_st), - "::", - stringify!(Height) - ) - ); -} -impl Default for CUDA_MEMCPY2D_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_MEMCPY2D = CUDA_MEMCPY2D_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_MEMCPY3D_st { - pub srcXInBytes: usize, - pub srcY: usize, - pub srcZ: usize, - pub srcLOD: usize, - pub srcMemoryType: CUmemorytype, - pub srcHost: *const ::std::os::raw::c_void, - pub srcDevice: CUdeviceptr, - pub srcArray: CUarray, - pub reserved0: *mut ::std::os::raw::c_void, - pub srcPitch: usize, - pub srcHeight: usize, - pub dstXInBytes: usize, - pub dstY: usize, - pub dstZ: usize, - pub dstLOD: usize, - pub dstMemoryType: CUmemorytype, - pub dstHost: *mut ::std::os::raw::c_void, - pub dstDevice: CUdeviceptr, - pub dstArray: CUarray, - pub reserved1: *mut ::std::os::raw::c_void, - pub dstPitch: usize, - pub dstHeight: usize, - pub WidthInBytes: usize, - pub Height: usize, - pub Depth: usize, -} -#[test] -fn bindgen_test_layout_CUDA_MEMCPY3D_st() { - assert_eq!( - ::std::mem::size_of::(), - 200usize, - concat!("Size of: ", stringify!(CUDA_MEMCPY3D_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_MEMCPY3D_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcXInBytes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcXInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcY as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcZ as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcLOD as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcLOD) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcMemoryType as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcMemoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcHost as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcHost) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved0 as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(reserved0) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPitch as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcHeight as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(srcHeight) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstXInBytes as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstXInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstY as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstZ as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstLOD as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstLOD) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstMemoryType as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstMemoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstHost as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstHost) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPitch as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstHeight as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(dstHeight) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).WidthInBytes as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(WidthInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(Height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Depth as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_st), - "::", - stringify!(Depth) - ) - ); -} -impl Default for CUDA_MEMCPY3D_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_MEMCPY3D = CUDA_MEMCPY3D_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_MEMCPY3D_PEER_st { - pub srcXInBytes: usize, - pub srcY: usize, - pub srcZ: usize, - pub srcLOD: usize, - pub srcMemoryType: CUmemorytype, - pub srcHost: *const ::std::os::raw::c_void, - pub srcDevice: CUdeviceptr, - pub srcArray: CUarray, - pub srcContext: CUcontext, - pub srcPitch: usize, - pub srcHeight: usize, - pub dstXInBytes: usize, - pub dstY: usize, - pub dstZ: usize, - pub dstLOD: usize, - pub dstMemoryType: CUmemorytype, - pub dstHost: *mut ::std::os::raw::c_void, - pub dstDevice: CUdeviceptr, - pub dstArray: CUarray, - pub dstContext: CUcontext, - pub dstPitch: usize, - pub dstHeight: usize, - pub WidthInBytes: usize, - pub Height: usize, - pub Depth: usize, -} -#[test] -fn bindgen_test_layout_CUDA_MEMCPY3D_PEER_st() { - assert_eq!( - ::std::mem::size_of::(), - 200usize, - concat!("Size of: ", stringify!(CUDA_MEMCPY3D_PEER_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_MEMCPY3D_PEER_st)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).srcXInBytes as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcXInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcY as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcZ as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcLOD as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcLOD) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).srcMemoryType as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcMemoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcHost as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcHost) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).srcContext as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcContext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPitch as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcHeight as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(srcHeight) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dstXInBytes as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstXInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstY as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstZ as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstLOD as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstLOD) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dstMemoryType as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstMemoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstHost as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstHost) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dstContext as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstContext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPitch as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstPitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstHeight as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(dstHeight) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).WidthInBytes as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(WidthInBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(Height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Depth as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CUDA_MEMCPY3D_PEER_st), - "::", - stringify!(Depth) - ) - ); -} -impl Default for CUDA_MEMCPY3D_PEER_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_MEMCPY3D_PEER = CUDA_MEMCPY3D_PEER_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_ARRAY_DESCRIPTOR_st { - pub Width: usize, - pub Height: usize, - pub Format: CUarray_format, - pub NumChannels: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_CUDA_ARRAY_DESCRIPTOR_st() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CUDA_ARRAY_DESCRIPTOR_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_ARRAY_DESCRIPTOR_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY_DESCRIPTOR_st), - "::", - stringify!(Width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY_DESCRIPTOR_st), - "::", - stringify!(Height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Format as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY_DESCRIPTOR_st), - "::", - stringify!(Format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).NumChannels as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY_DESCRIPTOR_st), - "::", - stringify!(NumChannels) - ) - ); -} -impl Default for CUDA_ARRAY_DESCRIPTOR_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_ARRAY_DESCRIPTOR = CUDA_ARRAY_DESCRIPTOR_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_ARRAY3D_DESCRIPTOR_st { - pub Width: usize, - pub Height: usize, - pub Depth: usize, - pub Format: CUarray_format, - pub NumChannels: ::std::os::raw::c_uint, - pub Flags: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_CUDA_ARRAY3D_DESCRIPTOR_st() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CUDA_ARRAY3D_DESCRIPTOR_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_ARRAY3D_DESCRIPTOR_st)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).Width as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), - "::", - stringify!(Width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).Height as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), - "::", - stringify!(Height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).Depth as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), - "::", - stringify!(Depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).Format as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), - "::", - stringify!(Format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).NumChannels as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), - "::", - stringify!(NumChannels) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).Flags as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), - "::", - stringify!(Flags) - ) - ); -} -impl Default for CUDA_ARRAY3D_DESCRIPTOR_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_ARRAY3D_DESCRIPTOR = CUDA_ARRAY3D_DESCRIPTOR_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_RESOURCE_DESC_st { - pub resType: CUresourcetype, - pub res: CUDA_RESOURCE_DESC_st__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUDA_RESOURCE_DESC_st__bindgen_ty_1 { - pub array: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1, - pub mipmap: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2, - pub linear: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3, - pub pitch2D: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4, - pub reserved: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5, - _bindgen_union_align: [u64; 16usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 { - pub hArray: CUarray, -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hArray - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(hArray) - ) - ); -} -impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 { - pub hMipmappedArray: CUmipmappedArray, -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .hMipmappedArray as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(hMipmappedArray) - ) - ); -} -impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 { - pub devPtr: CUdeviceptr, - pub format: CUarray_format, - pub numChannels: ::std::os::raw::c_uint, - pub sizeInBytes: usize, -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).format - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .numChannels as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(numChannels) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .sizeInBytes as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(sizeInBytes) - ) - ); -} -impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 { - pub devPtr: CUdeviceptr, - pub format: CUarray_format, - pub numChannels: ::std::os::raw::c_uint, - pub width: usize, - pub height: usize, - pub pitchInBytes: usize, -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!( - "Size of: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).format - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .numChannels as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(numChannels) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pitchInBytes as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(pitchInBytes) - ) - ); -} -impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 { - pub reserved: [::std::os::raw::c_int; 32usize], -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!( - "Size of: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(reserved) - ) - ); -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), - "::", - stringify!(mipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linear as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), - "::", - stringify!(linear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitch2D as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), - "::", - stringify!(pitch2D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(CUDA_RESOURCE_DESC_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_RESOURCE_DESC_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).resType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st), - "::", - stringify!(resType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).res as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st), - "::", - stringify!(res) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_DESC_st), - "::", - stringify!(flags) - ) - ); -} -impl Default for CUDA_RESOURCE_DESC_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_RESOURCE_DESC = CUDA_RESOURCE_DESC_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] -pub struct CUDA_TEXTURE_DESC_st { - pub addressMode: [CUaddress_mode; 3usize], - pub filterMode: CUfilter_mode, - pub flags: ::std::os::raw::c_uint, - pub maxAnisotropy: ::std::os::raw::c_uint, - pub mipmapFilterMode: CUfilter_mode, - pub mipmapLevelBias: f32, - pub minMipmapLevelClamp: f32, - pub maxMipmapLevelClamp: f32, - pub borderColor: [f32; 4usize], - pub reserved: [::std::os::raw::c_int; 12usize], -} -#[test] -fn bindgen_test_layout_CUDA_TEXTURE_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(CUDA_TEXTURE_DESC_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CUDA_TEXTURE_DESC_st)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).addressMode as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(addressMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(filterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(maxAnisotropy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(mipmapFilterMode) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(mipmapLevelBias) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(minMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(maxMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).borderColor as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(borderColor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CUDA_TEXTURE_DESC_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_TEXTURE_DESC_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_TEXTURE_DESC = CUDA_TEXTURE_DESC_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUresourceViewFormat_enum { - CU_RES_VIEW_FORMAT_NONE = 0, - CU_RES_VIEW_FORMAT_UINT_1X8 = 1, - CU_RES_VIEW_FORMAT_UINT_2X8 = 2, - CU_RES_VIEW_FORMAT_UINT_4X8 = 3, - CU_RES_VIEW_FORMAT_SINT_1X8 = 4, - CU_RES_VIEW_FORMAT_SINT_2X8 = 5, - CU_RES_VIEW_FORMAT_SINT_4X8 = 6, - CU_RES_VIEW_FORMAT_UINT_1X16 = 7, - CU_RES_VIEW_FORMAT_UINT_2X16 = 8, - CU_RES_VIEW_FORMAT_UINT_4X16 = 9, - CU_RES_VIEW_FORMAT_SINT_1X16 = 10, - CU_RES_VIEW_FORMAT_SINT_2X16 = 11, - CU_RES_VIEW_FORMAT_SINT_4X16 = 12, - CU_RES_VIEW_FORMAT_UINT_1X32 = 13, - CU_RES_VIEW_FORMAT_UINT_2X32 = 14, - CU_RES_VIEW_FORMAT_UINT_4X32 = 15, - CU_RES_VIEW_FORMAT_SINT_1X32 = 16, - CU_RES_VIEW_FORMAT_SINT_2X32 = 17, - CU_RES_VIEW_FORMAT_SINT_4X32 = 18, - CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19, - CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20, - CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21, - CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22, - CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23, - CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24, - CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25, - CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26, - CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27, - CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28, - CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29, - CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30, - CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31, - CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32, - CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33, - CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34, -} -pub use self::CUresourceViewFormat_enum as CUresourceViewFormat; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_RESOURCE_VIEW_DESC_st { - pub format: CUresourceViewFormat, - pub width: usize, - pub height: usize, - pub depth: usize, - pub firstMipmapLevel: ::std::os::raw::c_uint, - pub lastMipmapLevel: ::std::os::raw::c_uint, - pub firstLayer: ::std::os::raw::c_uint, - pub lastLayer: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[test] -fn bindgen_test_layout_CUDA_RESOURCE_VIEW_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CUDA_RESOURCE_VIEW_DESC_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_RESOURCE_VIEW_DESC_st)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).format as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).depth as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).firstMipmapLevel as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(firstMipmapLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).lastMipmapLevel as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(lastMipmapLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).firstLayer as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(firstLayer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).lastLayer as *const _ as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(lastLayer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_RESOURCE_VIEW_DESC_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_RESOURCE_VIEW_DESC_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_RESOURCE_VIEW_DESC = CUDA_RESOURCE_VIEW_DESC_st; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st { - pub p2pToken: ::std::os::raw::c_ulonglong, - pub vaSpaceToken: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p2pToken as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), - "::", - stringify!(p2pToken) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vaSpaceToken - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), - "::", - stringify!(vaSpaceToken) - ) - ); -} -pub type CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_LAUNCH_PARAMS_st { - pub function: CUfunction, - pub gridDimX: ::std::os::raw::c_uint, - pub gridDimY: ::std::os::raw::c_uint, - pub gridDimZ: ::std::os::raw::c_uint, - pub blockDimX: ::std::os::raw::c_uint, - pub blockDimY: ::std::os::raw::c_uint, - pub blockDimZ: ::std::os::raw::c_uint, - pub sharedMemBytes: ::std::os::raw::c_uint, - pub hStream: CUstream, - pub kernelParams: *mut *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_CUDA_LAUNCH_PARAMS_st() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CUDA_LAUNCH_PARAMS_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUDA_LAUNCH_PARAMS_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).function as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(function) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDimX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(gridDimX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDimY as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(gridDimY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDimZ as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(gridDimZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDimX as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(blockDimX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDimY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(blockDimY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDimZ as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(blockDimZ) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemBytes as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(sharedMemBytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hStream as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(hStream) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelParams as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_LAUNCH_PARAMS_st), - "::", - stringify!(kernelParams) - ) - ); -} -impl Default for CUDA_LAUNCH_PARAMS_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_LAUNCH_PARAMS = CUDA_LAUNCH_PARAMS_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUexternalMemoryHandleType_enum { - CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7, - CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8, -} -pub use self::CUexternalMemoryHandleType_enum as CUexternalMemoryHandleType; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st { - pub type_: CUexternalMemoryHandleType, - pub handle: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1, - pub size: ::std::os::raw::c_ulonglong, - pub flags: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 { - pub fd: ::std::os::raw::c_int, - pub win32: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, - pub nvSciBufObject: *const ::std::os::raw::c_void, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::std::os::raw::c_void, - pub name: *const ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .handle as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .name as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); -} -impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fd - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .nvSciBufObject as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1), - "::", - stringify!(nvSciBufObject) - ) - ); -} -impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).type_ as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st { - pub offset: ::std::os::raw::c_ulonglong, - pub size: ::std::os::raw::c_ulonglong, - pub flags: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), - "::", - stringify!(reserved) - ) - ); -} -pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st { - pub offset: ::std::os::raw::c_ulonglong, - pub arrayDesc: CUDA_ARRAY3D_DESCRIPTOR, - pub numLevels: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 120usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).arrayDesc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), - "::", - stringify!(arrayDesc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numLevels - as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), - "::", - stringify!(numLevels) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUexternalSemaphoreHandleType_enum { - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7, - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8, -} -pub use self::CUexternalSemaphoreHandleType_enum as CUexternalSemaphoreHandleType; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st { - pub type_: CUexternalSemaphoreHandleType, - pub handle: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 { - pub fd: ::std::os::raw::c_int, - pub win32: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, - pub nvSciSyncObj: *const ::std::os::raw::c_void, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::std::os::raw::c_void, - pub name: *const ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, - >())) - .handle as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, - >())) - .name as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fd - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .nvSciSyncObj as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1), - "::", - stringify!(nvSciSyncObj) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).type_ as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st { - pub params: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 { - pub fence: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3, - pub reserved: [::std::os::raw::c_uint; 12usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1 { - pub value: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::( - ), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1, - >())) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::std::os::raw::c_void, - pub reserved: ::std::os::raw::c_ulonglong, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::( - ), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2, - >())) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2, - >())) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3 { - pub key: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::( - ), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3, - >())) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .nvSciSync as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .keyedMutex as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .reserved as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st { - pub params: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, - pub reserved: [::std::os::raw::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 { - pub fence: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3, - pub reserved: [::std::os::raw::c_uint; 10usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1 { - pub value: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1, - >())) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::std::os::raw::c_void, - pub reserved: ::std::os::raw::c_ulonglong, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2, - >())) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2, - >())) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3 { - pub key: ::std::os::raw::c_ulonglong, - pub timeoutMs: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - ::std::mem::align_of::( - ), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3, - >())) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::< - CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3, - >())) - .timeoutMs as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .nvSciSync as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .keyedMutex as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .reserved as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!( - "Size of: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st; -pub type CUmemGenericAllocationHandle = ::std::os::raw::c_ulonglong; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemAllocationHandleType_enum { - CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1, - CU_MEM_HANDLE_TYPE_WIN32 = 2, - CU_MEM_HANDLE_TYPE_WIN32_KMT = 4, - CU_MEM_HANDLE_TYPE_MAX = 4294967295, -} -pub use self::CUmemAllocationHandleType_enum as CUmemAllocationHandleType; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemAccess_flags_enum { - CU_MEM_ACCESS_FLAGS_PROT_NONE = 0, - CU_MEM_ACCESS_FLAGS_PROT_READ = 1, - CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3, - CU_MEM_ACCESS_FLAGS_PROT_MAX = 4294967295, -} -pub use self::CUmemAccess_flags_enum as CUmemAccess_flags; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemLocationType_enum { - CU_MEM_LOCATION_TYPE_INVALID = 0, - CU_MEM_LOCATION_TYPE_DEVICE = 1, - CU_MEM_LOCATION_TYPE_MAX = 4294967295, -} -pub use self::CUmemLocationType_enum as CUmemLocationType; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemAllocationType_enum { - CU_MEM_ALLOCATION_TYPE_INVALID = 0, - CU_MEM_ALLOCATION_TYPE_PINNED = 1, - CU_MEM_ALLOCATION_TYPE_MAX = 4294967295, -} -pub use self::CUmemAllocationType_enum as CUmemAllocationType; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUmemAllocationGranularity_flags_enum { - CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0, - CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1, -} -pub use self::CUmemAllocationGranularity_flags_enum as CUmemAllocationGranularity_flags; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUmemLocation_st { - pub type_: CUmemLocationType, - pub id: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_CUmemLocation_st() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CUmemLocation_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CUmemLocation_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUmemLocation_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CUmemLocation_st), - "::", - stringify!(id) - ) - ); -} -impl Default for CUmemLocation_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUmemLocation = CUmemLocation_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUmemAllocationProp_st { - pub type_: CUmemAllocationType, - pub requestedHandleTypes: CUmemAllocationHandleType, - pub location: CUmemLocation, - pub win32HandleMetaData: *mut ::std::os::raw::c_void, - pub reserved: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_CUmemAllocationProp_st() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CUmemAllocationProp_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CUmemAllocationProp_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUmemAllocationProp_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).requestedHandleTypes as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CUmemAllocationProp_st), - "::", - stringify!(requestedHandleTypes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUmemAllocationProp_st), - "::", - stringify!(location) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32HandleMetaData as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CUmemAllocationProp_st), - "::", - stringify!(win32HandleMetaData) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CUmemAllocationProp_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for CUmemAllocationProp_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUmemAllocationProp = CUmemAllocationProp_st; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUmemAccessDesc_st { - pub location: CUmemLocation, - pub flags: CUmemAccess_flags, -} -#[test] -fn bindgen_test_layout_CUmemAccessDesc_st() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CUmemAccessDesc_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CUmemAccessDesc_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUmemAccessDesc_st), - "::", - stringify!(location) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CUmemAccessDesc_st), - "::", - stringify!(flags) - ) - ); -} -impl Default for CUmemAccessDesc_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type CUmemAccessDesc = CUmemAccessDesc_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUgraphExecUpdateResult_enum { - CU_GRAPH_EXEC_UPDATE_SUCCESS = 0, - CU_GRAPH_EXEC_UPDATE_ERROR = 1, - CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2, - CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3, - CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4, - CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5, - CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6, -} -pub use self::CUgraphExecUpdateResult_enum as CUgraphExecUpdateResult; extern "C" { pub fn cuGetErrorString(error: CUresult, pStr: *mut *const ::std::os::raw::c_char) -> CUresult; } @@ -5268,7 +57,7 @@ extern "C" { pub fn cuDeviceGetUuid(uuid: *mut CUuuid, dev: CUdevice) -> CUresult; } extern "C" { - pub fn cuDeviceTotalMem_v2(bytes: *mut usize, dev: CUdevice) -> CUresult; + pub fn cuDeviceTotalMem_v2(bytes: *mut size_t, dev: CUdevice) -> CUresult; } extern "C" { pub fn cuDeviceGetAttribute( @@ -5298,10 +87,10 @@ extern "C" { pub fn cuDevicePrimaryCtxRetain(pctx: *mut CUcontext, dev: CUdevice) -> CUresult; } extern "C" { - pub fn cuDevicePrimaryCtxRelease(dev: CUdevice) -> CUresult; + pub fn cuDevicePrimaryCtxRelease_v2(dev: CUdevice) -> CUresult; } extern "C" { - pub fn cuDevicePrimaryCtxSetFlags(dev: CUdevice, flags: ::std::os::raw::c_uint) -> CUresult; + pub fn cuDevicePrimaryCtxSetFlags_v2(dev: CUdevice, flags: ::std::os::raw::c_uint) -> CUresult; } extern "C" { pub fn cuDevicePrimaryCtxGetState( @@ -5311,7 +100,7 @@ extern "C" { ) -> CUresult; } extern "C" { - pub fn cuDevicePrimaryCtxReset(dev: CUdevice) -> CUresult; + pub fn cuDevicePrimaryCtxReset_v2(dev: CUdevice) -> CUresult; } extern "C" { pub fn cuCtxCreate_v2( @@ -5345,10 +134,10 @@ extern "C" { pub fn cuCtxSynchronize() -> CUresult; } extern "C" { - pub fn cuCtxSetLimit(limit: CUlimit, value: usize) -> CUresult; + pub fn cuCtxSetLimit(limit: CUlimit, value: size_t) -> CUresult; } extern "C" { - pub fn cuCtxGetLimit(pvalue: *mut usize, limit: CUlimit) -> CUresult; + pub fn cuCtxGetLimit(pvalue: *mut size_t, limit: CUlimit) -> CUresult; } extern "C" { pub fn cuCtxGetCacheConfig(pconfig: *mut CUfunc_cache) -> CUresult; @@ -5371,6 +160,9 @@ extern "C" { greatestPriority: *mut ::std::os::raw::c_int, ) -> CUresult; } +extern "C" { + pub fn cuCtxResetPersistingL2Cache() -> CUresult; +} extern "C" { pub fn cuCtxAttach(pctx: *mut CUcontext, flags: ::std::os::raw::c_uint) -> CUresult; } @@ -5414,7 +206,7 @@ extern "C" { extern "C" { pub fn cuModuleGetGlobal_v2( dptr: *mut CUdeviceptr, - bytes: *mut usize, + bytes: *mut size_t, hmod: CUmodule, name: *const ::std::os::raw::c_char, ) -> CUresult; @@ -5446,7 +238,7 @@ extern "C" { state: CUlinkState, type_: CUjitInputType, data: *mut ::std::os::raw::c_void, - size: usize, + size: size_t, name: *const ::std::os::raw::c_char, numOptions: ::std::os::raw::c_uint, options: *mut CUjit_option, @@ -5467,24 +259,24 @@ extern "C" { pub fn cuLinkComplete( state: CUlinkState, cubinOut: *mut *mut ::std::os::raw::c_void, - sizeOut: *mut usize, + sizeOut: *mut size_t, ) -> CUresult; } extern "C" { pub fn cuLinkDestroy(state: CUlinkState) -> CUresult; } extern "C" { - pub fn cuMemGetInfo_v2(free: *mut usize, total: *mut usize) -> CUresult; + pub fn cuMemGetInfo_v2(free: *mut size_t, total: *mut size_t) -> CUresult; } extern "C" { - pub fn cuMemAlloc_v2(dptr: *mut CUdeviceptr, bytesize: usize) -> CUresult; + pub fn cuMemAlloc_v2(dptr: *mut CUdeviceptr, bytesize: size_t) -> CUresult; } extern "C" { pub fn cuMemAllocPitch_v2( dptr: *mut CUdeviceptr, - pPitch: *mut usize, - WidthInBytes: usize, - Height: usize, + pPitch: *mut size_t, + WidthInBytes: size_t, + Height: size_t, ElementSizeBytes: ::std::os::raw::c_uint, ) -> CUresult; } @@ -5494,12 +286,12 @@ extern "C" { extern "C" { pub fn cuMemGetAddressRange_v2( pbase: *mut CUdeviceptr, - psize: *mut usize, + psize: *mut size_t, dptr: CUdeviceptr, ) -> CUresult; } extern "C" { - pub fn cuMemAllocHost_v2(pp: *mut *mut ::std::os::raw::c_void, bytesize: usize) -> CUresult; + pub fn cuMemAllocHost_v2(pp: *mut *mut ::std::os::raw::c_void, bytesize: size_t) -> CUresult; } extern "C" { pub fn cuMemFreeHost(p: *mut ::std::os::raw::c_void) -> CUresult; @@ -5507,7 +299,7 @@ extern "C" { extern "C" { pub fn cuMemHostAlloc( pp: *mut *mut ::std::os::raw::c_void, - bytesize: usize, + bytesize: size_t, Flags: ::std::os::raw::c_uint, ) -> CUresult; } @@ -5527,7 +319,7 @@ extern "C" { extern "C" { pub fn cuMemAllocManaged( dptr: *mut CUdeviceptr, - bytesize: usize, + bytesize: size_t, flags: ::std::os::raw::c_uint, ) -> CUresult; } @@ -5566,7 +358,7 @@ extern "C" { extern "C" { pub fn cuMemHostRegister_v2( p: *mut ::std::os::raw::c_void, - bytesize: usize, + bytesize: size_t, Flags: ::std::os::raw::c_uint, ) -> CUresult; } @@ -5574,7 +366,7 @@ extern "C" { pub fn cuMemHostUnregister(p: *mut ::std::os::raw::c_void) -> CUresult; } extern "C" { - pub fn cuMemcpy(dst: CUdeviceptr, src: CUdeviceptr, ByteCount: usize) -> CUresult; + pub fn cuMemcpy(dst: CUdeviceptr, src: CUdeviceptr, ByteCount: size_t) -> CUresult; } extern "C" { pub fn cuMemcpyPeer( @@ -5582,69 +374,69 @@ extern "C" { dstContext: CUcontext, srcDevice: CUdeviceptr, srcContext: CUcontext, - ByteCount: usize, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyHtoD_v2( dstDevice: CUdeviceptr, srcHost: *const ::std::os::raw::c_void, - ByteCount: usize, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyDtoH_v2( dstHost: *mut ::std::os::raw::c_void, srcDevice: CUdeviceptr, - ByteCount: usize, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyDtoD_v2( dstDevice: CUdeviceptr, srcDevice: CUdeviceptr, - ByteCount: usize, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyDtoA_v2( dstArray: CUarray, - dstOffset: usize, + dstOffset: size_t, srcDevice: CUdeviceptr, - ByteCount: usize, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyAtoD_v2( dstDevice: CUdeviceptr, srcArray: CUarray, - srcOffset: usize, - ByteCount: usize, + srcOffset: size_t, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyHtoA_v2( dstArray: CUarray, - dstOffset: usize, + dstOffset: size_t, srcHost: *const ::std::os::raw::c_void, - ByteCount: usize, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyAtoH_v2( dstHost: *mut ::std::os::raw::c_void, srcArray: CUarray, - srcOffset: usize, - ByteCount: usize, + srcOffset: size_t, + ByteCount: size_t, ) -> CUresult; } extern "C" { pub fn cuMemcpyAtoA_v2( dstArray: CUarray, - dstOffset: usize, + dstOffset: size_t, srcArray: CUarray, - srcOffset: usize, - ByteCount: usize, + srcOffset: size_t, + ByteCount: size_t, ) -> CUresult; } extern "C" { @@ -5663,7 +455,7 @@ extern "C" { pub fn cuMemcpyAsync( dst: CUdeviceptr, src: CUdeviceptr, - ByteCount: usize, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } @@ -5673,7 +465,7 @@ extern "C" { dstContext: CUcontext, srcDevice: CUdeviceptr, srcContext: CUcontext, - ByteCount: usize, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } @@ -5681,7 +473,7 @@ extern "C" { pub fn cuMemcpyHtoDAsync_v2( dstDevice: CUdeviceptr, srcHost: *const ::std::os::raw::c_void, - ByteCount: usize, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } @@ -5689,7 +481,7 @@ extern "C" { pub fn cuMemcpyDtoHAsync_v2( dstHost: *mut ::std::os::raw::c_void, srcDevice: CUdeviceptr, - ByteCount: usize, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } @@ -5697,16 +489,16 @@ extern "C" { pub fn cuMemcpyDtoDAsync_v2( dstDevice: CUdeviceptr, srcDevice: CUdeviceptr, - ByteCount: usize, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } extern "C" { pub fn cuMemcpyHtoAAsync_v2( dstArray: CUarray, - dstOffset: usize, + dstOffset: size_t, srcHost: *const ::std::os::raw::c_void, - ByteCount: usize, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } @@ -5714,8 +506,8 @@ extern "C" { pub fn cuMemcpyAtoHAsync_v2( dstHost: *mut ::std::os::raw::c_void, srcArray: CUarray, - srcOffset: usize, - ByteCount: usize, + srcOffset: size_t, + ByteCount: size_t, hStream: CUstream, ) -> CUresult; } @@ -5729,52 +521,58 @@ extern "C" { pub fn cuMemcpy3DPeerAsync(pCopy: *const CUDA_MEMCPY3D_PEER, hStream: CUstream) -> CUresult; } extern "C" { - pub fn cuMemsetD8_v2(dstDevice: CUdeviceptr, uc: ::std::os::raw::c_uchar, N: usize) - -> CUresult; + pub fn cuMemsetD8_v2( + dstDevice: CUdeviceptr, + uc: ::std::os::raw::c_uchar, + N: size_t, + ) -> CUresult; } extern "C" { pub fn cuMemsetD16_v2( dstDevice: CUdeviceptr, us: ::std::os::raw::c_ushort, - N: usize, + N: size_t, ) -> CUresult; } extern "C" { - pub fn cuMemsetD32_v2(dstDevice: CUdeviceptr, ui: ::std::os::raw::c_uint, N: usize) - -> CUresult; + pub fn cuMemsetD32_v2( + dstDevice: CUdeviceptr, + ui: ::std::os::raw::c_uint, + N: size_t, + ) -> CUresult; } extern "C" { pub fn cuMemsetD2D8_v2( dstDevice: CUdeviceptr, - dstPitch: usize, + dstPitch: size_t, uc: ::std::os::raw::c_uchar, - Width: usize, - Height: usize, + Width: size_t, + Height: size_t, ) -> CUresult; } extern "C" { pub fn cuMemsetD2D16_v2( dstDevice: CUdeviceptr, - dstPitch: usize, + dstPitch: size_t, us: ::std::os::raw::c_ushort, - Width: usize, - Height: usize, + Width: size_t, + Height: size_t, ) -> CUresult; } extern "C" { pub fn cuMemsetD2D32_v2( dstDevice: CUdeviceptr, - dstPitch: usize, + dstPitch: size_t, ui: ::std::os::raw::c_uint, - Width: usize, - Height: usize, + Width: size_t, + Height: size_t, ) -> CUresult; } extern "C" { pub fn cuMemsetD8Async( dstDevice: CUdeviceptr, uc: ::std::os::raw::c_uchar, - N: usize, + N: size_t, hStream: CUstream, ) -> CUresult; } @@ -5782,7 +580,7 @@ extern "C" { pub fn cuMemsetD16Async( dstDevice: CUdeviceptr, us: ::std::os::raw::c_ushort, - N: usize, + N: size_t, hStream: CUstream, ) -> CUresult; } @@ -5790,37 +588,37 @@ extern "C" { pub fn cuMemsetD32Async( dstDevice: CUdeviceptr, ui: ::std::os::raw::c_uint, - N: usize, + N: size_t, hStream: CUstream, ) -> CUresult; } extern "C" { pub fn cuMemsetD2D8Async( dstDevice: CUdeviceptr, - dstPitch: usize, + dstPitch: size_t, uc: ::std::os::raw::c_uchar, - Width: usize, - Height: usize, + Width: size_t, + Height: size_t, hStream: CUstream, ) -> CUresult; } extern "C" { pub fn cuMemsetD2D16Async( dstDevice: CUdeviceptr, - dstPitch: usize, + dstPitch: size_t, us: ::std::os::raw::c_ushort, - Width: usize, - Height: usize, + Width: size_t, + Height: size_t, hStream: CUstream, ) -> CUresult; } extern "C" { pub fn cuMemsetD2D32Async( dstDevice: CUdeviceptr, - dstPitch: usize, + dstPitch: size_t, ui: ::std::os::raw::c_uint, - Width: usize, - Height: usize, + Width: size_t, + Height: size_t, hStream: CUstream, ) -> CUresult; } @@ -5871,19 +669,19 @@ extern "C" { extern "C" { pub fn cuMemAddressReserve( ptr: *mut CUdeviceptr, - size: usize, - alignment: usize, + size: size_t, + alignment: size_t, addr: CUdeviceptr, flags: ::std::os::raw::c_ulonglong, ) -> CUresult; } extern "C" { - pub fn cuMemAddressFree(ptr: CUdeviceptr, size: usize) -> CUresult; + pub fn cuMemAddressFree(ptr: CUdeviceptr, size: size_t) -> CUresult; } extern "C" { pub fn cuMemCreate( handle: *mut CUmemGenericAllocationHandle, - size: usize, + size: size_t, prop: *const CUmemAllocationProp, flags: ::std::os::raw::c_ulonglong, ) -> CUresult; @@ -5894,21 +692,21 @@ extern "C" { extern "C" { pub fn cuMemMap( ptr: CUdeviceptr, - size: usize, - offset: usize, + size: size_t, + offset: size_t, handle: CUmemGenericAllocationHandle, flags: ::std::os::raw::c_ulonglong, ) -> CUresult; } extern "C" { - pub fn cuMemUnmap(ptr: CUdeviceptr, size: usize) -> CUresult; + pub fn cuMemUnmap(ptr: CUdeviceptr, size: size_t) -> CUresult; } extern "C" { pub fn cuMemSetAccess( ptr: CUdeviceptr, - size: usize, + size: size_t, desc: *const CUmemAccessDesc, - count: usize, + count: size_t, ) -> CUresult; } extern "C" { @@ -5935,7 +733,7 @@ extern "C" { } extern "C" { pub fn cuMemGetAllocationGranularity( - granularity: *mut usize, + granularity: *mut size_t, prop: *const CUmemAllocationProp, option: CUmemAllocationGranularity_flags, ) -> CUresult; @@ -5946,6 +744,12 @@ extern "C" { handle: CUmemGenericAllocationHandle, ) -> CUresult; } +extern "C" { + pub fn cuMemRetainAllocationHandle( + handle: *mut CUmemGenericAllocationHandle, + addr: *mut ::std::os::raw::c_void, + ) -> CUresult; +} extern "C" { pub fn cuPointerGetAttribute( data: *mut ::std::os::raw::c_void, @@ -5956,7 +760,7 @@ extern "C" { extern "C" { pub fn cuMemPrefetchAsync( devPtr: CUdeviceptr, - count: usize, + count: size_t, dstDevice: CUdevice, hStream: CUstream, ) -> CUresult; @@ -5964,7 +768,7 @@ extern "C" { extern "C" { pub fn cuMemAdvise( devPtr: CUdeviceptr, - count: usize, + count: size_t, advice: CUmem_advise, device: CUdevice, ) -> CUresult; @@ -5972,20 +776,20 @@ extern "C" { extern "C" { pub fn cuMemRangeGetAttribute( data: *mut ::std::os::raw::c_void, - dataSize: usize, + dataSize: size_t, attribute: CUmem_range_attribute, devPtr: CUdeviceptr, - count: usize, + count: size_t, ) -> CUresult; } extern "C" { pub fn cuMemRangeGetAttributes( data: *mut *mut ::std::os::raw::c_void, - dataSizes: *mut usize, + dataSizes: *mut size_t, attributes: *mut CUmem_range_attribute, - numAttributes: usize, + numAttributes: size_t, devPtr: CUdeviceptr, - count: usize, + count: size_t, ) -> CUresult; } extern "C" { @@ -6064,7 +868,7 @@ extern "C" { pub fn cuStreamAttachMemAsync( hStream: CUstream, dptr: CUdeviceptr, - length: usize, + length: size_t, flags: ::std::os::raw::c_uint, ) -> CUresult; } @@ -6077,6 +881,23 @@ extern "C" { extern "C" { pub fn cuStreamDestroy_v2(hStream: CUstream) -> CUresult; } +extern "C" { + pub fn cuStreamCopyAttributes(dst: CUstream, src: CUstream) -> CUresult; +} +extern "C" { + pub fn cuStreamGetAttribute( + hStream: CUstream, + attr: CUstreamAttrID, + value_out: *mut CUstreamAttrValue, + ) -> CUresult; +} +extern "C" { + pub fn cuStreamSetAttribute( + hStream: CUstream, + attr: CUstreamAttrID, + value: *const CUstreamAttrValue, + ) -> CUresult; +} extern "C" { pub fn cuEventCreate(phEvent: *mut CUevent, Flags: ::std::os::raw::c_uint) -> CUresult; } @@ -6311,7 +1132,7 @@ extern "C" { phGraphNode: *mut CUgraphNode, hGraph: CUgraph, dependencies: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, nodeParams: *const CUDA_KERNEL_NODE_PARAMS, ) -> CUresult; } @@ -6332,7 +1153,7 @@ extern "C" { phGraphNode: *mut CUgraphNode, hGraph: CUgraph, dependencies: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, copyParams: *const CUDA_MEMCPY3D, ctx: CUcontext, ) -> CUresult; @@ -6354,7 +1175,7 @@ extern "C" { phGraphNode: *mut CUgraphNode, hGraph: CUgraph, dependencies: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, memsetParams: *const CUDA_MEMSET_NODE_PARAMS, ctx: CUcontext, ) -> CUresult; @@ -6376,7 +1197,7 @@ extern "C" { phGraphNode: *mut CUgraphNode, hGraph: CUgraph, dependencies: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, nodeParams: *const CUDA_HOST_NODE_PARAMS, ) -> CUresult; } @@ -6397,7 +1218,7 @@ extern "C" { phGraphNode: *mut CUgraphNode, hGraph: CUgraph, dependencies: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, childGraph: CUgraph, ) -> CUresult; } @@ -6409,7 +1230,7 @@ extern "C" { phGraphNode: *mut CUgraphNode, hGraph: CUgraph, dependencies: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, ) -> CUresult; } extern "C" { @@ -6429,14 +1250,14 @@ extern "C" { pub fn cuGraphGetNodes( hGraph: CUgraph, nodes: *mut CUgraphNode, - numNodes: *mut usize, + numNodes: *mut size_t, ) -> CUresult; } extern "C" { pub fn cuGraphGetRootNodes( hGraph: CUgraph, rootNodes: *mut CUgraphNode, - numRootNodes: *mut usize, + numRootNodes: *mut size_t, ) -> CUresult; } extern "C" { @@ -6444,21 +1265,21 @@ extern "C" { hGraph: CUgraph, from: *mut CUgraphNode, to: *mut CUgraphNode, - numEdges: *mut usize, + numEdges: *mut size_t, ) -> CUresult; } extern "C" { pub fn cuGraphNodeGetDependencies( hNode: CUgraphNode, dependencies: *mut CUgraphNode, - numDependencies: *mut usize, + numDependencies: *mut size_t, ) -> CUresult; } extern "C" { pub fn cuGraphNodeGetDependentNodes( hNode: CUgraphNode, dependentNodes: *mut CUgraphNode, - numDependentNodes: *mut usize, + numDependentNodes: *mut size_t, ) -> CUresult; } extern "C" { @@ -6466,7 +1287,7 @@ extern "C" { hGraph: CUgraph, from: *const CUgraphNode, to: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, ) -> CUresult; } extern "C" { @@ -6474,19 +1295,19 @@ extern "C" { hGraph: CUgraph, from: *const CUgraphNode, to: *const CUgraphNode, - numDependencies: usize, + numDependencies: size_t, ) -> CUresult; } extern "C" { pub fn cuGraphDestroyNode(hNode: CUgraphNode) -> CUresult; } extern "C" { - pub fn cuGraphInstantiate( + pub fn cuGraphInstantiate_v2( phGraphExec: *mut CUgraphExec, hGraph: CUgraph, phErrorNode: *mut CUgraphNode, logBuffer: *mut ::std::os::raw::c_char, - bufferSize: usize, + bufferSize: size_t, ) -> CUresult; } extern "C" { @@ -6536,12 +1357,29 @@ extern "C" { updateResult_out: *mut CUgraphExecUpdateResult, ) -> CUresult; } +extern "C" { + pub fn cuGraphKernelNodeCopyAttributes(dst: CUgraphNode, src: CUgraphNode) -> CUresult; +} +extern "C" { + pub fn cuGraphKernelNodeGetAttribute( + hNode: CUgraphNode, + attr: CUkernelNodeAttrID, + value_out: *mut CUkernelNodeAttrValue, + ) -> CUresult; +} +extern "C" { + pub fn cuGraphKernelNodeSetAttribute( + hNode: CUgraphNode, + attr: CUkernelNodeAttrID, + value: *const CUkernelNodeAttrValue, + ) -> CUresult; +} extern "C" { pub fn cuOccupancyMaxActiveBlocksPerMultiprocessor( numBlocks: *mut ::std::os::raw::c_int, func: CUfunction, blockSize: ::std::os::raw::c_int, - dynamicSMemSize: usize, + dynamicSMemSize: size_t, ) -> CUresult; } extern "C" { @@ -6549,7 +1387,7 @@ extern "C" { numBlocks: *mut ::std::os::raw::c_int, func: CUfunction, blockSize: ::std::os::raw::c_int, - dynamicSMemSize: usize, + dynamicSMemSize: size_t, flags: ::std::os::raw::c_uint, ) -> CUresult; } @@ -6559,7 +1397,7 @@ extern "C" { blockSize: *mut ::std::os::raw::c_int, func: CUfunction, blockSizeToDynamicSMemSize: CUoccupancyB2DSize, - dynamicSMemSize: usize, + dynamicSMemSize: size_t, blockSizeLimit: ::std::os::raw::c_int, ) -> CUresult; } @@ -6569,11 +1407,19 @@ extern "C" { blockSize: *mut ::std::os::raw::c_int, func: CUfunction, blockSizeToDynamicSMemSize: CUoccupancyB2DSize, - dynamicSMemSize: usize, + dynamicSMemSize: size_t, blockSizeLimit: ::std::os::raw::c_int, flags: ::std::os::raw::c_uint, ) -> CUresult; } +extern "C" { + pub fn cuOccupancyAvailableDynamicSMemPerBlock( + dynamicSmemSize: *mut size_t, + func: CUfunction, + numBlocks: ::std::os::raw::c_int, + blockSize: ::std::os::raw::c_int, + ) -> CUresult; +} extern "C" { pub fn cuTexRefSetArray( hTexRef: CUtexref, @@ -6590,10 +1436,10 @@ extern "C" { } extern "C" { pub fn cuTexRefSetAddress_v2( - ByteOffset: *mut usize, + ByteOffset: *mut size_t, hTexRef: CUtexref, dptr: CUdeviceptr, - bytes: usize, + bytes: size_t, ) -> CUresult; } extern "C" { @@ -6601,7 +1447,7 @@ extern "C" { hTexRef: CUtexref, desc: *const CUDA_ARRAY_DESCRIPTOR, dptr: CUdeviceptr, - Pitch: usize, + Pitch: size_t, ) -> CUresult; } extern "C" { @@ -6802,7 +1648,7 @@ extern "C" { extern "C" { pub fn cuGraphicsResourceGetMappedPointer_v2( pDevPtr: *mut CUdeviceptr, - pSize: *mut usize, + pSize: *mut size_t, resource: CUgraphicsResource, ) -> CUresult; } @@ -6832,13 +1678,9 @@ extern "C" { pExportTableId: *const CUuuid, ) -> CUresult; } -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum CUoutput_mode_enum { - CU_OUT_KEY_VALUE_PAIR = 0, - CU_OUT_CSV = 1, +extern "C" { + pub fn cuFuncGetModule(hmod: *mut CUmodule, hfunc: CUfunction) -> CUresult; } -pub use self::CUoutput_mode_enum as CUoutput_mode; extern "C" { pub fn cuProfilerInitialize( configFile: *const ::std::os::raw::c_char, @@ -6852,30 +1694,3 @@ extern "C" { extern "C" { pub fn cuProfilerStop() -> CUresult; } -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaDataType_t { - CUDA_R_16F = 2, - CUDA_C_16F = 6, - CUDA_R_32F = 0, - CUDA_C_32F = 4, - CUDA_R_64F = 1, - CUDA_C_64F = 5, - CUDA_R_8I = 3, - CUDA_C_8I = 7, - CUDA_R_8U = 8, - CUDA_C_8U = 9, - CUDA_R_32I = 10, - CUDA_C_32I = 11, - CUDA_R_32U = 12, - CUDA_C_32U = 13, -} -pub use self::cudaDataType_t as cudaDataType; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum libraryPropertyType_t { - MAJOR_VERSION = 0, - MINOR_VERSION = 1, - PATCH_LEVEL = 2, -} -pub use self::libraryPropertyType_t as libraryPropertyType; diff --git a/cuda-driver-sys/src/lib.rs b/cuda-driver-sys/src/lib.rs index 7ca152c..660dcb4 100644 --- a/cuda-driver-sys/src/lib.rs +++ b/cuda-driver-sys/src/lib.rs @@ -1,4 +1,7 @@ #![allow(non_snake_case, non_upper_case_globals, non_camel_case_types)] + +use cuda_types_sys::*; + include!("cuda.rs"); #[cfg(test)] diff --git a/cuda-gl-interop-sys/Cargo.toml b/cuda-gl-interop-sys/Cargo.toml new file mode 100644 index 0000000..f8d80d9 --- /dev/null +++ b/cuda-gl-interop-sys/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "cuda-gl-interop-sys" +version = "0.4.0-alpha.1" +authors = ["Raniz "] +edition = "2018" + +build = "build.rs" + +description = "Rust binding to CUDA Runtime OpenGL Interop APIs" +documentation = "https://docs.rs/cuda-gl-interop-sys/" +repository = "https://github.com/rust-cuda/cuda-sys" +keywords = ["GPGPU", "CUDA", "ffi"] +license = "MIT/Apache-2.0" +readme = "../README.md" +categories = [] + +[build-dependencies.cuda-config] +path = "../cuda-config" +version = "0.1.0" + +[dependencies.gl] +version = "~0.14" + +[dependencies.cuda-types-sys] +path = "../cuda-types-sys" diff --git a/cuda-gl-interop-sys/bindgen.sh b/cuda-gl-interop-sys/bindgen.sh new file mode 100755 index 0000000..17b37aa --- /dev/null +++ b/cuda-gl-interop-sys/bindgen.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -exu + +bindgen \ + --blacklist-type="^.*" \ + --whitelist-function="^cuda.*GL.*" \ + --default-enum-style=rust \ + --no-doc-comments \ + --with-derive-default \ + --with-derive-eq \ + --with-derive-hash \ + --with-derive-ord \ + /opt/cuda/include/cuda_gl_interop.h \ + > src/cuda_gl_interop.rs diff --git a/cuda-gl-interop-sys/build.rs b/cuda-gl-interop-sys/build.rs new file mode 100644 index 0000000..73d0b26 --- /dev/null +++ b/cuda-gl-interop-sys/build.rs @@ -0,0 +1,18 @@ +use cuda_config::*; + +fn main() { + if cfg!(target_os = "windows") { + println!( + "cargo:rustc-link-search=native={}", + find_cuda_windows().display() + ); + } else { + for path in find_cuda() { + println!("cargo:rustc-link-search=native={}", path.display()); + } + }; + + println!("cargo:rustc-link-lib=dylib=cudart"); + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-env-changed=CUDA_LIBRARY_PATH"); +} diff --git a/cuda-gl-interop-sys/src/cuda_gl_interop.rs b/cuda-gl-interop-sys/src/cuda_gl_interop.rs new file mode 100644 index 0000000..f79c1df --- /dev/null +++ b/cuda-gl-interop-sys/src/cuda_gl_interop.rs @@ -0,0 +1,59 @@ +/* automatically generated by rust-bindgen */ + +extern "C" { + pub fn cudaGLGetDevices( + pCudaDeviceCount: *mut ::std::os::raw::c_uint, + pCudaDevices: *mut ::std::os::raw::c_int, + cudaDeviceCount: ::std::os::raw::c_uint, + deviceList: cudaGLDeviceList, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsGLRegisterImage( + resource: *mut *mut cudaGraphicsResource, + image: GLuint, + target: GLenum, + flags: ::std::os::raw::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsGLRegisterBuffer( + resource: *mut *mut cudaGraphicsResource, + buffer: GLuint, + flags: ::std::os::raw::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGLSetGLDevice(device: ::std::os::raw::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaGLRegisterBufferObject(bufObj: GLuint) -> cudaError_t; +} +extern "C" { + pub fn cudaGLMapBufferObject( + devPtr: *mut *mut ::std::os::raw::c_void, + bufObj: GLuint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGLUnmapBufferObject(bufObj: GLuint) -> cudaError_t; +} +extern "C" { + pub fn cudaGLUnregisterBufferObject(bufObj: GLuint) -> cudaError_t; +} +extern "C" { + pub fn cudaGLSetBufferObjectMapFlags( + bufObj: GLuint, + flags: ::std::os::raw::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGLMapBufferObjectAsync( + devPtr: *mut *mut ::std::os::raw::c_void, + bufObj: GLuint, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGLUnmapBufferObjectAsync(bufObj: GLuint, stream: cudaStream_t) -> cudaError_t; +} diff --git a/cuda-gl-interop-sys/src/lib.rs b/cuda-gl-interop-sys/src/lib.rs new file mode 100644 index 0000000..7a8c65b --- /dev/null +++ b/cuda-gl-interop-sys/src/lib.rs @@ -0,0 +1,6 @@ +#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types)] + +use cuda_types_sys::*; +use gl::types::*; + +include!("cuda_gl_interop.rs"); diff --git a/cuda-runtime-sys/Cargo.toml b/cuda-runtime-sys/Cargo.toml index 03f9de6..f152279 100644 --- a/cuda-runtime-sys/Cargo.toml +++ b/cuda-runtime-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cuda-runtime-sys" -version = "0.3.0-alpha.1" +version = "0.4.0-alpha.1" authors = ["Toshiki Teramura "] edition = "2018" @@ -18,3 +18,6 @@ categories = [] [build-dependencies.cuda-config] path = "../cuda-config" version = "0.1.0" + +[dependencies.cuda-types-sys] +path = "../cuda-types-sys" diff --git a/cuda-runtime-sys/bindgen.sh b/cuda-runtime-sys/bindgen.sh index e2e7d1e..2455da1 100755 --- a/cuda-runtime-sys/bindgen.sh +++ b/cuda-runtime-sys/bindgen.sh @@ -2,9 +2,7 @@ set -exu bindgen \ - --whitelist-type="^cuda.*" \ - --whitelist-type="^surfaceReference" \ - --whitelist-type="^textureReference" \ + --blacklist-type="^.*" \ --whitelist-var="^cuda.*" \ --whitelist-function="^cuda.*" \ --default-enum-style=rust \ diff --git a/cuda-runtime-sys/src/cuda_runtime.rs b/cuda-runtime-sys/src/cuda_runtime.rs index c87fc04..302b9ec 100644 --- a/cuda-runtime-sys/src/cuda_runtime.rs +++ b/cuda-runtime-sys/src/cuda_runtime.rs @@ -57,4580 +57,6 @@ pub const cudaTextureTypeCubemap: u32 = 12; pub const cudaTextureType1DLayered: u32 = 241; pub const cudaTextureType2DLayered: u32 = 242; pub const cudaTextureTypeCubemapLayered: u32 = 252; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaRoundMode { - cudaRoundNearest = 0, - cudaRoundZero = 1, - cudaRoundPosInf = 2, - cudaRoundMinInf = 3, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct dim3 { - pub x: ::std::os::raw::c_uint, - pub y: ::std::os::raw::c_uint, - pub z: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_dim3() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(dim3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(dim3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 8usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) - ); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaError { - cudaSuccess = 0, - cudaErrorInvalidValue = 1, - cudaErrorMemoryAllocation = 2, - cudaErrorInitializationError = 3, - cudaErrorCudartUnloading = 4, - cudaErrorProfilerDisabled = 5, - cudaErrorProfilerNotInitialized = 6, - cudaErrorProfilerAlreadyStarted = 7, - cudaErrorProfilerAlreadyStopped = 8, - cudaErrorInvalidConfiguration = 9, - cudaErrorInvalidPitchValue = 12, - cudaErrorInvalidSymbol = 13, - cudaErrorInvalidHostPointer = 16, - cudaErrorInvalidDevicePointer = 17, - cudaErrorInvalidTexture = 18, - cudaErrorInvalidTextureBinding = 19, - cudaErrorInvalidChannelDescriptor = 20, - cudaErrorInvalidMemcpyDirection = 21, - cudaErrorAddressOfConstant = 22, - cudaErrorTextureFetchFailed = 23, - cudaErrorTextureNotBound = 24, - cudaErrorSynchronizationError = 25, - cudaErrorInvalidFilterSetting = 26, - cudaErrorInvalidNormSetting = 27, - cudaErrorMixedDeviceExecution = 28, - cudaErrorNotYetImplemented = 31, - cudaErrorMemoryValueTooLarge = 32, - cudaErrorInsufficientDriver = 35, - cudaErrorInvalidSurface = 37, - cudaErrorDuplicateVariableName = 43, - cudaErrorDuplicateTextureName = 44, - cudaErrorDuplicateSurfaceName = 45, - cudaErrorDevicesUnavailable = 46, - cudaErrorIncompatibleDriverContext = 49, - cudaErrorMissingConfiguration = 52, - cudaErrorPriorLaunchFailure = 53, - cudaErrorLaunchMaxDepthExceeded = 65, - cudaErrorLaunchFileScopedTex = 66, - cudaErrorLaunchFileScopedSurf = 67, - cudaErrorSyncDepthExceeded = 68, - cudaErrorLaunchPendingCountExceeded = 69, - cudaErrorInvalidDeviceFunction = 98, - cudaErrorNoDevice = 100, - cudaErrorInvalidDevice = 101, - cudaErrorStartupFailure = 127, - cudaErrorInvalidKernelImage = 200, - cudaErrorDeviceUninitialized = 201, - cudaErrorMapBufferObjectFailed = 205, - cudaErrorUnmapBufferObjectFailed = 206, - cudaErrorArrayIsMapped = 207, - cudaErrorAlreadyMapped = 208, - cudaErrorNoKernelImageForDevice = 209, - cudaErrorAlreadyAcquired = 210, - cudaErrorNotMapped = 211, - cudaErrorNotMappedAsArray = 212, - cudaErrorNotMappedAsPointer = 213, - cudaErrorECCUncorrectable = 214, - cudaErrorUnsupportedLimit = 215, - cudaErrorDeviceAlreadyInUse = 216, - cudaErrorPeerAccessUnsupported = 217, - cudaErrorInvalidPtx = 218, - cudaErrorInvalidGraphicsContext = 219, - cudaErrorNvlinkUncorrectable = 220, - cudaErrorJitCompilerNotFound = 221, - cudaErrorInvalidSource = 300, - cudaErrorFileNotFound = 301, - cudaErrorSharedObjectSymbolNotFound = 302, - cudaErrorSharedObjectInitFailed = 303, - cudaErrorOperatingSystem = 304, - cudaErrorInvalidResourceHandle = 400, - cudaErrorIllegalState = 401, - cudaErrorSymbolNotFound = 500, - cudaErrorNotReady = 600, - cudaErrorIllegalAddress = 700, - cudaErrorLaunchOutOfResources = 701, - cudaErrorLaunchTimeout = 702, - cudaErrorLaunchIncompatibleTexturing = 703, - cudaErrorPeerAccessAlreadyEnabled = 704, - cudaErrorPeerAccessNotEnabled = 705, - cudaErrorSetOnActiveProcess = 708, - cudaErrorContextIsDestroyed = 709, - cudaErrorAssert = 710, - cudaErrorTooManyPeers = 711, - cudaErrorHostMemoryAlreadyRegistered = 712, - cudaErrorHostMemoryNotRegistered = 713, - cudaErrorHardwareStackError = 714, - cudaErrorIllegalInstruction = 715, - cudaErrorMisalignedAddress = 716, - cudaErrorInvalidAddressSpace = 717, - cudaErrorInvalidPc = 718, - cudaErrorLaunchFailure = 719, - cudaErrorCooperativeLaunchTooLarge = 720, - cudaErrorNotPermitted = 800, - cudaErrorNotSupported = 801, - cudaErrorSystemNotReady = 802, - cudaErrorSystemDriverMismatch = 803, - cudaErrorCompatNotSupportedOnDevice = 804, - cudaErrorStreamCaptureUnsupported = 900, - cudaErrorStreamCaptureInvalidated = 901, - cudaErrorStreamCaptureMerge = 902, - cudaErrorStreamCaptureUnmatched = 903, - cudaErrorStreamCaptureUnjoined = 904, - cudaErrorStreamCaptureIsolation = 905, - cudaErrorStreamCaptureImplicit = 906, - cudaErrorCapturedEvent = 907, - cudaErrorStreamCaptureWrongThread = 908, - cudaErrorTimeout = 909, - cudaErrorGraphExecUpdateFailure = 910, - cudaErrorUnknown = 999, - cudaErrorApiFailureBase = 10000, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaChannelFormatKind { - cudaChannelFormatKindSigned = 0, - cudaChannelFormatKindUnsigned = 1, - cudaChannelFormatKindFloat = 2, - cudaChannelFormatKindNone = 3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaChannelFormatDesc { - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub z: ::std::os::raw::c_int, - pub w: ::std::os::raw::c_int, - pub f: cudaChannelFormatKind, -} -#[test] -fn bindgen_test_layout_cudaChannelFormatDesc() { - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(cudaChannelFormatDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cudaChannelFormatDesc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(z) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(f) - ) - ); -} -impl Default for cudaChannelFormatDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaArray { - _unused: [u8; 0], -} -pub type cudaArray_t = *mut cudaArray; -pub type cudaArray_const_t = *const cudaArray; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaMipmappedArray { - _unused: [u8; 0], -} -pub type cudaMipmappedArray_t = *mut cudaMipmappedArray; -pub type cudaMipmappedArray_const_t = *const cudaMipmappedArray; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaMemoryType { - cudaMemoryTypeUnregistered = 0, - cudaMemoryTypeHost = 1, - cudaMemoryTypeDevice = 2, - cudaMemoryTypeManaged = 3, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaMemcpyKind { - cudaMemcpyHostToHost = 0, - cudaMemcpyHostToDevice = 1, - cudaMemcpyDeviceToHost = 2, - cudaMemcpyDeviceToDevice = 3, - cudaMemcpyDefault = 4, -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaPitchedPtr { - pub ptr: *mut ::std::os::raw::c_void, - pub pitch: usize, - pub xsize: usize, - pub ysize: usize, -} -#[test] -fn bindgen_test_layout_cudaPitchedPtr() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaPitchedPtr)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaPitchedPtr)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xsize as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(xsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ysize as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ysize) - ) - ); -} -impl Default for cudaPitchedPtr { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExtent { - pub width: usize, - pub height: usize, - pub depth: usize, -} -#[test] -fn bindgen_test_layout_cudaExtent() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExtent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExtent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(depth) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaPos { - pub x: usize, - pub y: usize, - pub z: usize, -} -#[test] -fn bindgen_test_layout_cudaPos() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaPos)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaPos)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(z) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaMemcpy3DParms { - pub srcArray: cudaArray_t, - pub srcPos: cudaPos, - pub srcPtr: cudaPitchedPtr, - pub dstArray: cudaArray_t, - pub dstPos: cudaPos, - pub dstPtr: cudaPitchedPtr, - pub extent: cudaExtent, - pub kind: cudaMemcpyKind, -} -#[test] -fn bindgen_test_layout_cudaMemcpy3DParms() { - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(cudaMemcpy3DParms)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaMemcpy3DParms)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(extent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).kind as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(kind) - ) - ); -} -impl Default for cudaMemcpy3DParms { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaMemcpy3DPeerParms { - pub srcArray: cudaArray_t, - pub srcPos: cudaPos, - pub srcPtr: cudaPitchedPtr, - pub srcDevice: ::std::os::raw::c_int, - pub dstArray: cudaArray_t, - pub dstPos: cudaPos, - pub dstPtr: cudaPitchedPtr, - pub dstDevice: ::std::os::raw::c_int, - pub extent: cudaExtent, -} -#[test] -fn bindgen_test_layout_cudaMemcpy3DPeerParms() { - assert_eq!( - ::std::mem::size_of::(), - 168usize, - concat!("Size of: ", stringify!(cudaMemcpy3DPeerParms)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(extent) - ) - ); -} -impl Default for cudaMemcpy3DPeerParms { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaMemsetParams { - pub dst: *mut ::std::os::raw::c_void, - pub pitch: usize, - pub value: ::std::os::raw::c_uint, - pub elementSize: ::std::os::raw::c_uint, - pub width: usize, - pub height: usize, -} -#[test] -fn bindgen_test_layout_cudaMemsetParams() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaMemsetParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaMemsetParams)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dst as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(dst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elementSize as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(elementSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(height) - ) - ); -} -impl Default for cudaMemsetParams { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type cudaHostFn_t = - ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaHostNodeParams { - pub fn_: cudaHostFn_t, - pub userData: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_cudaHostNodeParams() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(cudaHostNodeParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaHostNodeParams)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).userData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(userData) - ) - ); -} -impl Default for cudaHostNodeParams { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaStreamCaptureStatus { - cudaStreamCaptureStatusNone = 0, - cudaStreamCaptureStatusActive = 1, - cudaStreamCaptureStatusInvalidated = 2, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaStreamCaptureMode { - cudaStreamCaptureModeGlobal = 0, - cudaStreamCaptureModeThreadLocal = 1, - cudaStreamCaptureModeRelaxed = 2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaGraphicsResource { - _unused: [u8; 0], -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaGraphicsRegisterFlags { - cudaGraphicsRegisterFlagsNone = 0, - cudaGraphicsRegisterFlagsReadOnly = 1, - cudaGraphicsRegisterFlagsWriteDiscard = 2, - cudaGraphicsRegisterFlagsSurfaceLoadStore = 4, - cudaGraphicsRegisterFlagsTextureGather = 8, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaGraphicsMapFlags { - cudaGraphicsMapFlagsNone = 0, - cudaGraphicsMapFlagsReadOnly = 1, - cudaGraphicsMapFlagsWriteDiscard = 2, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaGraphicsCubeFace { - cudaGraphicsCubeFacePositiveX = 0, - cudaGraphicsCubeFaceNegativeX = 1, - cudaGraphicsCubeFacePositiveY = 2, - cudaGraphicsCubeFaceNegativeY = 3, - cudaGraphicsCubeFacePositiveZ = 4, - cudaGraphicsCubeFaceNegativeZ = 5, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaResourceType { - cudaResourceTypeArray = 0, - cudaResourceTypeMipmappedArray = 1, - cudaResourceTypeLinear = 2, - cudaResourceTypePitch2D = 3, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaResourceViewFormat { - cudaResViewFormatNone = 0, - cudaResViewFormatUnsignedChar1 = 1, - cudaResViewFormatUnsignedChar2 = 2, - cudaResViewFormatUnsignedChar4 = 3, - cudaResViewFormatSignedChar1 = 4, - cudaResViewFormatSignedChar2 = 5, - cudaResViewFormatSignedChar4 = 6, - cudaResViewFormatUnsignedShort1 = 7, - cudaResViewFormatUnsignedShort2 = 8, - cudaResViewFormatUnsignedShort4 = 9, - cudaResViewFormatSignedShort1 = 10, - cudaResViewFormatSignedShort2 = 11, - cudaResViewFormatSignedShort4 = 12, - cudaResViewFormatUnsignedInt1 = 13, - cudaResViewFormatUnsignedInt2 = 14, - cudaResViewFormatUnsignedInt4 = 15, - cudaResViewFormatSignedInt1 = 16, - cudaResViewFormatSignedInt2 = 17, - cudaResViewFormatSignedInt4 = 18, - cudaResViewFormatHalf1 = 19, - cudaResViewFormatHalf2 = 20, - cudaResViewFormatHalf4 = 21, - cudaResViewFormatFloat1 = 22, - cudaResViewFormatFloat2 = 23, - cudaResViewFormatFloat4 = 24, - cudaResViewFormatUnsignedBlockCompressed1 = 25, - cudaResViewFormatUnsignedBlockCompressed2 = 26, - cudaResViewFormatUnsignedBlockCompressed3 = 27, - cudaResViewFormatUnsignedBlockCompressed4 = 28, - cudaResViewFormatSignedBlockCompressed4 = 29, - cudaResViewFormatUnsignedBlockCompressed5 = 30, - cudaResViewFormatSignedBlockCompressed5 = 31, - cudaResViewFormatUnsignedBlockCompressed6H = 32, - cudaResViewFormatSignedBlockCompressed6H = 33, - cudaResViewFormatUnsignedBlockCompressed7 = 34, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaResourceDesc { - pub resType: cudaResourceType, - pub res: cudaResourceDesc__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaResourceDesc__bindgen_ty_1 { - pub array: cudaResourceDesc__bindgen_ty_1__bindgen_ty_1, - pub mipmap: cudaResourceDesc__bindgen_ty_1__bindgen_ty_2, - pub linear: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, - pub pitch2D: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, - _bindgen_union_align: [u64; 7usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { - pub array: cudaArray_t, -} -#[test] -fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - 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) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(array) - ) - ); -} -impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { - pub mipmap: cudaMipmappedArray_t, -} -#[test] -fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - 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) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(mipmap) - ) - ); -} -impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { - pub devPtr: *mut ::std::os::raw::c_void, - pub desc: cudaChannelFormatDesc, - pub sizeInBytes: usize, -} -#[test] -fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - 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) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).desc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sizeInBytes - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(sizeInBytes) - ) - ); -} -impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { - pub devPtr: *mut ::std::os::raw::c_void, - pub desc: cudaChannelFormatDesc, - pub width: usize, - pub height: usize, - pub pitchInBytes: usize, -} -#[test] -fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - 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) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).desc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitchInBytes - as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(pitchInBytes) - ) - ); -} -impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(mipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linear as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(linear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitch2D as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(pitch2D) - ) - ); -} -impl Default for cudaResourceDesc__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaResourceDesc() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaResourceDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaResourceDesc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).resType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(resType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).res as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(res) - ) - ); -} -impl Default for cudaResourceDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaResourceViewDesc { - pub format: cudaResourceViewFormat, - pub width: usize, - pub height: usize, - pub depth: usize, - pub firstMipmapLevel: ::std::os::raw::c_uint, - pub lastMipmapLevel: ::std::os::raw::c_uint, - pub firstLayer: ::std::os::raw::c_uint, - pub lastLayer: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_cudaResourceViewDesc() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(cudaResourceViewDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaResourceViewDesc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).firstMipmapLevel as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstMipmapLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).lastMipmapLevel as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastMipmapLevel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).firstLayer as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstLayer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lastLayer as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastLayer) - ) - ); -} -impl Default for cudaResourceViewDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaPointerAttributes { - pub memoryType: cudaMemoryType, - pub type_: cudaMemoryType, - pub device: ::std::os::raw::c_int, - pub devicePointer: *mut ::std::os::raw::c_void, - pub hostPointer: *mut ::std::os::raw::c_void, - pub isManaged: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_cudaPointerAttributes() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaPointerAttributes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaPointerAttributes)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).memoryType as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(memoryType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).device as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(device) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devicePointer as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(devicePointer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hostPointer as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(hostPointer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isManaged as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(isManaged) - ) - ); -} -impl Default for cudaPointerAttributes { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaFuncAttributes { - pub sharedSizeBytes: usize, - pub constSizeBytes: usize, - pub localSizeBytes: usize, - pub maxThreadsPerBlock: ::std::os::raw::c_int, - pub numRegs: ::std::os::raw::c_int, - pub ptxVersion: ::std::os::raw::c_int, - pub binaryVersion: ::std::os::raw::c_int, - pub cacheModeCA: ::std::os::raw::c_int, - pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int, - pub preferredShmemCarveout: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_cudaFuncAttributes() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaFuncAttributes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaFuncAttributes)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedSizeBytes as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(sharedSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).constSizeBytes as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(constSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).localSizeBytes as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(localSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).numRegs as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(numRegs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ptxVersion as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(ptxVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).binaryVersion as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(binaryVersion) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cacheModeCA as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(cacheModeCA) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxDynamicSharedSizeBytes as *const _ - as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxDynamicSharedSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).preferredShmemCarveout as *const _ - as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(preferredShmemCarveout) - ) - ); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaFuncAttribute { - cudaFuncAttributeMaxDynamicSharedMemorySize = 8, - cudaFuncAttributePreferredSharedMemoryCarveout = 9, - cudaFuncAttributeMax = 10, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaFuncCache { - cudaFuncCachePreferNone = 0, - cudaFuncCachePreferShared = 1, - cudaFuncCachePreferL1 = 2, - cudaFuncCachePreferEqual = 3, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaSharedMemConfig { - cudaSharedMemBankSizeDefault = 0, - cudaSharedMemBankSizeFourByte = 1, - cudaSharedMemBankSizeEightByte = 2, -} -#[repr(i32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaSharedCarveout { - cudaSharedmemCarveoutDefault = -1, - cudaSharedmemCarveoutMaxShared = 100, - cudaSharedmemCarveoutMaxL1 = 0, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaComputeMode { - cudaComputeModeDefault = 0, - cudaComputeModeExclusive = 1, - cudaComputeModeProhibited = 2, - cudaComputeModeExclusiveProcess = 3, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaLimit { - cudaLimitStackSize = 0, - cudaLimitPrintfFifoSize = 1, - cudaLimitMallocHeapSize = 2, - cudaLimitDevRuntimeSyncDepth = 3, - cudaLimitDevRuntimePendingLaunchCount = 4, - cudaLimitMaxL2FetchGranularity = 5, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaMemoryAdvise { - cudaMemAdviseSetReadMostly = 1, - cudaMemAdviseUnsetReadMostly = 2, - cudaMemAdviseSetPreferredLocation = 3, - cudaMemAdviseUnsetPreferredLocation = 4, - cudaMemAdviseSetAccessedBy = 5, - cudaMemAdviseUnsetAccessedBy = 6, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaMemRangeAttribute { - cudaMemRangeAttributeReadMostly = 1, - cudaMemRangeAttributePreferredLocation = 2, - cudaMemRangeAttributeAccessedBy = 3, - cudaMemRangeAttributeLastPrefetchLocation = 4, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaOutputMode { - cudaKeyValuePair = 0, - cudaCSV = 1, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaDeviceAttr { - cudaDevAttrMaxThreadsPerBlock = 1, - cudaDevAttrMaxBlockDimX = 2, - cudaDevAttrMaxBlockDimY = 3, - cudaDevAttrMaxBlockDimZ = 4, - cudaDevAttrMaxGridDimX = 5, - cudaDevAttrMaxGridDimY = 6, - cudaDevAttrMaxGridDimZ = 7, - cudaDevAttrMaxSharedMemoryPerBlock = 8, - cudaDevAttrTotalConstantMemory = 9, - cudaDevAttrWarpSize = 10, - cudaDevAttrMaxPitch = 11, - cudaDevAttrMaxRegistersPerBlock = 12, - cudaDevAttrClockRate = 13, - cudaDevAttrTextureAlignment = 14, - cudaDevAttrGpuOverlap = 15, - cudaDevAttrMultiProcessorCount = 16, - cudaDevAttrKernelExecTimeout = 17, - cudaDevAttrIntegrated = 18, - cudaDevAttrCanMapHostMemory = 19, - cudaDevAttrComputeMode = 20, - cudaDevAttrMaxTexture1DWidth = 21, - cudaDevAttrMaxTexture2DWidth = 22, - cudaDevAttrMaxTexture2DHeight = 23, - cudaDevAttrMaxTexture3DWidth = 24, - cudaDevAttrMaxTexture3DHeight = 25, - cudaDevAttrMaxTexture3DDepth = 26, - cudaDevAttrMaxTexture2DLayeredWidth = 27, - cudaDevAttrMaxTexture2DLayeredHeight = 28, - cudaDevAttrMaxTexture2DLayeredLayers = 29, - cudaDevAttrSurfaceAlignment = 30, - cudaDevAttrConcurrentKernels = 31, - cudaDevAttrEccEnabled = 32, - cudaDevAttrPciBusId = 33, - cudaDevAttrPciDeviceId = 34, - cudaDevAttrTccDriver = 35, - cudaDevAttrMemoryClockRate = 36, - cudaDevAttrGlobalMemoryBusWidth = 37, - cudaDevAttrL2CacheSize = 38, - cudaDevAttrMaxThreadsPerMultiProcessor = 39, - cudaDevAttrAsyncEngineCount = 40, - cudaDevAttrUnifiedAddressing = 41, - cudaDevAttrMaxTexture1DLayeredWidth = 42, - cudaDevAttrMaxTexture1DLayeredLayers = 43, - cudaDevAttrMaxTexture2DGatherWidth = 45, - cudaDevAttrMaxTexture2DGatherHeight = 46, - cudaDevAttrMaxTexture3DWidthAlt = 47, - cudaDevAttrMaxTexture3DHeightAlt = 48, - cudaDevAttrMaxTexture3DDepthAlt = 49, - cudaDevAttrPciDomainId = 50, - cudaDevAttrTexturePitchAlignment = 51, - cudaDevAttrMaxTextureCubemapWidth = 52, - cudaDevAttrMaxTextureCubemapLayeredWidth = 53, - cudaDevAttrMaxTextureCubemapLayeredLayers = 54, - cudaDevAttrMaxSurface1DWidth = 55, - cudaDevAttrMaxSurface2DWidth = 56, - cudaDevAttrMaxSurface2DHeight = 57, - cudaDevAttrMaxSurface3DWidth = 58, - cudaDevAttrMaxSurface3DHeight = 59, - cudaDevAttrMaxSurface3DDepth = 60, - cudaDevAttrMaxSurface1DLayeredWidth = 61, - cudaDevAttrMaxSurface1DLayeredLayers = 62, - cudaDevAttrMaxSurface2DLayeredWidth = 63, - cudaDevAttrMaxSurface2DLayeredHeight = 64, - cudaDevAttrMaxSurface2DLayeredLayers = 65, - cudaDevAttrMaxSurfaceCubemapWidth = 66, - cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67, - cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68, - cudaDevAttrMaxTexture1DLinearWidth = 69, - cudaDevAttrMaxTexture2DLinearWidth = 70, - cudaDevAttrMaxTexture2DLinearHeight = 71, - cudaDevAttrMaxTexture2DLinearPitch = 72, - cudaDevAttrMaxTexture2DMipmappedWidth = 73, - cudaDevAttrMaxTexture2DMipmappedHeight = 74, - cudaDevAttrComputeCapabilityMajor = 75, - cudaDevAttrComputeCapabilityMinor = 76, - cudaDevAttrMaxTexture1DMipmappedWidth = 77, - cudaDevAttrStreamPrioritiesSupported = 78, - cudaDevAttrGlobalL1CacheSupported = 79, - cudaDevAttrLocalL1CacheSupported = 80, - cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81, - cudaDevAttrMaxRegistersPerMultiprocessor = 82, - cudaDevAttrManagedMemory = 83, - cudaDevAttrIsMultiGpuBoard = 84, - cudaDevAttrMultiGpuBoardGroupID = 85, - cudaDevAttrHostNativeAtomicSupported = 86, - cudaDevAttrSingleToDoublePrecisionPerfRatio = 87, - cudaDevAttrPageableMemoryAccess = 88, - cudaDevAttrConcurrentManagedAccess = 89, - cudaDevAttrComputePreemptionSupported = 90, - cudaDevAttrCanUseHostPointerForRegisteredMem = 91, - cudaDevAttrReserved92 = 92, - cudaDevAttrReserved93 = 93, - cudaDevAttrReserved94 = 94, - cudaDevAttrCooperativeLaunch = 95, - cudaDevAttrCooperativeMultiDeviceLaunch = 96, - cudaDevAttrMaxSharedMemoryPerBlockOptin = 97, - cudaDevAttrCanFlushRemoteWrites = 98, - cudaDevAttrHostRegisterSupported = 99, - cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100, - cudaDevAttrDirectManagedMemAccessFromHost = 101, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaDeviceP2PAttr { - cudaDevP2PAttrPerformanceRank = 1, - cudaDevP2PAttrAccessSupported = 2, - cudaDevP2PAttrNativeAtomicSupported = 3, - cudaDevP2PAttrCudaArrayAccessSupported = 4, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct CUuuid_st { - pub bytes: [::std::os::raw::c_char; 16usize], -} -#[test] -fn bindgen_test_layout_CUuuid_st() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CUuuid_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CUuuid_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUuuid_st), - "::", - stringify!(bytes) - ) - ); -} -pub type cudaUUID_t = CUuuid_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaDeviceProp { - pub name: [::std::os::raw::c_char; 256usize], - pub uuid: cudaUUID_t, - pub luid: [::std::os::raw::c_char; 8usize], - pub luidDeviceNodeMask: ::std::os::raw::c_uint, - pub totalGlobalMem: usize, - pub sharedMemPerBlock: usize, - pub regsPerBlock: ::std::os::raw::c_int, - pub warpSize: ::std::os::raw::c_int, - pub memPitch: usize, - pub maxThreadsPerBlock: ::std::os::raw::c_int, - pub maxThreadsDim: [::std::os::raw::c_int; 3usize], - pub maxGridSize: [::std::os::raw::c_int; 3usize], - pub clockRate: ::std::os::raw::c_int, - pub totalConstMem: usize, - pub major: ::std::os::raw::c_int, - pub minor: ::std::os::raw::c_int, - pub textureAlignment: usize, - pub texturePitchAlignment: usize, - pub deviceOverlap: ::std::os::raw::c_int, - pub multiProcessorCount: ::std::os::raw::c_int, - pub kernelExecTimeoutEnabled: ::std::os::raw::c_int, - pub integrated: ::std::os::raw::c_int, - pub canMapHostMemory: ::std::os::raw::c_int, - pub computeMode: ::std::os::raw::c_int, - pub maxTexture1D: ::std::os::raw::c_int, - pub maxTexture1DMipmap: ::std::os::raw::c_int, - pub maxTexture1DLinear: ::std::os::raw::c_int, - pub maxTexture2D: [::std::os::raw::c_int; 2usize], - pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize], - pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize], - pub maxTexture2DGather: [::std::os::raw::c_int; 2usize], - pub maxTexture3D: [::std::os::raw::c_int; 3usize], - pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize], - pub maxTextureCubemap: ::std::os::raw::c_int, - pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize], - pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize], - pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize], - pub maxSurface1D: ::std::os::raw::c_int, - pub maxSurface2D: [::std::os::raw::c_int; 2usize], - pub maxSurface3D: [::std::os::raw::c_int; 3usize], - pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize], - pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize], - pub maxSurfaceCubemap: ::std::os::raw::c_int, - pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize], - pub surfaceAlignment: usize, - pub concurrentKernels: ::std::os::raw::c_int, - pub ECCEnabled: ::std::os::raw::c_int, - pub pciBusID: ::std::os::raw::c_int, - pub pciDeviceID: ::std::os::raw::c_int, - pub pciDomainID: ::std::os::raw::c_int, - pub tccDriver: ::std::os::raw::c_int, - pub asyncEngineCount: ::std::os::raw::c_int, - pub unifiedAddressing: ::std::os::raw::c_int, - pub memoryClockRate: ::std::os::raw::c_int, - pub memoryBusWidth: ::std::os::raw::c_int, - pub l2CacheSize: ::std::os::raw::c_int, - pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int, - pub streamPrioritiesSupported: ::std::os::raw::c_int, - pub globalL1CacheSupported: ::std::os::raw::c_int, - pub localL1CacheSupported: ::std::os::raw::c_int, - pub sharedMemPerMultiprocessor: usize, - pub regsPerMultiprocessor: ::std::os::raw::c_int, - pub managedMemory: ::std::os::raw::c_int, - pub isMultiGpuBoard: ::std::os::raw::c_int, - pub multiGpuBoardGroupID: ::std::os::raw::c_int, - pub hostNativeAtomicSupported: ::std::os::raw::c_int, - pub singleToDoublePrecisionPerfRatio: ::std::os::raw::c_int, - pub pageableMemoryAccess: ::std::os::raw::c_int, - pub concurrentManagedAccess: ::std::os::raw::c_int, - pub computePreemptionSupported: ::std::os::raw::c_int, - pub canUseHostPointerForRegisteredMem: ::std::os::raw::c_int, - pub cooperativeLaunch: ::std::os::raw::c_int, - pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int, - pub sharedMemPerBlockOptin: usize, - pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int, - pub directManagedMemAccessFromHost: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_cudaDeviceProp() { - assert_eq!( - ::std::mem::size_of::(), - 712usize, - concat!("Size of: ", stringify!(cudaDeviceProp)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaDeviceProp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uuid as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).luid as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luid) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luidDeviceNodeMask as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luidDeviceNodeMask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).totalGlobalMem as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalGlobalMem) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerBlock as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regsPerBlock as *const _ as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).warpSize as *const _ as usize }, - 308usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(warpSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memPitch as *const _ as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memPitch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize - }, - 320usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxThreadsDim as *const _ as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxGridSize as *const _ as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxGridSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clockRate as *const _ as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(clockRate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).totalConstMem as *const _ as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalConstMem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 364usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(minor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).textureAlignment as *const _ as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(textureAlignment) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).texturePitchAlignment as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(texturePitchAlignment) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).deviceOverlap as *const _ as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(deviceOverlap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).multiProcessorCount as *const _ as usize - }, - 388usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiProcessorCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelExecTimeoutEnabled as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(kernelExecTimeoutEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).integrated as *const _ as usize }, - 396usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(integrated) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).canMapHostMemory as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canMapHostMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).computeMode as *const _ as usize }, - 404usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computeMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture1D as *const _ as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DMipmap as *const _ as usize - }, - 412usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DMipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DLinear as *const _ as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLinear) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture2D as *const _ as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DMipmap as *const _ as usize - }, - 428usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DMipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DLinear as *const _ as usize - }, - 436usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLinear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DGather as *const _ as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DGather) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture3D as *const _ as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture3DAlt as *const _ as usize }, - 468usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3DAlt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTextureCubemap as *const _ as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DLayered as *const _ as usize - }, - 484usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DLayered as *const _ as usize - }, - 492usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTextureCubemapLayered as *const _ as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemapLayered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface1D as *const _ as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface2D as *const _ as usize }, - 516usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface3D as *const _ as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface3D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurface1DLayered as *const _ as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurface2DLayered as *const _ as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurfaceCubemap as *const _ as usize - }, - 556usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurfaceCubemapLayered as *const _ as usize - }, - 560usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemapLayered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).surfaceAlignment as *const _ as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(surfaceAlignment) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).concurrentKernels as *const _ as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentKernels) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ECCEnabled as *const _ as usize }, - 580usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(ECCEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciBusID as *const _ as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciBusID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciDeviceID as *const _ as usize }, - 588usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDeviceID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciDomainID as *const _ as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDomainID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tccDriver as *const _ as usize }, - 596usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(tccDriver) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).asyncEngineCount as *const _ as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(asyncEngineCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).unifiedAddressing as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(unifiedAddressing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memoryClockRate as *const _ as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryClockRate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memoryBusWidth as *const _ as usize }, - 612usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryBusWidth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l2CacheSize as *const _ as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(l2CacheSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerMultiProcessor as *const _ - as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerMultiProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).streamPrioritiesSupported as *const _ - as usize - }, - 624usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(streamPrioritiesSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).globalL1CacheSupported as *const _ as usize - }, - 628usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(globalL1CacheSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).localL1CacheSupported as *const _ as usize - }, - 632usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(localL1CacheSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerMultiprocessor as *const _ - as usize - }, - 640usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerMultiprocessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).regsPerMultiprocessor as *const _ as usize - }, - 648usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerMultiprocessor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).managedMemory as *const _ as usize }, - 652usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(managedMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isMultiGpuBoard as *const _ as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(isMultiGpuBoard) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).multiGpuBoardGroupID as *const _ as usize - }, - 660usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiGpuBoardGroupID) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hostNativeAtomicSupported as *const _ - as usize - }, - 664usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(hostNativeAtomicSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).singleToDoublePrecisionPerfRatio as *const _ - as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(singleToDoublePrecisionPerfRatio) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pageableMemoryAccess as *const _ as usize - }, - 672usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccess) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).concurrentManagedAccess as *const _ as usize - }, - 676usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentManagedAccess) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).computePreemptionSupported as *const _ - as usize - }, - 680usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computePreemptionSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).canUseHostPointerForRegisteredMem as *const _ - as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canUseHostPointerForRegisteredMem) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperativeLaunch as *const _ as usize - }, - 688usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeLaunch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperativeMultiDeviceLaunch as *const _ - as usize - }, - 692usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeMultiDeviceLaunch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerBlockOptin as *const _ as usize - }, - 696usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlockOptin) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pageableMemoryAccessUsesHostPageTables - as *const _ as usize - }, - 704usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccessUsesHostPageTables) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).directManagedMemAccessFromHost as *const _ - as usize - }, - 708usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(directManagedMemAccessFromHost) - ) - ); -} -impl Default for cudaDeviceProp { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcEventHandle_st { - pub reserved: [::std::os::raw::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcEventHandle_st() { - 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::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcEventHandle_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for cudaIpcEventHandle_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcMemHandle_st { - pub reserved: [::std::os::raw::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcMemHandle_st() { - 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::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcMemHandle_st), - "::", - stringify!(reserved) - ) - ); -} -impl Default for cudaIpcMemHandle_st { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -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: ::std::os::raw::c_ulonglong, - pub flags: ::std::os::raw::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { - pub fd: ::std::os::raw::c_int, - pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - pub nvSciBufObject: *const ::std::os::raw::c_void, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::std::os::raw::c_void, - pub name: *const ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { - 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::null::())) - .handle as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .name as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); -} -impl Default for cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { - 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::null::())).fd as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciBufObject - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciBufObject) - ) - ); -} -impl Default for cudaExternalMemoryHandleDesc__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { - 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::null::())).type_ as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(flags) - ) - ); -} -impl Default for cudaExternalMemoryHandleDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalMemoryBufferDesc { - pub offset: ::std::os::raw::c_ulonglong, - pub size: ::std::os::raw::c_ulonglong, - pub flags: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { - 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::null::())).offset as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalMemoryMipmappedArrayDesc { - pub offset: ::std::os::raw::c_ulonglong, - pub formatDesc: cudaChannelFormatDesc, - pub extent: cudaExtent, - pub flags: ::std::os::raw::c_uint, - pub numLevels: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { - 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::null::())).offset as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).formatDesc as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(formatDesc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extent as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(extent) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numLevels as *const _ - as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(numLevels) - ) - ); -} -impl Default for cudaExternalMemoryMipmappedArrayDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaExternalSemaphoreHandleType { - cudaExternalSemaphoreHandleTypeOpaqueFd = 1, - cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, - cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, - cudaExternalSemaphoreHandleTypeD3D12Fence = 4, - cudaExternalSemaphoreHandleTypeD3D11Fence = 5, - cudaExternalSemaphoreHandleTypeNvSciSync = 6, - cudaExternalSemaphoreHandleTypeKeyedMutex = 7, - cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc { - pub type_: cudaExternalSemaphoreHandleType, - pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { - pub fd: ::std::os::raw::c_int, - pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - pub nvSciSyncObj: *const ::std::os::raw::c_void, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::std::os::raw::c_void, - pub name: *const ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { - 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::null::())) - .handle as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .name as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); -} -impl Default for cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { - 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::null::())).fd as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSyncObj - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciSyncObj) - ) - ); -} -impl Default for cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { - 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::null::())).type_ as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(flags) - ) - ); -} -impl Default for cudaExternalSemaphoreHandleDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams { - pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, -} -#[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, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { - pub value: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1() { - 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::null::( - ))) - .value as *const _ 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 ::std::os::raw::c_void, - pub reserved: ::std::os::raw::c_ulonglong, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2() { - 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::null::( - ))) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); -} -impl Default for cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { - pub key: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3() { - 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::null::( - ))) - .key as *const _ 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() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - 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::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSync - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedMutex - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); -} -impl Default for cudaExternalSemaphoreSignalParams__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(flags) - ) - ); -} -impl Default for cudaExternalSemaphoreSignalParams { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams { - pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, - pub flags: ::std::os::raw::c_uint, -} -#[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, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { - pub value: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1() { - 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::null::())) - .value as *const _ 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 ::std::os::raw::c_void, - pub reserved: ::std::os::raw::c_ulonglong, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2() { - 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::null::())) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); -} -impl Default for cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { - pub key: ::std::os::raw::c_ulonglong, - pub timeoutMs: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3() { - 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::null::())) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .timeoutMs as *const _ 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() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - 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::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSync - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedMutex - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); -} -impl Default for cudaExternalSemaphoreWaitParams__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(flags) - ) - ); -} -impl Default for cudaExternalSemaphoreWaitParams { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -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 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(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaCGScope { - cudaCGScopeInvalid = 0, - cudaCGScopeGrid = 1, - cudaCGScopeMultiGrid = 2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaLaunchParams { - pub func: *mut ::std::os::raw::c_void, - pub gridDim: dim3, - pub blockDim: dim3, - pub args: *mut *mut ::std::os::raw::c_void, - pub sharedMem: usize, - pub stream: cudaStream_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)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(gridDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(blockDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).args as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(args) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sharedMem as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(sharedMem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(stream) - ) - ); -} -impl Default for cudaLaunchParams { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct cudaKernelNodeParams { - pub func: *mut ::std::os::raw::c_void, - pub gridDim: dim3, - pub blockDim: dim3, - pub sharedMemBytes: ::std::os::raw::c_uint, - pub kernelParams: *mut *mut ::std::os::raw::c_void, - pub extra: *mut *mut ::std::os::raw::c_void, -} -#[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)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(gridDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(blockDim) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemBytes as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(sharedMemBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelParams as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(kernelParams) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extra as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(extra) - ) - ); -} -impl Default for cudaKernelNodeParams { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaGraphNodeType { - cudaGraphNodeTypeKernel = 0, - cudaGraphNodeTypeMemcpy = 1, - cudaGraphNodeTypeMemset = 2, - cudaGraphNodeTypeHost = 3, - cudaGraphNodeTypeGraph = 4, - cudaGraphNodeTypeEmpty = 5, - cudaGraphNodeTypeCount = 6, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphExec_st { - _unused: [u8; 0], -} -pub type cudaGraphExec_t = *mut CUgraphExec_st; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaGraphExecUpdateResult { - cudaGraphExecUpdateSuccess = 0, - cudaGraphExecUpdateError = 1, - cudaGraphExecUpdateErrorTopologyChanged = 2, - cudaGraphExecUpdateErrorNodeTypeChanged = 3, - cudaGraphExecUpdateErrorFunctionChanged = 4, - cudaGraphExecUpdateErrorParametersChanged = 5, - cudaGraphExecUpdateErrorNotSupported = 6, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaSurfaceBoundaryMode { - cudaBoundaryModeZero = 0, - cudaBoundaryModeClamp = 1, - cudaBoundaryModeTrap = 2, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaSurfaceFormatMode { - cudaFormatModeForced = 0, - cudaFormatModeAuto = 1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct surfaceReference { - pub channelDesc: cudaChannelFormatDesc, -} -#[test] -fn bindgen_test_layout_surfaceReference() { - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(surfaceReference)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(surfaceReference)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).channelDesc as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(surfaceReference), - "::", - stringify!(channelDesc) - ) - ); -} -impl Default for surfaceReference { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type cudaSurfaceObject_t = ::std::os::raw::c_ulonglong; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaTextureAddressMode { - cudaAddressModeWrap = 0, - cudaAddressModeClamp = 1, - cudaAddressModeMirror = 2, - cudaAddressModeBorder = 3, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaTextureFilterMode { - cudaFilterModePoint = 0, - cudaFilterModeLinear = 1, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaTextureReadMode { - cudaReadModeElementType = 0, - cudaReadModeNormalizedFloat = 1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] -pub struct textureReference { - pub normalized: ::std::os::raw::c_int, - pub filterMode: cudaTextureFilterMode, - pub addressMode: [cudaTextureAddressMode; 3usize], - pub channelDesc: cudaChannelFormatDesc, - pub sRGB: ::std::os::raw::c_int, - pub maxAnisotropy: ::std::os::raw::c_uint, - pub mipmapFilterMode: cudaTextureFilterMode, - pub mipmapLevelBias: f32, - pub minMipmapLevelClamp: f32, - pub maxMipmapLevelClamp: f32, - pub __cudaReserved: [::std::os::raw::c_int; 15usize], -} -#[test] -fn bindgen_test_layout_textureReference() { - assert_eq!( - ::std::mem::size_of::(), - 124usize, - concat!("Size of: ", stringify!(textureReference)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(textureReference)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).normalized as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(normalized) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(filterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).addressMode as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(addressMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).channelDesc as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(channelDesc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sRGB as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(sRGB) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(maxAnisotropy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(mipmapFilterMode) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(mipmapLevelBias) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(minMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(maxMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__cudaReserved as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(__cudaReserved) - ) - ); -} -impl Default for textureReference { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] -pub struct cudaTextureDesc { - pub addressMode: [cudaTextureAddressMode; 3usize], - pub filterMode: cudaTextureFilterMode, - pub readMode: cudaTextureReadMode, - pub sRGB: ::std::os::raw::c_int, - pub borderColor: [f32; 4usize], - pub normalizedCoords: ::std::os::raw::c_int, - pub maxAnisotropy: ::std::os::raw::c_uint, - pub mipmapFilterMode: cudaTextureFilterMode, - pub mipmapLevelBias: f32, - pub minMipmapLevelClamp: f32, - pub maxMipmapLevelClamp: f32, -} -#[test] -fn bindgen_test_layout_cudaTextureDesc() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaTextureDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cudaTextureDesc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).addressMode as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(addressMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(filterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readMode as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(readMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sRGB as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(sRGB) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).borderColor as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(borderColor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).normalizedCoords as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(normalizedCoords) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(maxAnisotropy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(mipmapFilterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(mipmapLevelBias) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(minMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(maxMipmapLevelClamp) - ) - ); -} -impl Default for cudaTextureDesc { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type cudaTextureObject_t = ::std::os::raw::c_ulonglong; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum cudaDataType_t { - CUDA_R_16F = 2, - CUDA_C_16F = 6, - CUDA_R_32F = 0, - CUDA_C_32F = 4, - CUDA_R_64F = 1, - CUDA_C_64F = 5, - CUDA_R_8I = 3, - CUDA_C_8I = 7, - CUDA_R_8U = 8, - CUDA_C_8U = 9, - CUDA_R_32I = 10, - CUDA_C_32I = 11, - CUDA_R_32U = 12, - CUDA_C_32U = 13, -} -pub use self::cudaDataType_t as cudaDataType; extern "C" { pub fn cudaDeviceReset() -> cudaError_t; } @@ -4638,10 +64,10 @@ extern "C" { pub fn cudaDeviceSynchronize() -> cudaError_t; } extern "C" { - pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; + pub fn cudaDeviceSetLimit(limit: cudaLimit, value: size_t) -> cudaError_t; } extern "C" { - pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; + pub fn cudaDeviceGetLimit(pValue: *mut size_t, limit: cudaLimit) -> cudaError_t; } extern "C" { pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; @@ -4709,10 +135,10 @@ extern "C" { pub fn cudaThreadSynchronize() -> cudaError_t; } extern "C" { - pub fn cudaThreadSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; + pub fn cudaThreadSetLimit(limit: cudaLimit, value: size_t) -> cudaError_t; } extern "C" { - pub fn cudaThreadGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; + pub fn cudaThreadGetLimit(pValue: *mut size_t, limit: cudaLimit) -> cudaError_t; } extern "C" { pub fn cudaThreadGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; @@ -4815,6 +241,26 @@ extern "C" { flags: *mut ::std::os::raw::c_uint, ) -> 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: cudaStreamAttrID, + value_out: *mut cudaStreamAttrValue, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamSetAttribute( + hStream: cudaStream_t, + attr: cudaStreamAttrID, + value: *const cudaStreamAttrValue, + ) -> cudaError_t; +} extern "C" { pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t; } @@ -4825,13 +271,6 @@ extern "C" { flags: ::std::os::raw::c_uint, ) -> cudaError_t; } -pub type cudaStreamCallback_t = ::std::option::Option< - unsafe extern "C" fn( - stream: cudaStream_t, - status: cudaError_t, - userData: *mut ::std::os::raw::c_void, - ), ->; extern "C" { pub fn cudaStreamAddCallback( stream: cudaStream_t, @@ -4850,7 +289,7 @@ extern "C" { pub fn cudaStreamAttachMemAsync( stream: cudaStream_t, devPtr: *mut ::std::os::raw::c_void, - length: usize, + length: size_t, flags: ::std::os::raw::c_uint, ) -> cudaError_t; } @@ -4955,7 +394,7 @@ extern "C" { gridDim: dim3, blockDim: dim3, args: *mut *mut ::std::os::raw::c_void, - sharedMem: usize, + sharedMem: size_t, stream: cudaStream_t, ) -> cudaError_t; } @@ -4965,7 +404,7 @@ extern "C" { gridDim: dim3, blockDim: dim3, args: *mut *mut ::std::os::raw::c_void, - sharedMem: usize, + sharedMem: size_t, stream: cudaStream_t, ) -> cudaError_t; } @@ -5019,7 +458,15 @@ extern "C" { numBlocks: *mut ::std::os::raw::c_int, func: *const ::std::os::raw::c_void, blockSize: ::std::os::raw::c_int, - dynamicSMemSize: usize, + dynamicSMemSize: size_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaOccupancyAvailableDynamicSMemPerBlock( + dynamicSmemSize: *mut size_t, + func: *const ::std::os::raw::c_void, + numBlocks: ::std::os::raw::c_int, + blockSize: ::std::os::raw::c_int, ) -> cudaError_t; } extern "C" { @@ -5027,37 +474,37 @@ extern "C" { numBlocks: *mut ::std::os::raw::c_int, func: *const ::std::os::raw::c_void, blockSize: ::std::os::raw::c_int, - dynamicSMemSize: usize, + dynamicSMemSize: size_t, flags: ::std::os::raw::c_uint, ) -> cudaError_t; } extern "C" { pub fn cudaMallocManaged( devPtr: *mut *mut ::std::os::raw::c_void, - size: usize, + size: size_t, flags: ::std::os::raw::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaMalloc(devPtr: *mut *mut ::std::os::raw::c_void, size: usize) -> cudaError_t; + pub fn cudaMalloc(devPtr: *mut *mut ::std::os::raw::c_void, size: size_t) -> cudaError_t; } extern "C" { - pub fn cudaMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> cudaError_t; + pub fn cudaMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: size_t) -> cudaError_t; } extern "C" { pub fn cudaMallocPitch( devPtr: *mut *mut ::std::os::raw::c_void, - pitch: *mut usize, - width: usize, - height: usize, + pitch: *mut size_t, + width: size_t, + height: size_t, ) -> cudaError_t; } extern "C" { pub fn cudaMallocArray( array: *mut cudaArray_t, desc: *const cudaChannelFormatDesc, - width: usize, - height: usize, + width: size_t, + height: size_t, flags: ::std::os::raw::c_uint, ) -> cudaError_t; } @@ -5076,14 +523,14 @@ extern "C" { extern "C" { pub fn cudaHostAlloc( pHost: *mut *mut ::std::os::raw::c_void, - size: usize, + size: size_t, flags: ::std::os::raw::c_uint, ) -> cudaError_t; } extern "C" { pub fn cudaHostRegister( ptr: *mut ::std::os::raw::c_void, - size: usize, + size: size_t, flags: ::std::os::raw::c_uint, ) -> cudaError_t; } @@ -5146,7 +593,7 @@ extern "C" { ) -> cudaError_t; } extern "C" { - pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t; + pub fn cudaMemGetInfo(free: *mut size_t, total: *mut size_t) -> cudaError_t; } extern "C" { pub fn cudaArrayGetInfo( @@ -5160,7 +607,7 @@ extern "C" { pub fn cudaMemcpy( dst: *mut ::std::os::raw::c_void, src: *const ::std::os::raw::c_void, - count: usize, + count: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } @@ -5170,54 +617,54 @@ extern "C" { dstDevice: ::std::os::raw::c_int, src: *const ::std::os::raw::c_void, srcDevice: ::std::os::raw::c_int, - count: usize, + count: size_t, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpy2D( dst: *mut ::std::os::raw::c_void, - dpitch: usize, + dpitch: size_t, src: *const ::std::os::raw::c_void, - spitch: usize, - width: usize, - height: usize, + spitch: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpy2DToArray( dst: cudaArray_t, - wOffset: usize, - hOffset: usize, + wOffset: size_t, + hOffset: size_t, src: *const ::std::os::raw::c_void, - spitch: usize, - width: usize, - height: usize, + spitch: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpy2DFromArray( dst: *mut ::std::os::raw::c_void, - dpitch: usize, + dpitch: size_t, src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - width: usize, - height: usize, + wOffset: size_t, + hOffset: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpy2DArrayToArray( dst: cudaArray_t, - wOffsetDst: usize, - hOffsetDst: usize, + wOffsetDst: size_t, + hOffsetDst: size_t, src: cudaArray_const_t, - wOffsetSrc: usize, - hOffsetSrc: usize, - width: usize, - height: usize, + wOffsetSrc: size_t, + hOffsetSrc: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } @@ -5225,8 +672,8 @@ extern "C" { pub fn cudaMemcpyToSymbol( symbol: *const ::std::os::raw::c_void, src: *const ::std::os::raw::c_void, - count: usize, - offset: usize, + count: size_t, + offset: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } @@ -5234,8 +681,8 @@ extern "C" { pub fn cudaMemcpyFromSymbol( dst: *mut ::std::os::raw::c_void, symbol: *const ::std::os::raw::c_void, - count: usize, - offset: usize, + count: size_t, + offset: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } @@ -5243,7 +690,7 @@ extern "C" { pub fn cudaMemcpyAsync( dst: *mut ::std::os::raw::c_void, src: *const ::std::os::raw::c_void, - count: usize, + count: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5254,18 +701,18 @@ extern "C" { dstDevice: ::std::os::raw::c_int, src: *const ::std::os::raw::c_void, srcDevice: ::std::os::raw::c_int, - count: usize, + count: size_t, stream: cudaStream_t, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpy2DAsync( dst: *mut ::std::os::raw::c_void, - dpitch: usize, + dpitch: size_t, src: *const ::std::os::raw::c_void, - spitch: usize, - width: usize, - height: usize, + spitch: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5273,12 +720,12 @@ extern "C" { extern "C" { pub fn cudaMemcpy2DToArrayAsync( dst: cudaArray_t, - wOffset: usize, - hOffset: usize, + wOffset: size_t, + hOffset: size_t, src: *const ::std::os::raw::c_void, - spitch: usize, - width: usize, - height: usize, + spitch: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5286,12 +733,12 @@ extern "C" { extern "C" { pub fn cudaMemcpy2DFromArrayAsync( dst: *mut ::std::os::raw::c_void, - dpitch: usize, + dpitch: size_t, src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - width: usize, - height: usize, + wOffset: size_t, + hOffset: size_t, + width: size_t, + height: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5300,8 +747,8 @@ extern "C" { pub fn cudaMemcpyToSymbolAsync( symbol: *const ::std::os::raw::c_void, src: *const ::std::os::raw::c_void, - count: usize, - offset: usize, + count: size_t, + offset: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5310,8 +757,8 @@ extern "C" { pub fn cudaMemcpyFromSymbolAsync( dst: *mut ::std::os::raw::c_void, symbol: *const ::std::os::raw::c_void, - count: usize, - offset: usize, + count: size_t, + offset: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5320,16 +767,16 @@ extern "C" { pub fn cudaMemset( devPtr: *mut ::std::os::raw::c_void, value: ::std::os::raw::c_int, - count: usize, + count: size_t, ) -> cudaError_t; } extern "C" { pub fn cudaMemset2D( devPtr: *mut ::std::os::raw::c_void, - pitch: usize, + pitch: size_t, value: ::std::os::raw::c_int, - width: usize, - height: usize, + width: size_t, + height: size_t, ) -> cudaError_t; } extern "C" { @@ -5343,17 +790,17 @@ extern "C" { pub fn cudaMemsetAsync( devPtr: *mut ::std::os::raw::c_void, value: ::std::os::raw::c_int, - count: usize, + count: size_t, stream: cudaStream_t, ) -> cudaError_t; } extern "C" { pub fn cudaMemset2DAsync( devPtr: *mut ::std::os::raw::c_void, - pitch: usize, + pitch: size_t, value: ::std::os::raw::c_int, - width: usize, - height: usize, + width: size_t, + height: size_t, stream: cudaStream_t, ) -> cudaError_t; } @@ -5373,14 +820,14 @@ extern "C" { } extern "C" { pub fn cudaGetSymbolSize( - size: *mut usize, + size: *mut size_t, symbol: *const ::std::os::raw::c_void, ) -> cudaError_t; } extern "C" { pub fn cudaMemPrefetchAsync( devPtr: *const ::std::os::raw::c_void, - count: usize, + count: size_t, dstDevice: ::std::os::raw::c_int, stream: cudaStream_t, ) -> cudaError_t; @@ -5388,7 +835,7 @@ extern "C" { extern "C" { pub fn cudaMemAdvise( devPtr: *const ::std::os::raw::c_void, - count: usize, + count: size_t, advice: cudaMemoryAdvise, device: ::std::os::raw::c_int, ) -> cudaError_t; @@ -5396,29 +843,29 @@ extern "C" { extern "C" { pub fn cudaMemRangeGetAttribute( data: *mut ::std::os::raw::c_void, - dataSize: usize, + dataSize: size_t, attribute: cudaMemRangeAttribute, devPtr: *const ::std::os::raw::c_void, - count: usize, + count: size_t, ) -> cudaError_t; } extern "C" { pub fn cudaMemRangeGetAttributes( data: *mut *mut ::std::os::raw::c_void, - dataSizes: *mut usize, + dataSizes: *mut size_t, attributes: *mut cudaMemRangeAttribute, - numAttributes: usize, + numAttributes: size_t, devPtr: *const ::std::os::raw::c_void, - count: usize, + count: size_t, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpyToArray( dst: cudaArray_t, - wOffset: usize, - hOffset: usize, + wOffset: size_t, + hOffset: size_t, src: *const ::std::os::raw::c_void, - count: usize, + count: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } @@ -5426,31 +873,31 @@ extern "C" { pub fn cudaMemcpyFromArray( dst: *mut ::std::os::raw::c_void, src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - count: usize, + wOffset: size_t, + hOffset: size_t, + count: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpyArrayToArray( dst: cudaArray_t, - wOffsetDst: usize, - hOffsetDst: usize, + wOffsetDst: size_t, + hOffsetDst: size_t, src: cudaArray_const_t, - wOffsetSrc: usize, - hOffsetSrc: usize, - count: usize, + wOffsetSrc: size_t, + hOffsetSrc: size_t, + count: size_t, kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { pub fn cudaMemcpyToArrayAsync( dst: cudaArray_t, - wOffset: usize, - hOffset: usize, + wOffset: size_t, + hOffset: size_t, src: *const ::std::os::raw::c_void, - count: usize, + count: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5459,9 +906,9 @@ extern "C" { pub fn cudaMemcpyFromArrayAsync( dst: *mut ::std::os::raw::c_void, src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - count: usize, + wOffset: size_t, + hOffset: size_t, + count: size_t, kind: cudaMemcpyKind, stream: cudaStream_t, ) -> cudaError_t; @@ -5514,7 +961,7 @@ extern "C" { extern "C" { pub fn cudaGraphicsResourceGetMappedPointer( devPtr: *mut *mut ::std::os::raw::c_void, - size: *mut usize, + size: *mut size_t, resource: cudaGraphicsResource_t, ) -> cudaError_t; } @@ -5534,22 +981,22 @@ extern "C" { } extern "C" { pub fn cudaBindTexture( - offset: *mut usize, + offset: *mut size_t, texref: *const textureReference, devPtr: *const ::std::os::raw::c_void, desc: *const cudaChannelFormatDesc, - size: usize, + size: size_t, ) -> cudaError_t; } extern "C" { pub fn cudaBindTexture2D( - offset: *mut usize, + offset: *mut size_t, texref: *const textureReference, devPtr: *const ::std::os::raw::c_void, desc: *const cudaChannelFormatDesc, - width: usize, - height: usize, - pitch: usize, + width: size_t, + height: size_t, + pitch: size_t, ) -> cudaError_t; } extern "C" { @@ -5571,7 +1018,7 @@ extern "C" { } extern "C" { pub fn cudaGetTextureAlignmentOffset( - offset: *mut usize, + offset: *mut size_t, texref: *const textureReference, ) -> cudaError_t; } @@ -5667,7 +1114,7 @@ extern "C" { pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, pNodeParams: *const cudaKernelNodeParams, ) -> cudaError_t; } @@ -5683,12 +1130,32 @@ extern "C" { 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: cudaKernelNodeAttrID, + value_out: *mut cudaKernelNodeAttrValue, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphKernelNodeSetAttribute( + hNode: cudaGraphNode_t, + attr: cudaKernelNodeAttrID, + value: *const cudaKernelNodeAttrValue, + ) -> cudaError_t; +} extern "C" { pub fn cudaGraphAddMemcpyNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, pCopyParams: *const cudaMemcpy3DParms, ) -> cudaError_t; } @@ -5709,7 +1176,7 @@ extern "C" { pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, pMemsetParams: *const cudaMemsetParams, ) -> cudaError_t; } @@ -5730,7 +1197,7 @@ extern "C" { pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, pNodeParams: *const cudaHostNodeParams, ) -> cudaError_t; } @@ -5751,7 +1218,7 @@ extern "C" { pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, childGraph: cudaGraph_t, ) -> cudaError_t; } @@ -5766,7 +1233,7 @@ extern "C" { pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, ) -> cudaError_t; } extern "C" { @@ -5790,14 +1257,14 @@ extern "C" { pub fn cudaGraphGetNodes( graph: cudaGraph_t, nodes: *mut cudaGraphNode_t, - numNodes: *mut usize, + numNodes: *mut size_t, ) -> cudaError_t; } extern "C" { pub fn cudaGraphGetRootNodes( graph: cudaGraph_t, pRootNodes: *mut cudaGraphNode_t, - pNumRootNodes: *mut usize, + pNumRootNodes: *mut size_t, ) -> cudaError_t; } extern "C" { @@ -5805,21 +1272,21 @@ extern "C" { graph: cudaGraph_t, from: *mut cudaGraphNode_t, to: *mut cudaGraphNode_t, - numEdges: *mut usize, + numEdges: *mut size_t, ) -> cudaError_t; } extern "C" { pub fn cudaGraphNodeGetDependencies( node: cudaGraphNode_t, pDependencies: *mut cudaGraphNode_t, - pNumDependencies: *mut usize, + pNumDependencies: *mut size_t, ) -> cudaError_t; } extern "C" { pub fn cudaGraphNodeGetDependentNodes( node: cudaGraphNode_t, pDependentNodes: *mut cudaGraphNode_t, - pNumDependentNodes: *mut usize, + pNumDependentNodes: *mut size_t, ) -> cudaError_t; } extern "C" { @@ -5827,7 +1294,7 @@ extern "C" { graph: cudaGraph_t, from: *const cudaGraphNode_t, to: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, ) -> cudaError_t; } extern "C" { @@ -5835,7 +1302,7 @@ extern "C" { graph: cudaGraph_t, from: *const cudaGraphNode_t, to: *const cudaGraphNode_t, - numDependencies: usize, + numDependencies: size_t, ) -> cudaError_t; } extern "C" { @@ -5847,7 +1314,7 @@ extern "C" { graph: cudaGraph_t, pErrorNode: *mut cudaGraphNode_t, pLogBuffer: *mut ::std::os::raw::c_char, - bufferSize: usize, + bufferSize: size_t, ) -> cudaError_t; } extern "C" { @@ -5901,3 +1368,9 @@ extern "C" { pExportTableId: *const cudaUUID_t, ) -> cudaError_t; } +extern "C" { + pub fn cudaGetFuncBySymbol( + functionPtr: *mut cudaFunction_t, + symbolPtr: *const ::std::os::raw::c_void, + ) -> cudaError_t; +} diff --git a/cuda-runtime-sys/src/lib.rs b/cuda-runtime-sys/src/lib.rs index f123fa8..1f22d89 100644 --- a/cuda-runtime-sys/src/lib.rs +++ b/cuda-runtime-sys/src/lib.rs @@ -1,4 +1,7 @@ #![allow(non_snake_case, non_upper_case_globals, non_camel_case_types)] + +use cuda_types_sys::*; + include!("cuda_runtime.rs"); #[cfg(test)] diff --git a/cuda-types-sys/Cargo.toml b/cuda-types-sys/Cargo.toml new file mode 100644 index 0000000..061ff14 --- /dev/null +++ b/cuda-types-sys/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "cuda-types-sys" +version = "0.4.0-alpha.1" +authors = ["Daniel Raneland "] +edition = "2018" + +build = "build.rs" + +description = "Rust binding to CUDA driver and runtime types" +documentation = "https://docs.rs/cuda-types-sys/" +repository = "https://github.com/rust-cuda/cuda-sys" +keywords = ["GPGPU", "CUDA", "ffi"] +license = "MIT/Apache-2.0" +readme = "../README.md" +categories = [] + +[build-dependencies.cuda-config] +path = "../cuda-config" +version = "0.1.0" diff --git a/cuda-types-sys/bindgen.sh b/cuda-types-sys/bindgen.sh new file mode 100755 index 0000000..e15b48f --- /dev/null +++ b/cuda-types-sys/bindgen.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -exu + +bindgen \ + --whitelist-type="^CU.*" \ + --whitelist-type="^cuuint(32|64)_t" \ + --whitelist-type="^cudaError_enum" \ + --whitelist-type="^cu.*Complex$" \ + --whitelist-type="^cuda.*" \ + --whitelist-type="^surfaceReference" \ + --whitelist-type="^textureReference" \ + --whitelist-type="^libraryPropertyType.*" \ + --default-enum-style=rust \ + --no-doc-comments \ + --with-derive-default \ + --with-derive-eq \ + --with-derive-hash \ + --with-derive-ord \ + wrapper.h -- -I/opt/cuda/include \ + > src/cuda_types.rs diff --git a/cuda-types-sys/build.rs b/cuda-types-sys/build.rs new file mode 100644 index 0000000..8563099 --- /dev/null +++ b/cuda-types-sys/build.rs @@ -0,0 +1,18 @@ +use cuda_config::*; + +fn main() { + if cfg!(target_os = "windows") { + println!( + "cargo:rustc-link-search=native={}", + find_cuda_windows().display() + ); + } else { + for path in find_cuda() { + println!("cargo:rustc-link-search=native={}", path.display()); + } + }; + + println!("cargo:rustc-link-lib=dylib=cuda"); + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-env-changed=CUDA_LIBRARY_PATH"); +} diff --git a/cuda-types-sys/src/cuda_types.rs b/cuda-types-sys/src/cuda_types.rs new file mode 100644 index 0000000..501d707 --- /dev/null +++ b/cuda-types-sys/src/cuda_types.rs @@ -0,0 +1,10353 @@ +/* automatically generated by rust-bindgen */ + +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __uint64_t = ::std::os::raw::c_ulong; +#[repr(C)] +#[repr(align(8))] +#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] +pub struct float2 { + pub x: f32, + pub y: f32, +} +#[test] +fn bindgen_test_layout_float2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(float2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(float2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) + ); +} +#[repr(C)] +#[repr(align(16))] +#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] +pub struct double2 { + pub x: f64, + pub y: f64, +} +#[test] +fn bindgen_test_layout_double2() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(double2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 16usize, + concat!("Alignment of ", stringify!(double2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(double2), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(double2), + "::", + stringify!(y) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct dim3 { + pub x: ::std::os::raw::c_uint, + pub y: ::std::os::raw::c_uint, + pub z: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_dim3() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(dim3)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(dim3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, + 8usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) + ); +} +pub type cuFloatComplex = float2; +pub type cuDoubleComplex = double2; +pub type cuComplex = cuFloatComplex; +pub type size_t = ::std::os::raw::c_ulong; +pub type cuuint32_t = u32; +pub type cuuint64_t = u64; +pub type CUdeviceptr = ::std::os::raw::c_ulonglong; +pub type CUdevice = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUctx_st { + _unused: [u8; 0], +} +pub type CUcontext = *mut CUctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUmod_st { + _unused: [u8; 0], +} +pub type CUmodule = *mut CUmod_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUfunc_st { + _unused: [u8; 0], +} +pub type CUfunction = *mut CUfunc_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUarray_st { + _unused: [u8; 0], +} +pub type CUarray = *mut CUarray_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUmipmappedArray_st { + _unused: [u8; 0], +} +pub type CUmipmappedArray = *mut CUmipmappedArray_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUtexref_st { + _unused: [u8; 0], +} +pub type CUtexref = *mut CUtexref_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUsurfref_st { + _unused: [u8; 0], +} +pub type CUsurfref = *mut CUsurfref_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUevent_st { + _unused: [u8; 0], +} +pub type CUevent = *mut CUevent_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUstream_st { + _unused: [u8; 0], +} +pub type CUstream = *mut CUstream_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphicsResource_st { + _unused: [u8; 0], +} +pub type CUgraphicsResource = *mut CUgraphicsResource_st; +pub type CUtexObject = ::std::os::raw::c_ulonglong; +pub type CUsurfObject = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUextMemory_st { + _unused: [u8; 0], +} +pub type CUexternalMemory = *mut CUextMemory_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUextSemaphore_st { + _unused: [u8; 0], +} +pub type CUexternalSemaphore = *mut CUextSemaphore_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraph_st { + _unused: [u8; 0], +} +pub type CUgraph = *mut CUgraph_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphNode_st { + _unused: [u8; 0], +} +pub type CUgraphNode = *mut CUgraphNode_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphExec_st { + _unused: [u8; 0], +} +pub type CUgraphExec = *mut CUgraphExec_st; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUuuid_st { + pub bytes: [::std::os::raw::c_char; 16usize], +} +#[test] +fn bindgen_test_layout_CUuuid_st() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(CUuuid_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(CUuuid_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bytes as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUuuid_st), + "::", + stringify!(bytes) + ) + ); +} +pub type CUuuid = CUuuid_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUipcEventHandle_st { + pub reserved: [::std::os::raw::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_CUipcEventHandle_st() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(CUipcEventHandle_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(CUipcEventHandle_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUipcEventHandle_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUipcEventHandle_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUipcEventHandle = CUipcEventHandle_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUipcMemHandle_st { + pub reserved: [::std::os::raw::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_CUipcMemHandle_st() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(CUipcMemHandle_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(CUipcMemHandle_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUipcMemHandle_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUipcMemHandle_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUipcMemHandle = CUipcMemHandle_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUipcMem_flags_enum { + CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1, +} +pub use self::CUipcMem_flags_enum as CUipcMem_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemAttach_flags_enum { + CU_MEM_ATTACH_GLOBAL = 1, + CU_MEM_ATTACH_HOST = 2, + CU_MEM_ATTACH_SINGLE = 4, +} +pub use self::CUmemAttach_flags_enum as CUmemAttach_flags; +impl CUctx_flags_enum { + pub const CU_CTX_BLOCKING_SYNC: CUctx_flags_enum = CUctx_flags_enum::CU_CTX_SCHED_BLOCKING_SYNC; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUctx_flags_enum { + CU_CTX_SCHED_AUTO = 0, + CU_CTX_SCHED_SPIN = 1, + CU_CTX_SCHED_YIELD = 2, + CU_CTX_SCHED_BLOCKING_SYNC = 4, + CU_CTX_SCHED_MASK = 7, + CU_CTX_MAP_HOST = 8, + CU_CTX_LMEM_RESIZE_TO_MAX = 16, + CU_CTX_FLAGS_MASK = 31, +} +pub use self::CUctx_flags_enum as CUctx_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstream_flags_enum { + CU_STREAM_DEFAULT = 0, + CU_STREAM_NON_BLOCKING = 1, +} +pub use self::CUstream_flags_enum as CUstream_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUevent_flags_enum { + CU_EVENT_DEFAULT = 0, + CU_EVENT_BLOCKING_SYNC = 1, + CU_EVENT_DISABLE_TIMING = 2, + CU_EVENT_INTERPROCESS = 4, +} +pub use self::CUevent_flags_enum as CUevent_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstreamWaitValue_flags_enum { + CU_STREAM_WAIT_VALUE_GEQ = 0, + CU_STREAM_WAIT_VALUE_EQ = 1, + CU_STREAM_WAIT_VALUE_AND = 2, + CU_STREAM_WAIT_VALUE_NOR = 3, + CU_STREAM_WAIT_VALUE_FLUSH = 1073741824, +} +pub use self::CUstreamWaitValue_flags_enum as CUstreamWaitValue_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstreamWriteValue_flags_enum { + CU_STREAM_WRITE_VALUE_DEFAULT = 0, + CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1, +} +pub use self::CUstreamWriteValue_flags_enum as CUstreamWriteValue_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstreamBatchMemOpType_enum { + CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1, + CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2, + CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4, + CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5, + CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3, +} +pub use self::CUstreamBatchMemOpType_enum as CUstreamBatchMemOpType; +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUstreamBatchMemOpParams_union { + pub operation: CUstreamBatchMemOpType, + pub waitValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st, + pub writeValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st, + pub flushRemoteWrites: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, + pub pad: [cuuint64_t; 6usize], + _bindgen_union_align: [u64; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st { + pub operation: CUstreamBatchMemOpType, + pub address: CUdeviceptr, + pub __bindgen_anon_1: + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, + pub alias: CUdeviceptr, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 { + pub value: cuuint32_t, + pub value64: cuuint64_t, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1( +) { + assert_eq!( + ::std::mem::size_of::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 + ) + ) + ); + assert_eq!( + ::std::mem::align_of::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 + ) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, + >())) + .value as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 + ), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1, + >())) + .value64 as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 + ), + "::", + stringify!(value64) + ) + ); +} +impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!( + "Size of: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .operation as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), + "::", + stringify!(operation) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .address as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), + "::", + stringify!(address) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .flags as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .alias as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st), + "::", + stringify!(alias) + ) + ); +} +impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st { + pub operation: CUstreamBatchMemOpType, + pub address: CUdeviceptr, + pub __bindgen_anon_1: + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, + pub alias: CUdeviceptr, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 { + pub value: cuuint32_t, + pub value64: cuuint64_t, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1( +) { + assert_eq!( + ::std::mem::size_of::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 + ) + ) + ); + assert_eq!( + ::std::mem::align_of::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 + ) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, + >())) + .value as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 + ), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1, + >())) + .value64 as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 + ), + "::", + stringify!(value64) + ) + ); +} +impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!( + "Size of: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .operation as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), + "::", + stringify!(operation) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .address as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), + "::", + stringify!(address) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .flags as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .alias as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st), + "::", + stringify!(alias) + ) + ); +} +impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st { + pub operation: CUstreamBatchMemOpType, + pub flags: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st() { + assert_eq!( + ::std::mem::size_of::( + ), + 8usize, + concat!( + "Size of: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st) + ) + ); + assert_eq!( + ::std::mem::align_of::< + CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, + >())) + .operation as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st), + "::", + stringify!(operation) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st, + >())) + .flags as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st), + "::", + stringify!(flags) + ) + ); +} +impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUstreamBatchMemOpParams_union() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(CUstreamBatchMemOpParams_union)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUstreamBatchMemOpParams_union)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).operation as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union), + "::", + stringify!(operation) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).waitValue as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union), + "::", + stringify!(waitValue) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).writeValue as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union), + "::", + stringify!(writeValue) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flushRemoteWrites as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union), + "::", + stringify!(flushRemoteWrites) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pad as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamBatchMemOpParams_union), + "::", + stringify!(pad) + ) + ); +} +impl Default for CUstreamBatchMemOpParams_union { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUstreamBatchMemOpParams = CUstreamBatchMemOpParams_union; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUoccupancy_flags_enum { + CU_OCCUPANCY_DEFAULT = 0, + CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1, +} +pub use self::CUoccupancy_flags_enum as CUoccupancy_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUarray_format_enum { + CU_AD_FORMAT_UNSIGNED_INT8 = 1, + CU_AD_FORMAT_UNSIGNED_INT16 = 2, + CU_AD_FORMAT_UNSIGNED_INT32 = 3, + CU_AD_FORMAT_SIGNED_INT8 = 8, + CU_AD_FORMAT_SIGNED_INT16 = 9, + CU_AD_FORMAT_SIGNED_INT32 = 10, + CU_AD_FORMAT_HALF = 16, + CU_AD_FORMAT_FLOAT = 32, +} +pub use self::CUarray_format_enum as CUarray_format; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUaddress_mode_enum { + CU_TR_ADDRESS_MODE_WRAP = 0, + CU_TR_ADDRESS_MODE_CLAMP = 1, + CU_TR_ADDRESS_MODE_MIRROR = 2, + CU_TR_ADDRESS_MODE_BORDER = 3, +} +pub use self::CUaddress_mode_enum as CUaddress_mode; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUfilter_mode_enum { + CU_TR_FILTER_MODE_POINT = 0, + CU_TR_FILTER_MODE_LINEAR = 1, +} +pub use self::CUfilter_mode_enum as CUfilter_mode; +impl CUdevice_attribute_enum { + pub const CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum = + CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK; +} +impl CUdevice_attribute_enum { + pub const CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK: CUdevice_attribute_enum = + CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK; +} +impl CUdevice_attribute_enum { + pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH: CUdevice_attribute_enum = + CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH; +} +impl CUdevice_attribute_enum { + pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT: CUdevice_attribute_enum = + CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT; +} +impl CUdevice_attribute_enum { + pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES: CUdevice_attribute_enum = + CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUdevice_attribute_enum { + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1, + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2, + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3, + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4, + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5, + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6, + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7, + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8, + CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9, + CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10, + CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11, + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12, + CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13, + CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14, + CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15, + CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16, + CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17, + CU_DEVICE_ATTRIBUTE_INTEGRATED = 18, + CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19, + CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29, + CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30, + CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31, + CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32, + CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33, + CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34, + CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35, + CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36, + CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37, + CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38, + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39, + CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40, + CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43, + CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49, + CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50, + CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67, + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74, + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75, + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76, + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77, + CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78, + CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79, + CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80, + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81, + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82, + CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83, + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84, + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85, + CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86, + CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87, + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88, + CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89, + CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90, + CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91, + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS = 92, + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 93, + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 94, + CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95, + CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96, + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97, + CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98, + CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99, + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 100, + CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 101, + CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 102, + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 103, + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 104, + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 105, + CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = 106, + CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = 107, + CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = 108, + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = 109, + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = 110, + CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = 111, + CU_DEVICE_ATTRIBUTE_MAX = 112, +} +pub use self::CUdevice_attribute_enum as CUdevice_attribute; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUdevprop_st { + pub maxThreadsPerBlock: ::std::os::raw::c_int, + pub maxThreadsDim: [::std::os::raw::c_int; 3usize], + pub maxGridSize: [::std::os::raw::c_int; 3usize], + pub sharedMemPerBlock: ::std::os::raw::c_int, + pub totalConstantMemory: ::std::os::raw::c_int, + pub SIMDWidth: ::std::os::raw::c_int, + pub memPitch: ::std::os::raw::c_int, + pub regsPerBlock: ::std::os::raw::c_int, + pub clockRate: ::std::os::raw::c_int, + pub textureAlign: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_CUdevprop_st() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(CUdevprop_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(CUdevprop_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxThreadsDim as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(maxThreadsDim) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxGridSize as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(maxGridSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sharedMemPerBlock as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(sharedMemPerBlock) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).totalConstantMemory as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(totalConstantMemory) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).SIMDWidth as *const _ as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(SIMDWidth) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).memPitch as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(memPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).regsPerBlock as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(regsPerBlock) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).clockRate as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(clockRate) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).textureAlign as *const _ as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(CUdevprop_st), + "::", + stringify!(textureAlign) + ) + ); +} +pub type CUdevprop = CUdevprop_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUpointer_attribute_enum { + CU_POINTER_ATTRIBUTE_CONTEXT = 1, + CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2, + CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3, + CU_POINTER_ATTRIBUTE_HOST_POINTER = 4, + CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5, + CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6, + CU_POINTER_ATTRIBUTE_BUFFER_ID = 7, + CU_POINTER_ATTRIBUTE_IS_MANAGED = 8, + CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9, + CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10, + CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11, + CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12, + CU_POINTER_ATTRIBUTE_MAPPED = 13, + CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14, + CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15, +} +pub use self::CUpointer_attribute_enum as CUpointer_attribute; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUfunction_attribute_enum { + CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0, + CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1, + CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2, + CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3, + CU_FUNC_ATTRIBUTE_NUM_REGS = 4, + CU_FUNC_ATTRIBUTE_PTX_VERSION = 5, + CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6, + CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7, + CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8, + CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9, + CU_FUNC_ATTRIBUTE_MAX = 10, +} +pub use self::CUfunction_attribute_enum as CUfunction_attribute; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUfunc_cache_enum { + CU_FUNC_CACHE_PREFER_NONE = 0, + CU_FUNC_CACHE_PREFER_SHARED = 1, + CU_FUNC_CACHE_PREFER_L1 = 2, + CU_FUNC_CACHE_PREFER_EQUAL = 3, +} +pub use self::CUfunc_cache_enum as CUfunc_cache; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUsharedconfig_enum { + CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0, + CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1, + CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2, +} +pub use self::CUsharedconfig_enum as CUsharedconfig; +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUshared_carveout_enum { + CU_SHAREDMEM_CARVEOUT_DEFAULT = -1, + CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 100, + CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0, +} +pub use self::CUshared_carveout_enum as CUshared_carveout; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemorytype_enum { + CU_MEMORYTYPE_HOST = 1, + CU_MEMORYTYPE_DEVICE = 2, + CU_MEMORYTYPE_ARRAY = 3, + CU_MEMORYTYPE_UNIFIED = 4, +} +pub use self::CUmemorytype_enum as CUmemorytype; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUcomputemode_enum { + CU_COMPUTEMODE_DEFAULT = 0, + CU_COMPUTEMODE_PROHIBITED = 2, + CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3, +} +pub use self::CUcomputemode_enum as CUcomputemode; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmem_advise_enum { + CU_MEM_ADVISE_SET_READ_MOSTLY = 1, + CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2, + CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3, + CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4, + CU_MEM_ADVISE_SET_ACCESSED_BY = 5, + CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6, +} +pub use self::CUmem_advise_enum as CUmem_advise; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmem_range_attribute_enum { + CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1, + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2, + CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3, + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4, +} +pub use self::CUmem_range_attribute_enum as CUmem_range_attribute; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUjit_option_enum { + CU_JIT_MAX_REGISTERS = 0, + CU_JIT_THREADS_PER_BLOCK = 1, + CU_JIT_WALL_TIME = 2, + CU_JIT_INFO_LOG_BUFFER = 3, + CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4, + CU_JIT_ERROR_LOG_BUFFER = 5, + CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6, + CU_JIT_OPTIMIZATION_LEVEL = 7, + CU_JIT_TARGET_FROM_CUCONTEXT = 8, + CU_JIT_TARGET = 9, + CU_JIT_FALLBACK_STRATEGY = 10, + CU_JIT_GENERATE_DEBUG_INFO = 11, + CU_JIT_LOG_VERBOSE = 12, + CU_JIT_GENERATE_LINE_INFO = 13, + CU_JIT_CACHE_MODE = 14, + CU_JIT_NEW_SM3X_OPT = 15, + CU_JIT_FAST_COMPILE = 16, + CU_JIT_GLOBAL_SYMBOL_NAMES = 17, + CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18, + CU_JIT_GLOBAL_SYMBOL_COUNT = 19, + CU_JIT_NUM_OPTIONS = 20, +} +pub use self::CUjit_option_enum as CUjit_option; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUjit_target_enum { + CU_TARGET_COMPUTE_20 = 20, + CU_TARGET_COMPUTE_21 = 21, + CU_TARGET_COMPUTE_30 = 30, + CU_TARGET_COMPUTE_32 = 32, + CU_TARGET_COMPUTE_35 = 35, + CU_TARGET_COMPUTE_37 = 37, + CU_TARGET_COMPUTE_50 = 50, + CU_TARGET_COMPUTE_52 = 52, + CU_TARGET_COMPUTE_53 = 53, + CU_TARGET_COMPUTE_60 = 60, + CU_TARGET_COMPUTE_61 = 61, + CU_TARGET_COMPUTE_62 = 62, + CU_TARGET_COMPUTE_70 = 70, + CU_TARGET_COMPUTE_72 = 72, + CU_TARGET_COMPUTE_75 = 75, + CU_TARGET_COMPUTE_80 = 80, +} +pub use self::CUjit_target_enum as CUjit_target; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUjit_fallback_enum { + CU_PREFER_PTX = 0, + CU_PREFER_BINARY = 1, +} +pub use self::CUjit_fallback_enum as CUjit_fallback; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUjit_cacheMode_enum { + CU_JIT_CACHE_OPTION_NONE = 0, + CU_JIT_CACHE_OPTION_CG = 1, + CU_JIT_CACHE_OPTION_CA = 2, +} +pub use self::CUjit_cacheMode_enum as CUjit_cacheMode; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUjitInputType_enum { + CU_JIT_INPUT_CUBIN = 0, + CU_JIT_INPUT_PTX = 1, + CU_JIT_INPUT_FATBINARY = 2, + CU_JIT_INPUT_OBJECT = 3, + CU_JIT_INPUT_LIBRARY = 4, + CU_JIT_NUM_INPUT_TYPES = 5, +} +pub use self::CUjitInputType_enum as CUjitInputType; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUlinkState_st { + _unused: [u8; 0], +} +pub type CUlinkState = *mut CUlinkState_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUgraphicsRegisterFlags_enum { + CU_GRAPHICS_REGISTER_FLAGS_NONE = 0, + CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1, + CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 2, + CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4, + CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8, +} +pub use self::CUgraphicsRegisterFlags_enum as CUgraphicsRegisterFlags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUgraphicsMapResourceFlags_enum { + CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0, + CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2, +} +pub use self::CUgraphicsMapResourceFlags_enum as CUgraphicsMapResourceFlags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUarray_cubemap_face_enum { + CU_CUBEMAP_FACE_POSITIVE_X = 0, + CU_CUBEMAP_FACE_NEGATIVE_X = 1, + CU_CUBEMAP_FACE_POSITIVE_Y = 2, + CU_CUBEMAP_FACE_NEGATIVE_Y = 3, + CU_CUBEMAP_FACE_POSITIVE_Z = 4, + CU_CUBEMAP_FACE_NEGATIVE_Z = 5, +} +pub use self::CUarray_cubemap_face_enum as CUarray_cubemap_face; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUlimit_enum { + CU_LIMIT_STACK_SIZE = 0, + CU_LIMIT_PRINTF_FIFO_SIZE = 1, + CU_LIMIT_MALLOC_HEAP_SIZE = 2, + CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3, + CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4, + CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5, + CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 6, + CU_LIMIT_MAX = 7, +} +pub use self::CUlimit_enum as CUlimit; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUresourcetype_enum { + CU_RESOURCE_TYPE_ARRAY = 0, + CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1, + CU_RESOURCE_TYPE_LINEAR = 2, + CU_RESOURCE_TYPE_PITCH2D = 3, +} +pub use self::CUresourcetype_enum as CUresourcetype; +pub type CUhostFn = + ::std::option::Option; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUaccessProperty_enum { + CU_ACCESS_PROPERTY_NORMAL = 0, + CU_ACCESS_PROPERTY_STREAMING = 1, + CU_ACCESS_PROPERTY_PERSISTING = 2, +} +pub use self::CUaccessProperty_enum as CUaccessProperty; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] +pub struct CUaccessPolicyWindow_st { + pub base_ptr: *mut ::std::os::raw::c_void, + pub num_bytes: size_t, + pub hitRatio: f32, + pub hitProp: CUaccessProperty, + pub missProp: CUaccessProperty, +} +#[test] +fn bindgen_test_layout_CUaccessPolicyWindow_st() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CUaccessPolicyWindow_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUaccessPolicyWindow_st)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).base_ptr as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUaccessPolicyWindow_st), + "::", + stringify!(base_ptr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).num_bytes as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUaccessPolicyWindow_st), + "::", + stringify!(num_bytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hitRatio as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUaccessPolicyWindow_st), + "::", + stringify!(hitRatio) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hitProp as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUaccessPolicyWindow_st), + "::", + stringify!(hitProp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).missProp as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUaccessPolicyWindow_st), + "::", + stringify!(missProp) + ) + ); +} +impl Default for CUaccessPolicyWindow_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUaccessPolicyWindow = CUaccessPolicyWindow_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_KERNEL_NODE_PARAMS_st { + pub func: CUfunction, + pub gridDimX: ::std::os::raw::c_uint, + pub gridDimY: ::std::os::raw::c_uint, + pub gridDimZ: ::std::os::raw::c_uint, + pub blockDimX: ::std::os::raw::c_uint, + pub blockDimY: ::std::os::raw::c_uint, + pub blockDimZ: ::std::os::raw::c_uint, + pub sharedMemBytes: ::std::os::raw::c_uint, + pub kernelParams: *mut *mut ::std::os::raw::c_void, + pub extra: *mut *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_CUDA_KERNEL_NODE_PARAMS_st() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(CUDA_KERNEL_NODE_PARAMS_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_KERNEL_NODE_PARAMS_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(func) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).gridDimX as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(gridDimX) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).gridDimY as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(gridDimY) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).gridDimZ as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(gridDimZ) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).blockDimX as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(blockDimX) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).blockDimY as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(blockDimY) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).blockDimZ as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(blockDimZ) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedMemBytes as *const _ + as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(sharedMemBytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).kernelParams as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(kernelParams) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).extra as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_KERNEL_NODE_PARAMS_st), + "::", + stringify!(extra) + ) + ); +} +impl Default for CUDA_KERNEL_NODE_PARAMS_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_KERNEL_NODE_PARAMS = CUDA_KERNEL_NODE_PARAMS_st; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_MEMSET_NODE_PARAMS_st { + pub dst: CUdeviceptr, + pub pitch: size_t, + pub value: ::std::os::raw::c_uint, + pub elementSize: ::std::os::raw::c_uint, + pub width: size_t, + pub height: size_t, +} +#[test] +fn bindgen_test_layout_CUDA_MEMSET_NODE_PARAMS_st() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(CUDA_MEMSET_NODE_PARAMS_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_MEMSET_NODE_PARAMS_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dst as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMSET_NODE_PARAMS_st), + "::", + stringify!(dst) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pitch as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMSET_NODE_PARAMS_st), + "::", + stringify!(pitch) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).value as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMSET_NODE_PARAMS_st), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).elementSize as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMSET_NODE_PARAMS_st), + "::", + stringify!(elementSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).width as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMSET_NODE_PARAMS_st), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).height as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMSET_NODE_PARAMS_st), + "::", + stringify!(height) + ) + ); +} +pub type CUDA_MEMSET_NODE_PARAMS = CUDA_MEMSET_NODE_PARAMS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_HOST_NODE_PARAMS_st { + pub fn_: CUhostFn, + pub userData: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_CUDA_HOST_NODE_PARAMS_st() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(CUDA_HOST_NODE_PARAMS_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_HOST_NODE_PARAMS_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_HOST_NODE_PARAMS_st), + "::", + stringify!(fn_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).userData as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_HOST_NODE_PARAMS_st), + "::", + stringify!(userData) + ) + ); +} +impl Default for CUDA_HOST_NODE_PARAMS_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_HOST_NODE_PARAMS = CUDA_HOST_NODE_PARAMS_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUgraphNodeType_enum { + CU_GRAPH_NODE_TYPE_KERNEL = 0, + CU_GRAPH_NODE_TYPE_MEMCPY = 1, + CU_GRAPH_NODE_TYPE_MEMSET = 2, + CU_GRAPH_NODE_TYPE_HOST = 3, + CU_GRAPH_NODE_TYPE_GRAPH = 4, + CU_GRAPH_NODE_TYPE_EMPTY = 5, +} +pub use self::CUgraphNodeType_enum as CUgraphNodeType; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUsynchronizationPolicy_enum { + CU_SYNC_POLICY_AUTO = 1, + CU_SYNC_POLICY_SPIN = 2, + CU_SYNC_POLICY_YIELD = 3, + CU_SYNC_POLICY_BLOCKING_SYNC = 4, +} +pub use self::CUsynchronizationPolicy_enum as CUsynchronizationPolicy; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUkernelNodeAttrID_enum { + CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1, + CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2, +} +pub use self::CUkernelNodeAttrID_enum as CUkernelNodeAttrID; +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUkernelNodeAttrValue_union { + pub accessPolicyWindow: CUaccessPolicyWindow, + pub cooperative: ::std::os::raw::c_int, + _bindgen_union_align: [u64; 4usize], +} +#[test] +fn bindgen_test_layout_CUkernelNodeAttrValue_union() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CUkernelNodeAttrValue_union)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUkernelNodeAttrValue_union)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).accessPolicyWindow as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUkernelNodeAttrValue_union), + "::", + stringify!(accessPolicyWindow) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).cooperative as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUkernelNodeAttrValue_union), + "::", + stringify!(cooperative) + ) + ); +} +impl Default for CUkernelNodeAttrValue_union { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUkernelNodeAttrValue = CUkernelNodeAttrValue_union; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstreamCaptureStatus_enum { + CU_STREAM_CAPTURE_STATUS_NONE = 0, + CU_STREAM_CAPTURE_STATUS_ACTIVE = 1, + CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2, +} +pub use self::CUstreamCaptureStatus_enum as CUstreamCaptureStatus; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstreamCaptureMode_enum { + CU_STREAM_CAPTURE_MODE_GLOBAL = 0, + CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1, + CU_STREAM_CAPTURE_MODE_RELAXED = 2, +} +pub use self::CUstreamCaptureMode_enum as CUstreamCaptureMode; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUstreamAttrID_enum { + CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1, + CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3, +} +pub use self::CUstreamAttrID_enum as CUstreamAttrID; +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUstreamAttrValue_union { + pub accessPolicyWindow: CUaccessPolicyWindow, + pub syncPolicy: CUsynchronizationPolicy, + _bindgen_union_align: [u64; 4usize], +} +#[test] +fn bindgen_test_layout_CUstreamAttrValue_union() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CUstreamAttrValue_union)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUstreamAttrValue_union)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).accessPolicyWindow as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamAttrValue_union), + "::", + stringify!(accessPolicyWindow) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).syncPolicy as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUstreamAttrValue_union), + "::", + stringify!(syncPolicy) + ) + ); +} +impl Default for CUstreamAttrValue_union { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUstreamAttrValue = CUstreamAttrValue_union; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaError_enum { + CUDA_SUCCESS = 0, + CUDA_ERROR_INVALID_VALUE = 1, + CUDA_ERROR_OUT_OF_MEMORY = 2, + CUDA_ERROR_NOT_INITIALIZED = 3, + CUDA_ERROR_DEINITIALIZED = 4, + CUDA_ERROR_PROFILER_DISABLED = 5, + CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6, + CUDA_ERROR_PROFILER_ALREADY_STARTED = 7, + CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8, + CUDA_ERROR_NO_DEVICE = 100, + CUDA_ERROR_INVALID_DEVICE = 101, + CUDA_ERROR_INVALID_IMAGE = 200, + CUDA_ERROR_INVALID_CONTEXT = 201, + CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 202, + CUDA_ERROR_MAP_FAILED = 205, + CUDA_ERROR_UNMAP_FAILED = 206, + CUDA_ERROR_ARRAY_IS_MAPPED = 207, + CUDA_ERROR_ALREADY_MAPPED = 208, + CUDA_ERROR_NO_BINARY_FOR_GPU = 209, + CUDA_ERROR_ALREADY_ACQUIRED = 210, + CUDA_ERROR_NOT_MAPPED = 211, + CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 212, + CUDA_ERROR_NOT_MAPPED_AS_POINTER = 213, + CUDA_ERROR_ECC_UNCORRECTABLE = 214, + CUDA_ERROR_UNSUPPORTED_LIMIT = 215, + CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 216, + CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 217, + CUDA_ERROR_INVALID_PTX = 218, + CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219, + CUDA_ERROR_NVLINK_UNCORRECTABLE = 220, + CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 221, + CUDA_ERROR_INVALID_SOURCE = 300, + CUDA_ERROR_FILE_NOT_FOUND = 301, + CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302, + CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 303, + CUDA_ERROR_OPERATING_SYSTEM = 304, + CUDA_ERROR_INVALID_HANDLE = 400, + CUDA_ERROR_ILLEGAL_STATE = 401, + CUDA_ERROR_NOT_FOUND = 500, + CUDA_ERROR_NOT_READY = 600, + CUDA_ERROR_ILLEGAL_ADDRESS = 700, + CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 701, + CUDA_ERROR_LAUNCH_TIMEOUT = 702, + CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 703, + CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 704, + CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 705, + CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 708, + CUDA_ERROR_CONTEXT_IS_DESTROYED = 709, + CUDA_ERROR_ASSERT = 710, + CUDA_ERROR_TOO_MANY_PEERS = 711, + CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 712, + CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 713, + CUDA_ERROR_HARDWARE_STACK_ERROR = 714, + CUDA_ERROR_ILLEGAL_INSTRUCTION = 715, + CUDA_ERROR_MISALIGNED_ADDRESS = 716, + CUDA_ERROR_INVALID_ADDRESS_SPACE = 717, + CUDA_ERROR_INVALID_PC = 718, + CUDA_ERROR_LAUNCH_FAILED = 719, + CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 720, + CUDA_ERROR_NOT_PERMITTED = 800, + CUDA_ERROR_NOT_SUPPORTED = 801, + CUDA_ERROR_SYSTEM_NOT_READY = 802, + CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 803, + CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 804, + CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 900, + CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 901, + CUDA_ERROR_STREAM_CAPTURE_MERGE = 902, + CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 903, + CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 904, + CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 905, + CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 906, + CUDA_ERROR_CAPTURED_EVENT = 907, + CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 908, + CUDA_ERROR_TIMEOUT = 909, + CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 910, + CUDA_ERROR_UNKNOWN = 999, +} +pub use self::cudaError_enum as CUresult; +impl CUdevice_P2PAttribute_enum { + pub const CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum = + CUdevice_P2PAttribute_enum::CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUdevice_P2PAttribute_enum { + CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1, + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2, + CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3, + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4, +} +pub use self::CUdevice_P2PAttribute_enum as CUdevice_P2PAttribute; +pub type CUstreamCallback = ::std::option::Option< + unsafe extern "C" fn( + hStream: CUstream, + status: CUresult, + userData: *mut ::std::os::raw::c_void, + ), +>; +pub type CUoccupancyB2DSize = + ::std::option::Option size_t>; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_MEMCPY2D_st { + pub srcXInBytes: size_t, + pub srcY: size_t, + pub srcMemoryType: CUmemorytype, + pub srcHost: *const ::std::os::raw::c_void, + pub srcDevice: CUdeviceptr, + pub srcArray: CUarray, + pub srcPitch: size_t, + pub dstXInBytes: size_t, + pub dstY: size_t, + pub dstMemoryType: CUmemorytype, + pub dstHost: *mut ::std::os::raw::c_void, + pub dstDevice: CUdeviceptr, + pub dstArray: CUarray, + pub dstPitch: size_t, + pub WidthInBytes: size_t, + pub Height: size_t, +} +#[test] +fn bindgen_test_layout_CUDA_MEMCPY2D_st() { + assert_eq!( + ::std::mem::size_of::(), + 128usize, + concat!("Size of: ", stringify!(CUDA_MEMCPY2D_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_MEMCPY2D_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcXInBytes as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcXInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcY as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcMemoryType as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcMemoryType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcHost as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcHost) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPitch as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(srcPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstXInBytes as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstXInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstY as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstMemoryType as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstMemoryType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstHost as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstHost) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPitch as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(dstPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WidthInBytes as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(WidthInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY2D_st), + "::", + stringify!(Height) + ) + ); +} +impl Default for CUDA_MEMCPY2D_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_MEMCPY2D = CUDA_MEMCPY2D_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_MEMCPY3D_st { + pub srcXInBytes: size_t, + pub srcY: size_t, + pub srcZ: size_t, + pub srcLOD: size_t, + pub srcMemoryType: CUmemorytype, + pub srcHost: *const ::std::os::raw::c_void, + pub srcDevice: CUdeviceptr, + pub srcArray: CUarray, + pub reserved0: *mut ::std::os::raw::c_void, + pub srcPitch: size_t, + pub srcHeight: size_t, + pub dstXInBytes: size_t, + pub dstY: size_t, + pub dstZ: size_t, + pub dstLOD: size_t, + pub dstMemoryType: CUmemorytype, + pub dstHost: *mut ::std::os::raw::c_void, + pub dstDevice: CUdeviceptr, + pub dstArray: CUarray, + pub reserved1: *mut ::std::os::raw::c_void, + pub dstPitch: size_t, + pub dstHeight: size_t, + pub WidthInBytes: size_t, + pub Height: size_t, + pub Depth: size_t, +} +#[test] +fn bindgen_test_layout_CUDA_MEMCPY3D_st() { + assert_eq!( + ::std::mem::size_of::(), + 200usize, + concat!("Size of: ", stringify!(CUDA_MEMCPY3D_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_MEMCPY3D_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcXInBytes as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcXInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcY as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcZ as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcLOD as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcLOD) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcMemoryType as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcMemoryType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcHost as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcHost) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).reserved0 as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(reserved0) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPitch as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcHeight as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(srcHeight) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstXInBytes as *const _ as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstXInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstY as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstZ as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstLOD as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstLOD) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstMemoryType as *const _ as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstMemoryType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstHost as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstHost) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).reserved1 as *const _ as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPitch as *const _ as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstHeight as *const _ as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(dstHeight) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WidthInBytes as *const _ as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(WidthInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(Height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Depth as *const _ as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_st), + "::", + stringify!(Depth) + ) + ); +} +impl Default for CUDA_MEMCPY3D_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_MEMCPY3D = CUDA_MEMCPY3D_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_MEMCPY3D_PEER_st { + pub srcXInBytes: size_t, + pub srcY: size_t, + pub srcZ: size_t, + pub srcLOD: size_t, + pub srcMemoryType: CUmemorytype, + pub srcHost: *const ::std::os::raw::c_void, + pub srcDevice: CUdeviceptr, + pub srcArray: CUarray, + pub srcContext: CUcontext, + pub srcPitch: size_t, + pub srcHeight: size_t, + pub dstXInBytes: size_t, + pub dstY: size_t, + pub dstZ: size_t, + pub dstLOD: size_t, + pub dstMemoryType: CUmemorytype, + pub dstHost: *mut ::std::os::raw::c_void, + pub dstDevice: CUdeviceptr, + pub dstArray: CUarray, + pub dstContext: CUcontext, + pub dstPitch: size_t, + pub dstHeight: size_t, + pub WidthInBytes: size_t, + pub Height: size_t, + pub Depth: size_t, +} +#[test] +fn bindgen_test_layout_CUDA_MEMCPY3D_PEER_st() { + assert_eq!( + ::std::mem::size_of::(), + 200usize, + concat!("Size of: ", stringify!(CUDA_MEMCPY3D_PEER_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_MEMCPY3D_PEER_st)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).srcXInBytes as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcXInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcY as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcZ as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcLOD as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcLOD) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).srcMemoryType as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcMemoryType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcHost as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcHost) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).srcContext as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcContext) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPitch as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcHeight as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(srcHeight) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dstXInBytes as *const _ as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstXInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstY as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstZ as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstLOD as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstLOD) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dstMemoryType as *const _ as usize + }, + 120usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstMemoryType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstHost as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstHost) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dstContext as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstContext) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPitch as *const _ as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstPitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstHeight as *const _ as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(dstHeight) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).WidthInBytes as *const _ as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(WidthInBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(Height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Depth as *const _ as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(CUDA_MEMCPY3D_PEER_st), + "::", + stringify!(Depth) + ) + ); +} +impl Default for CUDA_MEMCPY3D_PEER_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_MEMCPY3D_PEER = CUDA_MEMCPY3D_PEER_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_ARRAY_DESCRIPTOR_st { + pub Width: size_t, + pub Height: size_t, + pub Format: CUarray_format, + pub NumChannels: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_CUDA_ARRAY_DESCRIPTOR_st() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(CUDA_ARRAY_DESCRIPTOR_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_ARRAY_DESCRIPTOR_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Width as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY_DESCRIPTOR_st), + "::", + stringify!(Width) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY_DESCRIPTOR_st), + "::", + stringify!(Height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Format as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY_DESCRIPTOR_st), + "::", + stringify!(Format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).NumChannels as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY_DESCRIPTOR_st), + "::", + stringify!(NumChannels) + ) + ); +} +impl Default for CUDA_ARRAY_DESCRIPTOR_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_ARRAY_DESCRIPTOR = CUDA_ARRAY_DESCRIPTOR_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_ARRAY3D_DESCRIPTOR_st { + pub Width: size_t, + pub Height: size_t, + pub Depth: size_t, + pub Format: CUarray_format, + pub NumChannels: ::std::os::raw::c_uint, + pub Flags: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_CUDA_ARRAY3D_DESCRIPTOR_st() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(CUDA_ARRAY3D_DESCRIPTOR_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_ARRAY3D_DESCRIPTOR_st)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).Width as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), + "::", + stringify!(Width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).Height as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), + "::", + stringify!(Height) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).Depth as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), + "::", + stringify!(Depth) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).Format as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), + "::", + stringify!(Format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).NumChannels as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), + "::", + stringify!(NumChannels) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).Flags as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_ARRAY3D_DESCRIPTOR_st), + "::", + stringify!(Flags) + ) + ); +} +impl Default for CUDA_ARRAY3D_DESCRIPTOR_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_ARRAY3D_DESCRIPTOR = CUDA_ARRAY3D_DESCRIPTOR_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_RESOURCE_DESC_st { + pub resType: CUresourcetype, + pub res: CUDA_RESOURCE_DESC_st__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUDA_RESOURCE_DESC_st__bindgen_ty_1 { + pub array: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1, + pub mipmap: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2, + pub linear: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3, + pub pitch2D: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4, + pub reserved: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5, + _bindgen_union_align: [u64; 16usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 { + pub hArray: CUarray, +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hArray + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(hArray) + ) + ); +} +impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 { + pub hMipmappedArray: CUmipmappedArray, +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .hMipmappedArray as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(hMipmappedArray) + ) + ); +} +impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 { + pub devPtr: CUdeviceptr, + pub format: CUarray_format, + pub numChannels: ::std::os::raw::c_uint, + pub sizeInBytes: size_t, +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).devPtr + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(devPtr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).format + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .numChannels as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(numChannels) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .sizeInBytes as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(sizeInBytes) + ) + ); +} +impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 { + pub devPtr: CUdeviceptr, + pub format: CUarray_format, + pub numChannels: ::std::os::raw::c_uint, + pub width: size_t, + pub height: size_t, + pub pitchInBytes: size_t, +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!( + "Size of: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).devPtr + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(devPtr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).format + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .numChannels as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(numChannels) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).width + as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).height + as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .pitchInBytes as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(pitchInBytes) + ) + ); +} +impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 { + pub reserved: [::std::os::raw::c_int; 32usize], +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5() { + assert_eq!( + ::std::mem::size_of::(), + 128usize, + concat!( + "Size of: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 128usize, + concat!("Size of: ", stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).array as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmap as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), + "::", + stringify!(mipmap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).linear as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), + "::", + stringify!(linear) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pitch2D as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), + "::", + stringify!(pitch2D) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!("Size of: ", stringify!(CUDA_RESOURCE_DESC_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_RESOURCE_DESC_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).resType as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st), + "::", + stringify!(resType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).res as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st), + "::", + stringify!(res) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_DESC_st), + "::", + stringify!(flags) + ) + ); +} +impl Default for CUDA_RESOURCE_DESC_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_RESOURCE_DESC = CUDA_RESOURCE_DESC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] +pub struct CUDA_TEXTURE_DESC_st { + pub addressMode: [CUaddress_mode; 3usize], + pub filterMode: CUfilter_mode, + pub flags: ::std::os::raw::c_uint, + pub maxAnisotropy: ::std::os::raw::c_uint, + pub mipmapFilterMode: CUfilter_mode, + pub mipmapLevelBias: f32, + pub minMipmapLevelClamp: f32, + pub maxMipmapLevelClamp: f32, + pub borderColor: [f32; 4usize], + pub reserved: [::std::os::raw::c_int; 12usize], +} +#[test] +fn bindgen_test_layout_CUDA_TEXTURE_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 104usize, + concat!("Size of: ", stringify!(CUDA_TEXTURE_DESC_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(CUDA_TEXTURE_DESC_st)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).addressMode as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(addressMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(filterMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(maxAnisotropy) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(mipmapFilterMode) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(mipmapLevelBias) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ + as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(minMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ + as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(maxMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).borderColor as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(borderColor) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(CUDA_TEXTURE_DESC_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_TEXTURE_DESC_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_TEXTURE_DESC = CUDA_TEXTURE_DESC_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUresourceViewFormat_enum { + CU_RES_VIEW_FORMAT_NONE = 0, + CU_RES_VIEW_FORMAT_UINT_1X8 = 1, + CU_RES_VIEW_FORMAT_UINT_2X8 = 2, + CU_RES_VIEW_FORMAT_UINT_4X8 = 3, + CU_RES_VIEW_FORMAT_SINT_1X8 = 4, + CU_RES_VIEW_FORMAT_SINT_2X8 = 5, + CU_RES_VIEW_FORMAT_SINT_4X8 = 6, + CU_RES_VIEW_FORMAT_UINT_1X16 = 7, + CU_RES_VIEW_FORMAT_UINT_2X16 = 8, + CU_RES_VIEW_FORMAT_UINT_4X16 = 9, + CU_RES_VIEW_FORMAT_SINT_1X16 = 10, + CU_RES_VIEW_FORMAT_SINT_2X16 = 11, + CU_RES_VIEW_FORMAT_SINT_4X16 = 12, + CU_RES_VIEW_FORMAT_UINT_1X32 = 13, + CU_RES_VIEW_FORMAT_UINT_2X32 = 14, + CU_RES_VIEW_FORMAT_UINT_4X32 = 15, + CU_RES_VIEW_FORMAT_SINT_1X32 = 16, + CU_RES_VIEW_FORMAT_SINT_2X32 = 17, + CU_RES_VIEW_FORMAT_SINT_4X32 = 18, + CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19, + CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20, + CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21, + CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22, + CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23, + CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24, + CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25, + CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26, + CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27, + CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28, + CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29, + CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30, + CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31, + CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32, + CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33, + CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34, +} +pub use self::CUresourceViewFormat_enum as CUresourceViewFormat; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_RESOURCE_VIEW_DESC_st { + pub format: CUresourceViewFormat, + pub width: size_t, + pub height: size_t, + pub depth: size_t, + pub firstMipmapLevel: ::std::os::raw::c_uint, + pub lastMipmapLevel: ::std::os::raw::c_uint, + pub firstLayer: ::std::os::raw::c_uint, + pub lastLayer: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[test] +fn bindgen_test_layout_CUDA_RESOURCE_VIEW_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 112usize, + concat!("Size of: ", stringify!(CUDA_RESOURCE_VIEW_DESC_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_RESOURCE_VIEW_DESC_st)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).format as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).width as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).height as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).depth as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(depth) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).firstMipmapLevel as *const _ + as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(firstMipmapLevel) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).lastMipmapLevel as *const _ + as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(lastMipmapLevel) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).firstLayer as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(firstLayer) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).lastLayer as *const _ as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(lastLayer) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_RESOURCE_VIEW_DESC_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_RESOURCE_VIEW_DESC_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_RESOURCE_VIEW_DESC = CUDA_RESOURCE_VIEW_DESC_st; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st { + pub p2pToken: ::std::os::raw::c_ulonglong, + pub vaSpaceToken: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).p2pToken as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), + "::", + stringify!(p2pToken) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).vaSpaceToken + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), + "::", + stringify!(vaSpaceToken) + ) + ); +} +pub type CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_LAUNCH_PARAMS_st { + pub function: CUfunction, + pub gridDimX: ::std::os::raw::c_uint, + pub gridDimY: ::std::os::raw::c_uint, + pub gridDimZ: ::std::os::raw::c_uint, + pub blockDimX: ::std::os::raw::c_uint, + pub blockDimY: ::std::os::raw::c_uint, + pub blockDimZ: ::std::os::raw::c_uint, + pub sharedMemBytes: ::std::os::raw::c_uint, + pub hStream: CUstream, + pub kernelParams: *mut *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_CUDA_LAUNCH_PARAMS_st() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(CUDA_LAUNCH_PARAMS_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUDA_LAUNCH_PARAMS_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).function as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(function) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).gridDimX as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(gridDimX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).gridDimY as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(gridDimY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).gridDimZ as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(gridDimZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).blockDimX as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(blockDimX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).blockDimY as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(blockDimY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).blockDimZ as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(blockDimZ) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedMemBytes as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(sharedMemBytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hStream as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(hStream) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).kernelParams as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_LAUNCH_PARAMS_st), + "::", + stringify!(kernelParams) + ) + ); +} +impl Default for CUDA_LAUNCH_PARAMS_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_LAUNCH_PARAMS = CUDA_LAUNCH_PARAMS_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUexternalMemoryHandleType_enum { + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7, + CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8, +} +pub use self::CUexternalMemoryHandleType_enum as CUexternalMemoryHandleType; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st { + pub type_: CUexternalMemoryHandleType, + pub handle: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1, + pub size: ::std::os::raw::c_ulonglong, + pub flags: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 { + pub fd: ::std::os::raw::c_int, + pub win32: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, + pub nvSciBufObject: *const ::std::os::raw::c_void, + _bindgen_union_align: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::std::os::raw::c_void, + pub name: *const ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .handle as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); +} +impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).fd + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).win32 + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .nvSciBufObject as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1), + "::", + stringify!(nvSciBufObject) + ) + ); +} +impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 104usize, + concat!("Size of: ", stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).type_ as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).handle as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).size as *const _ + as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st { + pub offset: ::std::os::raw::c_ulonglong, + pub size: ::std::os::raw::c_ulonglong, + pub flags: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).offset as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).size as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + "::", + stringify!(reserved) + ) + ); +} +pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st { + pub offset: ::std::os::raw::c_ulonglong, + pub arrayDesc: CUDA_ARRAY3D_DESCRIPTOR, + pub numLevels: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 120usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).offset + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).arrayDesc + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + "::", + stringify!(arrayDesc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).numLevels + as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + "::", + stringify!(numLevels) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved + as *const _ as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUexternalSemaphoreHandleType_enum { + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7, + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8, +} +pub use self::CUexternalSemaphoreHandleType_enum as CUexternalSemaphoreHandleType; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st { + pub type_: CUexternalSemaphoreHandleType, + pub handle: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 { + pub fd: ::std::os::raw::c_int, + pub win32: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, + pub nvSciSyncObj: *const ::std::os::raw::c_void, + _bindgen_union_align: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::std::os::raw::c_void, + pub name: *const ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, + >())) + .handle as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1, + >())) + .name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).fd + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).win32 + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .nvSciSyncObj as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1), + "::", + stringify!(nvSciSyncObj) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st() { + assert_eq!( + ::std::mem::size_of::(), + 96usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).type_ as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).handle as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st { + pub params: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 { + pub fence: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3, + pub reserved: [::std::os::raw::c_uint; 12usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1 { + pub value: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::( + ), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1, + >())) + .value as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::std::os::raw::c_void, + pub reserved: ::std::os::raw::c_ulonglong, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::( + ), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2, + >())) + .fence as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2, + >())) + .reserved as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3 { + pub key: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::( + ), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3, + >())) + .key as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).fence + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .nvSciSync as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .keyedMutex as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .reserved as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st() { + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).params as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved + as *const _ as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st { + pub params: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, + pub reserved: [::std::os::raw::c_uint; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 { + pub fence: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3, + pub reserved: [::std::os::raw::c_uint; 10usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1 { + pub value: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1, + >())) + .value as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::std::os::raw::c_void, + pub reserved: ::std::os::raw::c_ulonglong, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2, + >())) + .fence as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2, + >())) + .reserved as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3 { + pub key: ::std::os::raw::c_ulonglong, + pub timeoutMs: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::( + ), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3, + >())) + .key as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::< + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3, + >())) + .timeoutMs as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).fence + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .nvSciSync as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .keyedMutex as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .reserved as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st() { + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!( + "Size of: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).params as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st; +pub type CUmemGenericAllocationHandle = ::std::os::raw::c_ulonglong; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemAllocationHandleType_enum { + CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1, + CU_MEM_HANDLE_TYPE_WIN32 = 2, + CU_MEM_HANDLE_TYPE_WIN32_KMT = 4, + CU_MEM_HANDLE_TYPE_MAX = 4294967295, +} +pub use self::CUmemAllocationHandleType_enum as CUmemAllocationHandleType; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemAccess_flags_enum { + CU_MEM_ACCESS_FLAGS_PROT_NONE = 0, + CU_MEM_ACCESS_FLAGS_PROT_READ = 1, + CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3, + CU_MEM_ACCESS_FLAGS_PROT_MAX = 4294967295, +} +pub use self::CUmemAccess_flags_enum as CUmemAccess_flags; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemLocationType_enum { + CU_MEM_LOCATION_TYPE_INVALID = 0, + CU_MEM_LOCATION_TYPE_DEVICE = 1, + CU_MEM_LOCATION_TYPE_MAX = 4294967295, +} +pub use self::CUmemLocationType_enum as CUmemLocationType; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemAllocationType_enum { + CU_MEM_ALLOCATION_TYPE_INVALID = 0, + CU_MEM_ALLOCATION_TYPE_PINNED = 1, + CU_MEM_ALLOCATION_TYPE_MAX = 4294967295, +} +pub use self::CUmemAllocationType_enum as CUmemAllocationType; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemAllocationGranularity_flags_enum { + CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0, + CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1, +} +pub use self::CUmemAllocationGranularity_flags_enum as CUmemAllocationGranularity_flags; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUmemLocation_st { + pub type_: CUmemLocationType, + pub id: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_CUmemLocation_st() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(CUmemLocation_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(CUmemLocation_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUmemLocation_st), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(CUmemLocation_st), + "::", + stringify!(id) + ) + ); +} +impl Default for CUmemLocation_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUmemLocation = CUmemLocation_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUmemAllocationCompType_enum { + CU_MEM_ALLOCATION_COMP_NONE = 0, + CU_MEM_ALLOCATION_COMP_GENERIC = 1, +} +pub use self::CUmemAllocationCompType_enum as CUmemAllocationCompType; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUmemAllocationProp_st { + pub type_: CUmemAllocationType, + pub requestedHandleTypes: CUmemAllocationHandleType, + pub location: CUmemLocation, + pub win32HandleMetaData: *mut ::std::os::raw::c_void, + pub allocFlags: CUmemAllocationProp_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUmemAllocationProp_st__bindgen_ty_1 { + pub compressionType: ::std::os::raw::c_uchar, + pub gpuDirectRDMACapable: ::std::os::raw::c_uchar, + pub reserved: [::std::os::raw::c_uchar; 6usize], +} +#[test] +fn bindgen_test_layout_CUmemAllocationProp_st__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(CUmemAllocationProp_st__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(CUmemAllocationProp_st__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).compressionType + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st__bindgen_ty_1), + "::", + stringify!(compressionType) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).gpuDirectRDMACapable + as *const _ as usize + }, + 1usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st__bindgen_ty_1), + "::", + stringify!(gpuDirectRDMACapable) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_CUmemAllocationProp_st() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CUmemAllocationProp_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CUmemAllocationProp_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).requestedHandleTypes as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st), + "::", + stringify!(requestedHandleTypes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st), + "::", + stringify!(location) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).win32HandleMetaData as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st), + "::", + stringify!(win32HandleMetaData) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).allocFlags as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CUmemAllocationProp_st), + "::", + stringify!(allocFlags) + ) + ); +} +impl Default for CUmemAllocationProp_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUmemAllocationProp = CUmemAllocationProp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct CUmemAccessDesc_st { + pub location: CUmemLocation, + pub flags: CUmemAccess_flags, +} +#[test] +fn bindgen_test_layout_CUmemAccessDesc_st() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(CUmemAccessDesc_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(CUmemAccessDesc_st)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUmemAccessDesc_st), + "::", + stringify!(location) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CUmemAccessDesc_st), + "::", + stringify!(flags) + ) + ); +} +impl Default for CUmemAccessDesc_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type CUmemAccessDesc = CUmemAccessDesc_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUgraphExecUpdateResult_enum { + CU_GRAPH_EXEC_UPDATE_SUCCESS = 0, + CU_GRAPH_EXEC_UPDATE_ERROR = 1, + CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2, + CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3, + CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4, + CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5, + CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6, +} +pub use self::CUgraphExecUpdateResult_enum as CUgraphExecUpdateResult; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaRoundMode { + cudaRoundNearest = 0, + cudaRoundZero = 1, + cudaRoundPosInf = 2, + cudaRoundMinInf = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaError { + cudaSuccess = 0, + cudaErrorInvalidValue = 1, + cudaErrorMemoryAllocation = 2, + cudaErrorInitializationError = 3, + cudaErrorCudartUnloading = 4, + cudaErrorProfilerDisabled = 5, + cudaErrorProfilerNotInitialized = 6, + cudaErrorProfilerAlreadyStarted = 7, + cudaErrorProfilerAlreadyStopped = 8, + cudaErrorInvalidConfiguration = 9, + cudaErrorInvalidPitchValue = 12, + cudaErrorInvalidSymbol = 13, + cudaErrorInvalidHostPointer = 16, + cudaErrorInvalidDevicePointer = 17, + cudaErrorInvalidTexture = 18, + cudaErrorInvalidTextureBinding = 19, + cudaErrorInvalidChannelDescriptor = 20, + cudaErrorInvalidMemcpyDirection = 21, + cudaErrorAddressOfConstant = 22, + cudaErrorTextureFetchFailed = 23, + cudaErrorTextureNotBound = 24, + cudaErrorSynchronizationError = 25, + cudaErrorInvalidFilterSetting = 26, + cudaErrorInvalidNormSetting = 27, + cudaErrorMixedDeviceExecution = 28, + cudaErrorNotYetImplemented = 31, + cudaErrorMemoryValueTooLarge = 32, + cudaErrorInsufficientDriver = 35, + cudaErrorInvalidSurface = 37, + cudaErrorDuplicateVariableName = 43, + cudaErrorDuplicateTextureName = 44, + cudaErrorDuplicateSurfaceName = 45, + cudaErrorDevicesUnavailable = 46, + cudaErrorIncompatibleDriverContext = 49, + cudaErrorMissingConfiguration = 52, + cudaErrorPriorLaunchFailure = 53, + cudaErrorLaunchMaxDepthExceeded = 65, + cudaErrorLaunchFileScopedTex = 66, + cudaErrorLaunchFileScopedSurf = 67, + cudaErrorSyncDepthExceeded = 68, + cudaErrorLaunchPendingCountExceeded = 69, + cudaErrorInvalidDeviceFunction = 98, + cudaErrorNoDevice = 100, + cudaErrorInvalidDevice = 101, + cudaErrorStartupFailure = 127, + cudaErrorInvalidKernelImage = 200, + cudaErrorDeviceUninitialized = 201, + cudaErrorMapBufferObjectFailed = 205, + cudaErrorUnmapBufferObjectFailed = 206, + cudaErrorArrayIsMapped = 207, + cudaErrorAlreadyMapped = 208, + cudaErrorNoKernelImageForDevice = 209, + cudaErrorAlreadyAcquired = 210, + cudaErrorNotMapped = 211, + cudaErrorNotMappedAsArray = 212, + cudaErrorNotMappedAsPointer = 213, + cudaErrorECCUncorrectable = 214, + cudaErrorUnsupportedLimit = 215, + cudaErrorDeviceAlreadyInUse = 216, + cudaErrorPeerAccessUnsupported = 217, + cudaErrorInvalidPtx = 218, + cudaErrorInvalidGraphicsContext = 219, + cudaErrorNvlinkUncorrectable = 220, + cudaErrorJitCompilerNotFound = 221, + cudaErrorInvalidSource = 300, + cudaErrorFileNotFound = 301, + cudaErrorSharedObjectSymbolNotFound = 302, + cudaErrorSharedObjectInitFailed = 303, + cudaErrorOperatingSystem = 304, + cudaErrorInvalidResourceHandle = 400, + cudaErrorIllegalState = 401, + cudaErrorSymbolNotFound = 500, + cudaErrorNotReady = 600, + cudaErrorIllegalAddress = 700, + cudaErrorLaunchOutOfResources = 701, + cudaErrorLaunchTimeout = 702, + cudaErrorLaunchIncompatibleTexturing = 703, + cudaErrorPeerAccessAlreadyEnabled = 704, + cudaErrorPeerAccessNotEnabled = 705, + cudaErrorSetOnActiveProcess = 708, + cudaErrorContextIsDestroyed = 709, + cudaErrorAssert = 710, + cudaErrorTooManyPeers = 711, + cudaErrorHostMemoryAlreadyRegistered = 712, + cudaErrorHostMemoryNotRegistered = 713, + cudaErrorHardwareStackError = 714, + cudaErrorIllegalInstruction = 715, + cudaErrorMisalignedAddress = 716, + cudaErrorInvalidAddressSpace = 717, + cudaErrorInvalidPc = 718, + cudaErrorLaunchFailure = 719, + cudaErrorCooperativeLaunchTooLarge = 720, + cudaErrorNotPermitted = 800, + cudaErrorNotSupported = 801, + cudaErrorSystemNotReady = 802, + cudaErrorSystemDriverMismatch = 803, + cudaErrorCompatNotSupportedOnDevice = 804, + cudaErrorStreamCaptureUnsupported = 900, + cudaErrorStreamCaptureInvalidated = 901, + cudaErrorStreamCaptureMerge = 902, + cudaErrorStreamCaptureUnmatched = 903, + cudaErrorStreamCaptureUnjoined = 904, + cudaErrorStreamCaptureIsolation = 905, + cudaErrorStreamCaptureImplicit = 906, + cudaErrorCapturedEvent = 907, + cudaErrorStreamCaptureWrongThread = 908, + cudaErrorTimeout = 909, + cudaErrorGraphExecUpdateFailure = 910, + cudaErrorUnknown = 999, + cudaErrorApiFailureBase = 10000, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaChannelFormatKind { + cudaChannelFormatKindSigned = 0, + cudaChannelFormatKindUnsigned = 1, + cudaChannelFormatKindFloat = 2, + cudaChannelFormatKindNone = 3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaChannelFormatDesc { + pub x: ::std::os::raw::c_int, + pub y: ::std::os::raw::c_int, + pub z: ::std::os::raw::c_int, + pub w: ::std::os::raw::c_int, + pub f: cudaChannelFormatKind, +} +#[test] +fn bindgen_test_layout_cudaChannelFormatDesc() { + assert_eq!( + ::std::mem::size_of::(), + 20usize, + concat!("Size of: ", stringify!(cudaChannelFormatDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(cudaChannelFormatDesc)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(z) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(w) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(f) + ) + ); +} +impl Default for cudaChannelFormatDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaArray { + _unused: [u8; 0], +} +pub type cudaArray_t = *mut cudaArray; +pub type cudaArray_const_t = *const cudaArray; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMipmappedArray { + _unused: [u8; 0], +} +pub type cudaMipmappedArray_t = *mut cudaMipmappedArray; +pub type cudaMipmappedArray_const_t = *const cudaMipmappedArray; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaMemoryType { + cudaMemoryTypeUnregistered = 0, + cudaMemoryTypeHost = 1, + cudaMemoryTypeDevice = 2, + cudaMemoryTypeManaged = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaMemcpyKind { + cudaMemcpyHostToHost = 0, + cudaMemcpyHostToDevice = 1, + cudaMemcpyDeviceToHost = 2, + cudaMemcpyDeviceToDevice = 3, + cudaMemcpyDefault = 4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaPitchedPtr { + pub ptr: *mut ::std::os::raw::c_void, + pub pitch: size_t, + pub xsize: size_t, + pub ysize: size_t, +} +#[test] +fn bindgen_test_layout_cudaPitchedPtr() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaPitchedPtr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaPitchedPtr)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ptr as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ptr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(pitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).xsize as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(xsize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ysize as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ysize) + ) + ); +} +impl Default for cudaPitchedPtr { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExtent { + pub width: size_t, + pub height: size_t, + pub depth: size_t, +} +#[test] +fn bindgen_test_layout_cudaExtent() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExtent)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExtent)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(depth) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaPos { + pub x: size_t, + pub y: size_t, + pub z: size_t, +} +#[test] +fn bindgen_test_layout_cudaPos() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaPos)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaPos)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(z) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaMemcpy3DParms { + pub srcArray: cudaArray_t, + pub srcPos: cudaPos, + pub srcPtr: cudaPitchedPtr, + pub dstArray: cudaArray_t, + pub dstPos: cudaPos, + pub dstPtr: cudaPitchedPtr, + pub extent: cudaExtent, + pub kind: cudaMemcpyKind, +} +#[test] +fn bindgen_test_layout_cudaMemcpy3DParms() { + assert_eq!( + ::std::mem::size_of::(), + 160usize, + concat!("Size of: ", stringify!(cudaMemcpy3DParms)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemcpy3DParms)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPtr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPtr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(extent) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).kind as *const _ as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(kind) + ) + ); +} +impl Default for cudaMemcpy3DParms { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaMemcpy3DPeerParms { + pub srcArray: cudaArray_t, + pub srcPos: cudaPos, + pub srcPtr: cudaPitchedPtr, + pub srcDevice: ::std::os::raw::c_int, + pub dstArray: cudaArray_t, + pub dstPos: cudaPos, + pub dstPtr: cudaPitchedPtr, + pub dstDevice: ::std::os::raw::c_int, + pub extent: cudaExtent, +} +#[test] +fn bindgen_test_layout_cudaMemcpy3DPeerParms() { + assert_eq!( + ::std::mem::size_of::(), + 168usize, + concat!("Size of: ", stringify!(cudaMemcpy3DPeerParms)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPtr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPtr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstDevice) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(extent) + ) + ); +} +impl Default for cudaMemcpy3DPeerParms { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaMemsetParams { + pub dst: *mut ::std::os::raw::c_void, + pub pitch: size_t, + pub value: ::std::os::raw::c_uint, + pub elementSize: ::std::os::raw::c_uint, + pub width: size_t, + pub height: size_t, +} +#[test] +fn bindgen_test_layout_cudaMemsetParams() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaMemsetParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemsetParams)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dst as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(dst) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(pitch) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).elementSize as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(elementSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(height) + ) + ); +} +impl Default for cudaMemsetParams { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaAccessProperty { + cudaAccessPropertyNormal = 0, + cudaAccessPropertyStreaming = 1, + cudaAccessPropertyPersisting = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] +pub struct cudaAccessPolicyWindow { + pub base_ptr: *mut ::std::os::raw::c_void, + pub num_bytes: size_t, + pub hitRatio: f32, + pub hitProp: cudaAccessProperty, + pub missProp: cudaAccessProperty, +} +#[test] +fn bindgen_test_layout_cudaAccessPolicyWindow() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaAccessPolicyWindow)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaAccessPolicyWindow)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).base_ptr as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(base_ptr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).num_bytes as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(num_bytes) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hitRatio as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitRatio) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hitProp as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitProp) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).missProp as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(missProp) + ) + ); +} +impl Default for cudaAccessPolicyWindow { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type cudaHostFn_t = + ::std::option::Option; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaHostNodeParams { + pub fn_: cudaHostFn_t, + pub userData: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_cudaHostNodeParams() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaHostNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaHostNodeParams)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(fn_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).userData as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(userData) + ) + ); +} +impl Default for cudaHostNodeParams { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaStreamCaptureStatus { + cudaStreamCaptureStatusNone = 0, + cudaStreamCaptureStatusActive = 1, + cudaStreamCaptureStatusInvalidated = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaStreamCaptureMode { + cudaStreamCaptureModeGlobal = 0, + cudaStreamCaptureModeThreadLocal = 1, + cudaStreamCaptureModeRelaxed = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaSynchronizationPolicy { + cudaSyncPolicyAuto = 1, + cudaSyncPolicySpin = 2, + cudaSyncPolicyYield = 3, + cudaSyncPolicyBlockingSync = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaStreamAttrID { + cudaStreamAttributeAccessPolicyWindow = 1, + cudaStreamAttributeSynchronizationPolicy = 3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaStreamAttrValue { + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub syncPolicy: cudaSynchronizationPolicy, + _bindgen_union_align: [u64; 4usize], +} +#[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)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).accessPolicyWindow as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaStreamAttrValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).syncPolicy as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaStreamAttrValue), + "::", + stringify!(syncPolicy) + ) + ); +} +impl Default for cudaStreamAttrValue { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphicsResource { + _unused: [u8; 0], +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGraphicsRegisterFlags { + cudaGraphicsRegisterFlagsNone = 0, + cudaGraphicsRegisterFlagsReadOnly = 1, + cudaGraphicsRegisterFlagsWriteDiscard = 2, + cudaGraphicsRegisterFlagsSurfaceLoadStore = 4, + cudaGraphicsRegisterFlagsTextureGather = 8, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGraphicsMapFlags { + cudaGraphicsMapFlagsNone = 0, + cudaGraphicsMapFlagsReadOnly = 1, + cudaGraphicsMapFlagsWriteDiscard = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGraphicsCubeFace { + cudaGraphicsCubeFacePositiveX = 0, + cudaGraphicsCubeFaceNegativeX = 1, + cudaGraphicsCubeFacePositiveY = 2, + cudaGraphicsCubeFaceNegativeY = 3, + cudaGraphicsCubeFacePositiveZ = 4, + cudaGraphicsCubeFaceNegativeZ = 5, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaKernelNodeAttrID { + cudaKernelNodeAttributeAccessPolicyWindow = 1, + cudaKernelNodeAttributeCooperative = 2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaKernelNodeAttrValue { + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub cooperative: ::std::os::raw::c_int, + _bindgen_union_align: [u64; 4usize], +} +#[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)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).accessPolicyWindow as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).cooperative as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(cooperative) + ) + ); +} +impl Default for cudaKernelNodeAttrValue { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaResourceType { + cudaResourceTypeArray = 0, + cudaResourceTypeMipmappedArray = 1, + cudaResourceTypeLinear = 2, + cudaResourceTypePitch2D = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaResourceViewFormat { + cudaResViewFormatNone = 0, + cudaResViewFormatUnsignedChar1 = 1, + cudaResViewFormatUnsignedChar2 = 2, + cudaResViewFormatUnsignedChar4 = 3, + cudaResViewFormatSignedChar1 = 4, + cudaResViewFormatSignedChar2 = 5, + cudaResViewFormatSignedChar4 = 6, + cudaResViewFormatUnsignedShort1 = 7, + cudaResViewFormatUnsignedShort2 = 8, + cudaResViewFormatUnsignedShort4 = 9, + cudaResViewFormatSignedShort1 = 10, + cudaResViewFormatSignedShort2 = 11, + cudaResViewFormatSignedShort4 = 12, + cudaResViewFormatUnsignedInt1 = 13, + cudaResViewFormatUnsignedInt2 = 14, + cudaResViewFormatUnsignedInt4 = 15, + cudaResViewFormatSignedInt1 = 16, + cudaResViewFormatSignedInt2 = 17, + cudaResViewFormatSignedInt4 = 18, + cudaResViewFormatHalf1 = 19, + cudaResViewFormatHalf2 = 20, + cudaResViewFormatHalf4 = 21, + cudaResViewFormatFloat1 = 22, + cudaResViewFormatFloat2 = 23, + cudaResViewFormatFloat4 = 24, + cudaResViewFormatUnsignedBlockCompressed1 = 25, + cudaResViewFormatUnsignedBlockCompressed2 = 26, + cudaResViewFormatUnsignedBlockCompressed3 = 27, + cudaResViewFormatUnsignedBlockCompressed4 = 28, + cudaResViewFormatSignedBlockCompressed4 = 29, + cudaResViewFormatUnsignedBlockCompressed5 = 30, + cudaResViewFormatSignedBlockCompressed5 = 31, + cudaResViewFormatUnsignedBlockCompressed6H = 32, + cudaResViewFormatSignedBlockCompressed6H = 33, + cudaResViewFormatUnsignedBlockCompressed7 = 34, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaResourceDesc { + pub resType: cudaResourceType, + pub res: cudaResourceDesc__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaResourceDesc__bindgen_ty_1 { + pub array: cudaResourceDesc__bindgen_ty_1__bindgen_ty_1, + pub mipmap: cudaResourceDesc__bindgen_ty_1__bindgen_ty_2, + pub linear: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, + pub pitch2D: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, + _bindgen_union_align: [u64; 7usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { + pub array: cudaArray_t, +} +#[test] +fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + 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) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).array + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(array) + ) + ); +} +impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { + pub mipmap: cudaMipmappedArray_t, +} +#[test] +fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + 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) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmap + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(mipmap) + ) + ); +} +impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { + pub devPtr: *mut ::std::os::raw::c_void, + pub desc: cudaChannelFormatDesc, + pub sizeInBytes: size_t, +} +#[test] +fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + 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) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).devPtr + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(devPtr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).desc + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(desc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sizeInBytes + as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(sizeInBytes) + ) + ); +} +impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { + pub devPtr: *mut ::std::os::raw::c_void, + pub desc: cudaChannelFormatDesc, + pub width: size_t, + pub height: size_t, + pub pitchInBytes: size_t, +} +#[test] +fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + 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) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).devPtr + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(devPtr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).desc + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(desc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).width + as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).height + as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pitchInBytes + as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(pitchInBytes) + ) + ); +} +impl Default for cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).array as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmap as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(mipmap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).linear as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(linear) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pitch2D as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(pitch2D) + ) + ); +} +impl Default for cudaResourceDesc__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaResourceDesc() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaResourceDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaResourceDesc)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).resType as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(resType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).res as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(res) + ) + ); +} +impl Default for cudaResourceDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaResourceViewDesc { + pub format: cudaResourceViewFormat, + pub width: size_t, + pub height: size_t, + pub depth: size_t, + pub firstMipmapLevel: ::std::os::raw::c_uint, + pub lastMipmapLevel: ::std::os::raw::c_uint, + pub firstLayer: ::std::os::raw::c_uint, + pub lastLayer: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_cudaResourceViewDesc() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(cudaResourceViewDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaResourceViewDesc)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(depth) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).firstMipmapLevel as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstMipmapLevel) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).lastMipmapLevel as *const _ as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastMipmapLevel) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).firstLayer as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstLayer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).lastLayer as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastLayer) + ) + ); +} +impl Default for cudaResourceViewDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaPointerAttributes { + pub type_: cudaMemoryType, + pub device: ::std::os::raw::c_int, + pub devicePointer: *mut ::std::os::raw::c_void, + pub hostPointer: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_cudaPointerAttributes() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaPointerAttributes)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaPointerAttributes)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).device as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(device) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).devicePointer as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(devicePointer) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hostPointer as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(hostPointer) + ) + ); +} +impl Default for cudaPointerAttributes { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaFuncAttributes { + pub sharedSizeBytes: size_t, + pub constSizeBytes: size_t, + pub localSizeBytes: size_t, + pub maxThreadsPerBlock: ::std::os::raw::c_int, + pub numRegs: ::std::os::raw::c_int, + pub ptxVersion: ::std::os::raw::c_int, + pub binaryVersion: ::std::os::raw::c_int, + pub cacheModeCA: ::std::os::raw::c_int, + pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int, + pub preferredShmemCarveout: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_cudaFuncAttributes() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaFuncAttributes)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaFuncAttributes)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedSizeBytes as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(sharedSizeBytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).constSizeBytes as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(constSizeBytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).localSizeBytes as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(localSizeBytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).numRegs as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(numRegs) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ptxVersion as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(ptxVersion) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).binaryVersion as *const _ as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(binaryVersion) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).cacheModeCA as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(cacheModeCA) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxDynamicSharedSizeBytes as *const _ + as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxDynamicSharedSizeBytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).preferredShmemCarveout as *const _ + as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(preferredShmemCarveout) + ) + ); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaFuncAttribute { + cudaFuncAttributeMaxDynamicSharedMemorySize = 8, + cudaFuncAttributePreferredSharedMemoryCarveout = 9, + cudaFuncAttributeMax = 10, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaFuncCache { + cudaFuncCachePreferNone = 0, + cudaFuncCachePreferShared = 1, + cudaFuncCachePreferL1 = 2, + cudaFuncCachePreferEqual = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaSharedMemConfig { + cudaSharedMemBankSizeDefault = 0, + cudaSharedMemBankSizeFourByte = 1, + cudaSharedMemBankSizeEightByte = 2, +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaSharedCarveout { + cudaSharedmemCarveoutDefault = -1, + cudaSharedmemCarveoutMaxShared = 100, + cudaSharedmemCarveoutMaxL1 = 0, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaComputeMode { + cudaComputeModeDefault = 0, + cudaComputeModeExclusive = 1, + cudaComputeModeProhibited = 2, + cudaComputeModeExclusiveProcess = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaLimit { + cudaLimitStackSize = 0, + cudaLimitPrintfFifoSize = 1, + cudaLimitMallocHeapSize = 2, + cudaLimitDevRuntimeSyncDepth = 3, + cudaLimitDevRuntimePendingLaunchCount = 4, + cudaLimitMaxL2FetchGranularity = 5, + cudaLimitPersistingL2CacheSize = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaMemoryAdvise { + cudaMemAdviseSetReadMostly = 1, + cudaMemAdviseUnsetReadMostly = 2, + cudaMemAdviseSetPreferredLocation = 3, + cudaMemAdviseUnsetPreferredLocation = 4, + cudaMemAdviseSetAccessedBy = 5, + cudaMemAdviseUnsetAccessedBy = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaMemRangeAttribute { + cudaMemRangeAttributeReadMostly = 1, + cudaMemRangeAttributePreferredLocation = 2, + cudaMemRangeAttributeAccessedBy = 3, + cudaMemRangeAttributeLastPrefetchLocation = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaOutputMode { + cudaKeyValuePair = 0, + cudaCSV = 1, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaDeviceAttr { + cudaDevAttrMaxThreadsPerBlock = 1, + cudaDevAttrMaxBlockDimX = 2, + cudaDevAttrMaxBlockDimY = 3, + cudaDevAttrMaxBlockDimZ = 4, + cudaDevAttrMaxGridDimX = 5, + cudaDevAttrMaxGridDimY = 6, + cudaDevAttrMaxGridDimZ = 7, + cudaDevAttrMaxSharedMemoryPerBlock = 8, + cudaDevAttrTotalConstantMemory = 9, + cudaDevAttrWarpSize = 10, + cudaDevAttrMaxPitch = 11, + cudaDevAttrMaxRegistersPerBlock = 12, + cudaDevAttrClockRate = 13, + cudaDevAttrTextureAlignment = 14, + cudaDevAttrGpuOverlap = 15, + cudaDevAttrMultiProcessorCount = 16, + cudaDevAttrKernelExecTimeout = 17, + cudaDevAttrIntegrated = 18, + cudaDevAttrCanMapHostMemory = 19, + cudaDevAttrComputeMode = 20, + cudaDevAttrMaxTexture1DWidth = 21, + cudaDevAttrMaxTexture2DWidth = 22, + cudaDevAttrMaxTexture2DHeight = 23, + cudaDevAttrMaxTexture3DWidth = 24, + cudaDevAttrMaxTexture3DHeight = 25, + cudaDevAttrMaxTexture3DDepth = 26, + cudaDevAttrMaxTexture2DLayeredWidth = 27, + cudaDevAttrMaxTexture2DLayeredHeight = 28, + cudaDevAttrMaxTexture2DLayeredLayers = 29, + cudaDevAttrSurfaceAlignment = 30, + cudaDevAttrConcurrentKernels = 31, + cudaDevAttrEccEnabled = 32, + cudaDevAttrPciBusId = 33, + cudaDevAttrPciDeviceId = 34, + cudaDevAttrTccDriver = 35, + cudaDevAttrMemoryClockRate = 36, + cudaDevAttrGlobalMemoryBusWidth = 37, + cudaDevAttrL2CacheSize = 38, + cudaDevAttrMaxThreadsPerMultiProcessor = 39, + cudaDevAttrAsyncEngineCount = 40, + cudaDevAttrUnifiedAddressing = 41, + cudaDevAttrMaxTexture1DLayeredWidth = 42, + cudaDevAttrMaxTexture1DLayeredLayers = 43, + cudaDevAttrMaxTexture2DGatherWidth = 45, + cudaDevAttrMaxTexture2DGatherHeight = 46, + cudaDevAttrMaxTexture3DWidthAlt = 47, + cudaDevAttrMaxTexture3DHeightAlt = 48, + cudaDevAttrMaxTexture3DDepthAlt = 49, + cudaDevAttrPciDomainId = 50, + cudaDevAttrTexturePitchAlignment = 51, + cudaDevAttrMaxTextureCubemapWidth = 52, + cudaDevAttrMaxTextureCubemapLayeredWidth = 53, + cudaDevAttrMaxTextureCubemapLayeredLayers = 54, + cudaDevAttrMaxSurface1DWidth = 55, + cudaDevAttrMaxSurface2DWidth = 56, + cudaDevAttrMaxSurface2DHeight = 57, + cudaDevAttrMaxSurface3DWidth = 58, + cudaDevAttrMaxSurface3DHeight = 59, + cudaDevAttrMaxSurface3DDepth = 60, + cudaDevAttrMaxSurface1DLayeredWidth = 61, + cudaDevAttrMaxSurface1DLayeredLayers = 62, + cudaDevAttrMaxSurface2DLayeredWidth = 63, + cudaDevAttrMaxSurface2DLayeredHeight = 64, + cudaDevAttrMaxSurface2DLayeredLayers = 65, + cudaDevAttrMaxSurfaceCubemapWidth = 66, + cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67, + cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68, + cudaDevAttrMaxTexture1DLinearWidth = 69, + cudaDevAttrMaxTexture2DLinearWidth = 70, + cudaDevAttrMaxTexture2DLinearHeight = 71, + cudaDevAttrMaxTexture2DLinearPitch = 72, + cudaDevAttrMaxTexture2DMipmappedWidth = 73, + cudaDevAttrMaxTexture2DMipmappedHeight = 74, + cudaDevAttrComputeCapabilityMajor = 75, + cudaDevAttrComputeCapabilityMinor = 76, + cudaDevAttrMaxTexture1DMipmappedWidth = 77, + cudaDevAttrStreamPrioritiesSupported = 78, + cudaDevAttrGlobalL1CacheSupported = 79, + cudaDevAttrLocalL1CacheSupported = 80, + cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81, + cudaDevAttrMaxRegistersPerMultiprocessor = 82, + cudaDevAttrManagedMemory = 83, + cudaDevAttrIsMultiGpuBoard = 84, + cudaDevAttrMultiGpuBoardGroupID = 85, + cudaDevAttrHostNativeAtomicSupported = 86, + cudaDevAttrSingleToDoublePrecisionPerfRatio = 87, + cudaDevAttrPageableMemoryAccess = 88, + cudaDevAttrConcurrentManagedAccess = 89, + cudaDevAttrComputePreemptionSupported = 90, + cudaDevAttrCanUseHostPointerForRegisteredMem = 91, + cudaDevAttrReserved92 = 92, + cudaDevAttrReserved93 = 93, + cudaDevAttrReserved94 = 94, + cudaDevAttrCooperativeLaunch = 95, + cudaDevAttrCooperativeMultiDeviceLaunch = 96, + cudaDevAttrMaxSharedMemoryPerBlockOptin = 97, + cudaDevAttrCanFlushRemoteWrites = 98, + cudaDevAttrHostRegisterSupported = 99, + cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100, + cudaDevAttrDirectManagedMemAccessFromHost = 101, + cudaDevAttrMaxBlocksPerMultiprocessor = 106, + cudaDevAttrReservedSharedMemoryPerBlock = 111, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaDeviceP2PAttr { + cudaDevP2PAttrPerformanceRank = 1, + cudaDevP2PAttrAccessSupported = 2, + cudaDevP2PAttrNativeAtomicSupported = 3, + cudaDevP2PAttrCudaArrayAccessSupported = 4, +} +pub type cudaUUID_t = CUuuid_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaDeviceProp { + pub name: [::std::os::raw::c_char; 256usize], + pub uuid: cudaUUID_t, + pub luid: [::std::os::raw::c_char; 8usize], + pub luidDeviceNodeMask: ::std::os::raw::c_uint, + pub totalGlobalMem: size_t, + pub sharedMemPerBlock: size_t, + pub regsPerBlock: ::std::os::raw::c_int, + pub warpSize: ::std::os::raw::c_int, + pub memPitch: size_t, + pub maxThreadsPerBlock: ::std::os::raw::c_int, + pub maxThreadsDim: [::std::os::raw::c_int; 3usize], + pub maxGridSize: [::std::os::raw::c_int; 3usize], + pub clockRate: ::std::os::raw::c_int, + pub totalConstMem: size_t, + pub major: ::std::os::raw::c_int, + pub minor: ::std::os::raw::c_int, + pub textureAlignment: size_t, + pub texturePitchAlignment: size_t, + pub deviceOverlap: ::std::os::raw::c_int, + pub multiProcessorCount: ::std::os::raw::c_int, + pub kernelExecTimeoutEnabled: ::std::os::raw::c_int, + pub integrated: ::std::os::raw::c_int, + pub canMapHostMemory: ::std::os::raw::c_int, + pub computeMode: ::std::os::raw::c_int, + pub maxTexture1D: ::std::os::raw::c_int, + pub maxTexture1DMipmap: ::std::os::raw::c_int, + pub maxTexture1DLinear: ::std::os::raw::c_int, + pub maxTexture2D: [::std::os::raw::c_int; 2usize], + pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize], + pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize], + pub maxTexture2DGather: [::std::os::raw::c_int; 2usize], + pub maxTexture3D: [::std::os::raw::c_int; 3usize], + pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize], + pub maxTextureCubemap: ::std::os::raw::c_int, + pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize], + pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize], + pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize], + pub maxSurface1D: ::std::os::raw::c_int, + pub maxSurface2D: [::std::os::raw::c_int; 2usize], + pub maxSurface3D: [::std::os::raw::c_int; 3usize], + pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize], + pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize], + pub maxSurfaceCubemap: ::std::os::raw::c_int, + pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize], + pub surfaceAlignment: size_t, + pub concurrentKernels: ::std::os::raw::c_int, + pub ECCEnabled: ::std::os::raw::c_int, + pub pciBusID: ::std::os::raw::c_int, + pub pciDeviceID: ::std::os::raw::c_int, + pub pciDomainID: ::std::os::raw::c_int, + pub tccDriver: ::std::os::raw::c_int, + pub asyncEngineCount: ::std::os::raw::c_int, + pub unifiedAddressing: ::std::os::raw::c_int, + pub memoryClockRate: ::std::os::raw::c_int, + pub memoryBusWidth: ::std::os::raw::c_int, + pub l2CacheSize: ::std::os::raw::c_int, + pub persistingL2CacheMaxSize: ::std::os::raw::c_int, + pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int, + pub streamPrioritiesSupported: ::std::os::raw::c_int, + pub globalL1CacheSupported: ::std::os::raw::c_int, + pub localL1CacheSupported: ::std::os::raw::c_int, + pub sharedMemPerMultiprocessor: size_t, + pub regsPerMultiprocessor: ::std::os::raw::c_int, + pub managedMemory: ::std::os::raw::c_int, + pub isMultiGpuBoard: ::std::os::raw::c_int, + pub multiGpuBoardGroupID: ::std::os::raw::c_int, + pub hostNativeAtomicSupported: ::std::os::raw::c_int, + pub singleToDoublePrecisionPerfRatio: ::std::os::raw::c_int, + pub pageableMemoryAccess: ::std::os::raw::c_int, + pub concurrentManagedAccess: ::std::os::raw::c_int, + pub computePreemptionSupported: ::std::os::raw::c_int, + pub canUseHostPointerForRegisteredMem: ::std::os::raw::c_int, + pub cooperativeLaunch: ::std::os::raw::c_int, + pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int, + pub sharedMemPerBlockOptin: size_t, + pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int, + pub directManagedMemAccessFromHost: ::std::os::raw::c_int, + pub maxBlocksPerMultiProcessor: ::std::os::raw::c_int, + pub accessPolicyMaxWindowSize: ::std::os::raw::c_int, + pub reservedSharedMemPerBlock: size_t, +} +#[test] +fn bindgen_test_layout_cudaDeviceProp() { + assert_eq!( + ::std::mem::size_of::(), + 728usize, + concat!("Size of: ", stringify!(cudaDeviceProp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaDeviceProp)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).uuid as *const _ as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(uuid) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).luid as *const _ as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luid) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).luidDeviceNodeMask as *const _ as usize + }, + 280usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luidDeviceNodeMask) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).totalGlobalMem as *const _ as usize }, + 288usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalGlobalMem) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedMemPerBlock as *const _ as usize + }, + 296usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlock) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).regsPerBlock as *const _ as usize }, + 304usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerBlock) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).warpSize as *const _ as usize }, + 308usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(warpSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).memPitch as *const _ as usize }, + 312usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memPitch) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize + }, + 320usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxThreadsDim as *const _ as usize }, + 324usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsDim) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxGridSize as *const _ as usize }, + 336usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxGridSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).clockRate as *const _ as usize }, + 348usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clockRate) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).totalConstMem as *const _ as usize }, + 352usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalConstMem) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, + 360usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(major) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, + 364usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(minor) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).textureAlignment as *const _ as usize }, + 368usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(textureAlignment) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).texturePitchAlignment as *const _ as usize + }, + 376usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(texturePitchAlignment) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).deviceOverlap as *const _ as usize }, + 384usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deviceOverlap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).multiProcessorCount as *const _ as usize + }, + 388usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiProcessorCount) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).kernelExecTimeoutEnabled as *const _ as usize + }, + 392usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(kernelExecTimeoutEnabled) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).integrated as *const _ as usize }, + 396usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(integrated) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).canMapHostMemory as *const _ as usize }, + 400usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canMapHostMemory) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).computeMode as *const _ as usize }, + 404usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computeMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxTexture1D as *const _ as usize }, + 408usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1D) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture1DMipmap as *const _ as usize + }, + 412usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DMipmap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture1DLinear as *const _ as usize + }, + 416usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLinear) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxTexture2D as *const _ as usize }, + 420usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2D) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture2DMipmap as *const _ as usize + }, + 428usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DMipmap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture2DLinear as *const _ as usize + }, + 436usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLinear) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture2DGather as *const _ as usize + }, + 448usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DGather) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxTexture3D as *const _ as usize }, + 456usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3D) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxTexture3DAlt as *const _ as usize }, + 468usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3DAlt) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTextureCubemap as *const _ as usize + }, + 480usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture1DLayered as *const _ as usize + }, + 484usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLayered) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTexture2DLayered as *const _ as usize + }, + 492usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLayered) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxTextureCubemapLayered as *const _ as usize + }, + 504usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemapLayered) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxSurface1D as *const _ as usize }, + 512usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1D) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxSurface2D as *const _ as usize }, + 516usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2D) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxSurface3D as *const _ as usize }, + 524usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface3D) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxSurface1DLayered as *const _ as usize + }, + 536usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1DLayered) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxSurface2DLayered as *const _ as usize + }, + 544usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2DLayered) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxSurfaceCubemap as *const _ as usize + }, + 556usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxSurfaceCubemapLayered as *const _ as usize + }, + 560usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemapLayered) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).surfaceAlignment as *const _ as usize }, + 568usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(surfaceAlignment) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).concurrentKernels as *const _ as usize + }, + 576usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentKernels) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ECCEnabled as *const _ as usize }, + 580usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ECCEnabled) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pciBusID as *const _ as usize }, + 584usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciBusID) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pciDeviceID as *const _ as usize }, + 588usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDeviceID) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pciDomainID as *const _ as usize }, + 592usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDomainID) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).tccDriver as *const _ as usize }, + 596usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(tccDriver) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).asyncEngineCount as *const _ as usize }, + 600usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(asyncEngineCount) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).unifiedAddressing as *const _ as usize + }, + 604usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedAddressing) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).memoryClockRate as *const _ as usize }, + 608usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryClockRate) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).memoryBusWidth as *const _ as usize }, + 612usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryBusWidth) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).l2CacheSize as *const _ as usize }, + 616usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(l2CacheSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).persistingL2CacheMaxSize as *const _ as usize + }, + 620usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(persistingL2CacheMaxSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxThreadsPerMultiProcessor as *const _ + as usize + }, + 624usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerMultiProcessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).streamPrioritiesSupported as *const _ + as usize + }, + 628usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(streamPrioritiesSupported) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).globalL1CacheSupported as *const _ as usize + }, + 632usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(globalL1CacheSupported) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).localL1CacheSupported as *const _ as usize + }, + 636usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(localL1CacheSupported) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedMemPerMultiprocessor as *const _ + as usize + }, + 640usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerMultiprocessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).regsPerMultiprocessor as *const _ as usize + }, + 648usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerMultiprocessor) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).managedMemory as *const _ as usize }, + 652usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(managedMemory) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).isMultiGpuBoard as *const _ as usize }, + 656usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(isMultiGpuBoard) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).multiGpuBoardGroupID as *const _ as usize + }, + 660usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiGpuBoardGroupID) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hostNativeAtomicSupported as *const _ + as usize + }, + 664usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostNativeAtomicSupported) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).singleToDoublePrecisionPerfRatio as *const _ + as usize + }, + 668usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(singleToDoublePrecisionPerfRatio) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pageableMemoryAccess as *const _ as usize + }, + 672usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccess) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).concurrentManagedAccess as *const _ as usize + }, + 676usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentManagedAccess) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).computePreemptionSupported as *const _ + as usize + }, + 680usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computePreemptionSupported) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).canUseHostPointerForRegisteredMem as *const _ + as usize + }, + 684usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canUseHostPointerForRegisteredMem) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).cooperativeLaunch as *const _ as usize + }, + 688usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeLaunch) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).cooperativeMultiDeviceLaunch as *const _ + as usize + }, + 692usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeMultiDeviceLaunch) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedMemPerBlockOptin as *const _ as usize + }, + 696usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlockOptin) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pageableMemoryAccessUsesHostPageTables + as *const _ as usize + }, + 704usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccessUsesHostPageTables) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).directManagedMemAccessFromHost as *const _ + as usize + }, + 708usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(directManagedMemAccessFromHost) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxBlocksPerMultiProcessor as *const _ + as usize + }, + 712usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxBlocksPerMultiProcessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).accessPolicyMaxWindowSize as *const _ + as usize + }, + 716usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(accessPolicyMaxWindowSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reservedSharedMemPerBlock as *const _ + as usize + }, + 720usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reservedSharedMemPerBlock) + ) + ); +} +impl Default for cudaDeviceProp { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaIpcEventHandle_st { + pub reserved: [::std::os::raw::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_cudaIpcEventHandle_st() { + 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::null::())).reserved as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcEventHandle_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for cudaIpcEventHandle_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaIpcMemHandle_st { + pub reserved: [::std::os::raw::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_cudaIpcMemHandle_st() { + 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::null::())).reserved as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcMemHandle_st), + "::", + stringify!(reserved) + ) + ); +} +impl Default for cudaIpcMemHandle_st { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +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: ::std::os::raw::c_ulonglong, + pub flags: ::std::os::raw::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { + pub fd: ::std::os::raw::c_int, + pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciBufObject: *const ::std::os::raw::c_void, + _bindgen_union_align: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::std::os::raw::c_void, + pub name: *const ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { + 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::null::())) + .handle as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); +} +impl Default for cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { + 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::null::())).fd as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).win32 as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).nvSciBufObject + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciBufObject) + ) + ); +} +impl Default for cudaExternalMemoryHandleDesc__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { + 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::null::())).type_ as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).handle as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).size as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(flags) + ) + ); +} +impl Default for cudaExternalMemoryHandleDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalMemoryBufferDesc { + pub offset: ::std::os::raw::c_ulonglong, + pub size: ::std::os::raw::c_ulonglong, + pub flags: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { + 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::null::())).offset as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).size as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalMemoryMipmappedArrayDesc { + pub offset: ::std::os::raw::c_ulonglong, + pub formatDesc: cudaChannelFormatDesc, + pub extent: cudaExtent, + pub flags: ::std::os::raw::c_uint, + pub numLevels: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { + 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::null::())).offset as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).formatDesc as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(formatDesc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).extent as *const _ + as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(extent) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).numLevels as *const _ + as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(numLevels) + ) + ); +} +impl Default for cudaExternalMemoryMipmappedArrayDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaExternalSemaphoreHandleType { + cudaExternalSemaphoreHandleTypeOpaqueFd = 1, + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, + cudaExternalSemaphoreHandleTypeD3D12Fence = 4, + cudaExternalSemaphoreHandleTypeD3D11Fence = 5, + cudaExternalSemaphoreHandleTypeNvSciSync = 6, + cudaExternalSemaphoreHandleTypeKeyedMutex = 7, + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreHandleDesc { + pub type_: cudaExternalSemaphoreHandleType, + pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { + pub fd: ::std::os::raw::c_int, + pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciSyncObj: *const ::std::os::raw::c_void, + _bindgen_union_align: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::std::os::raw::c_void, + pub name: *const ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { + 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::null::())) + .handle as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); +} +impl Default for cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { + 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::null::())).fd as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).win32 + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).nvSciSyncObj + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciSyncObj) + ) + ); +} +impl Default for cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { + 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::null::())).type_ as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).handle as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(flags) + ) + ); +} +impl Default for cudaExternalSemaphoreHandleDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams { + pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, +} +#[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, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { + pub value: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1() { + 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::null::( + ))) + .value as *const _ 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 ::std::os::raw::c_void, + pub reserved: ::std::os::raw::c_ulonglong, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2() { + 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::null::( + ))) + .fence as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::( + ))) + .reserved as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +impl Default for cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { + pub key: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3() { + 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::null::( + ))) + .key as *const _ 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() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + 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::null::())).fence + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).nvSciSync + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).keyedMutex + as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); +} +impl Default for cudaExternalSemaphoreSignalParams__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).params as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(flags) + ) + ); +} +impl Default for cudaExternalSemaphoreSignalParams { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams { + pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, + pub flags: ::std::os::raw::c_uint, +} +#[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, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { + pub value: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1() { + 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::null::())) + .value as *const _ 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 ::std::os::raw::c_void, + pub reserved: ::std::os::raw::c_ulonglong, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2() { + 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::null::())) + .fence as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .reserved as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +impl Default for cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { + pub key: ::std::os::raw::c_ulonglong, + pub timeoutMs: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3() { + 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::null::())) + .key as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .timeoutMs as *const _ 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() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + 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::null::())).fence + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).nvSciSync + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).keyedMutex + as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); +} +impl Default for cudaExternalSemaphoreWaitParams__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).params as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(flags) + ) + ); +} +impl Default for cudaExternalSemaphoreWaitParams { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub use self::cudaError as cudaError_t; +pub type cudaStream_t = *mut CUstream_st; +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 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; +pub type cudaGraph_t = *mut CUgraph_st; +pub type cudaGraphNode_t = *mut CUgraphNode_st; +pub type cudaFunction_t = *mut CUfunc_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaCGScope { + cudaCGScopeInvalid = 0, + cudaCGScopeGrid = 1, + cudaCGScopeMultiGrid = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaLaunchParams { + pub func: *mut ::std::os::raw::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub args: *mut *mut ::std::os::raw::c_void, + pub sharedMem: size_t, + pub stream: cudaStream_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)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(func) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(blockDim) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).args as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(args) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sharedMem as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(sharedMem) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(stream) + ) + ); +} +impl Default for cudaLaunchParams { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct cudaKernelNodeParams { + pub func: *mut ::std::os::raw::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub sharedMemBytes: ::std::os::raw::c_uint, + pub kernelParams: *mut *mut ::std::os::raw::c_void, + pub extra: *mut *mut ::std::os::raw::c_void, +} +#[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)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(func) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(blockDim) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sharedMemBytes as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(sharedMemBytes) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).kernelParams as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(kernelParams) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).extra as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(extra) + ) + ); +} +impl Default for cudaKernelNodeParams { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGraphNodeType { + cudaGraphNodeTypeKernel = 0, + cudaGraphNodeTypeMemcpy = 1, + cudaGraphNodeTypeMemset = 2, + cudaGraphNodeTypeHost = 3, + cudaGraphNodeTypeGraph = 4, + cudaGraphNodeTypeEmpty = 5, + cudaGraphNodeTypeCount = 6, +} +pub type cudaGraphExec_t = *mut CUgraphExec_st; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGraphExecUpdateResult { + cudaGraphExecUpdateSuccess = 0, + cudaGraphExecUpdateError = 1, + cudaGraphExecUpdateErrorTopologyChanged = 2, + cudaGraphExecUpdateErrorNodeTypeChanged = 3, + cudaGraphExecUpdateErrorFunctionChanged = 4, + cudaGraphExecUpdateErrorParametersChanged = 5, + cudaGraphExecUpdateErrorNotSupported = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaSurfaceBoundaryMode { + cudaBoundaryModeZero = 0, + cudaBoundaryModeClamp = 1, + cudaBoundaryModeTrap = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaSurfaceFormatMode { + cudaFormatModeForced = 0, + cudaFormatModeAuto = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct surfaceReference { + pub channelDesc: cudaChannelFormatDesc, +} +#[test] +fn bindgen_test_layout_surfaceReference() { + assert_eq!( + ::std::mem::size_of::(), + 20usize, + concat!("Size of: ", stringify!(surfaceReference)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(surfaceReference)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).channelDesc as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(surfaceReference), + "::", + stringify!(channelDesc) + ) + ); +} +impl Default for surfaceReference { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type cudaSurfaceObject_t = ::std::os::raw::c_ulonglong; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaTextureAddressMode { + cudaAddressModeWrap = 0, + cudaAddressModeClamp = 1, + cudaAddressModeMirror = 2, + cudaAddressModeBorder = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaTextureFilterMode { + cudaFilterModePoint = 0, + cudaFilterModeLinear = 1, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaTextureReadMode { + cudaReadModeElementType = 0, + cudaReadModeNormalizedFloat = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] +pub struct textureReference { + pub normalized: ::std::os::raw::c_int, + pub filterMode: cudaTextureFilterMode, + pub addressMode: [cudaTextureAddressMode; 3usize], + pub channelDesc: cudaChannelFormatDesc, + pub sRGB: ::std::os::raw::c_int, + pub maxAnisotropy: ::std::os::raw::c_uint, + pub mipmapFilterMode: cudaTextureFilterMode, + pub mipmapLevelBias: f32, + pub minMipmapLevelClamp: f32, + pub maxMipmapLevelClamp: f32, + pub disableTrilinearOptimization: ::std::os::raw::c_int, + pub __cudaReserved: [::std::os::raw::c_int; 14usize], +} +#[test] +fn bindgen_test_layout_textureReference() { + assert_eq!( + ::std::mem::size_of::(), + 124usize, + concat!("Size of: ", stringify!(textureReference)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(textureReference)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).normalized as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(normalized) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(filterMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).addressMode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(addressMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).channelDesc as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(channelDesc) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sRGB as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(sRGB) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(maxAnisotropy) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(mipmapFilterMode) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(mipmapLevelBias) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(minMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(maxMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).disableTrilinearOptimization as *const _ + as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(disableTrilinearOptimization) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__cudaReserved as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(__cudaReserved) + ) + ); +} +impl Default for textureReference { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] +pub struct cudaTextureDesc { + pub addressMode: [cudaTextureAddressMode; 3usize], + pub filterMode: cudaTextureFilterMode, + pub readMode: cudaTextureReadMode, + pub sRGB: ::std::os::raw::c_int, + pub borderColor: [f32; 4usize], + pub normalizedCoords: ::std::os::raw::c_int, + pub maxAnisotropy: ::std::os::raw::c_uint, + pub mipmapFilterMode: cudaTextureFilterMode, + pub mipmapLevelBias: f32, + pub minMipmapLevelClamp: f32, + pub maxMipmapLevelClamp: f32, + pub disableTrilinearOptimization: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_cudaTextureDesc() { + assert_eq!( + ::std::mem::size_of::(), + 68usize, + concat!("Size of: ", stringify!(cudaTextureDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(cudaTextureDesc)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).addressMode as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(addressMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(filterMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).readMode as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(readMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sRGB as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(sRGB) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).borderColor as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(borderColor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).normalizedCoords as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(normalizedCoords) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxAnisotropy) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapFilterMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapLevelBias) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(minMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).disableTrilinearOptimization as *const _ + as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(disableTrilinearOptimization) + ) + ); +} +impl Default for cudaTextureDesc { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type cudaTextureObject_t = ::std::os::raw::c_ulonglong; +pub type cudaStreamCallback_t = ::std::option::Option< + unsafe extern "C" fn( + stream: cudaStream_t, + status: cudaError_t, + userData: *mut ::std::os::raw::c_void, + ), +>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGLDeviceList { + cudaGLDeviceListAll = 1, + cudaGLDeviceListCurrentFrame = 2, + cudaGLDeviceListNextFrame = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum cudaGLMapFlags { + cudaGLMapFlagsNone = 0, + cudaGLMapFlagsReadOnly = 1, + cudaGLMapFlagsWriteDiscard = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +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; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum libraryPropertyType_t { + MAJOR_VERSION = 0, + MINOR_VERSION = 1, + PATCH_LEVEL = 2, +} +pub use self::libraryPropertyType_t as libraryPropertyType; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum CUoutput_mode_enum { + CU_OUT_KEY_VALUE_PAIR = 0, + CU_OUT_CSV = 1, +} +pub use self::CUoutput_mode_enum as CUoutput_mode; diff --git a/cuda-types-sys/src/lib.rs b/cuda-types-sys/src/lib.rs new file mode 100644 index 0000000..8f4c8fc --- /dev/null +++ b/cuda-types-sys/src/lib.rs @@ -0,0 +1,2 @@ +#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types)] +include!("cuda_types.rs"); diff --git a/cuda-types-sys/wrapper.h b/cuda-types-sys/wrapper.h new file mode 100644 index 0000000..d23c3ff --- /dev/null +++ b/cuda-types-sys/wrapper.h @@ -0,0 +1,7 @@ +#include "cuComplex.h" +#include "cuda.h" +#include "cuda_gl_interop.h" +#include "cuda_runtime.h" +#include "cudaProfiler.h" +#include "library_types.h" +#include "vector_types.h"