/* automatically generated by rust-bindgen 0.72.1 */

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(unused_imports)]
#![allow(clippy::enum_variant_names)]

pub const _LIBC_LIMITS_H_: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2Y: u32 = 0;
pub const __GLIBC_USE_ISOC23: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_TIME_BITS64: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 41;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const MB_LEN_MAX: u32 = 16;
pub const _BITS_POSIX1_LIM_H: u32 = 1;
pub const _POSIX_AIO_LISTIO_MAX: u32 = 2;
pub const _POSIX_AIO_MAX: u32 = 1;
pub const _POSIX_ARG_MAX: u32 = 4096;
pub const _POSIX_CHILD_MAX: u32 = 25;
pub const _POSIX_DELAYTIMER_MAX: u32 = 32;
pub const _POSIX_HOST_NAME_MAX: u32 = 255;
pub const _POSIX_LINK_MAX: u32 = 8;
pub const _POSIX_LOGIN_NAME_MAX: u32 = 9;
pub const _POSIX_MAX_CANON: u32 = 255;
pub const _POSIX_MAX_INPUT: u32 = 255;
pub const _POSIX_MQ_OPEN_MAX: u32 = 8;
pub const _POSIX_MQ_PRIO_MAX: u32 = 32;
pub const _POSIX_NAME_MAX: u32 = 14;
pub const _POSIX_NGROUPS_MAX: u32 = 8;
pub const _POSIX_OPEN_MAX: u32 = 20;
pub const _POSIX_PATH_MAX: u32 = 256;
pub const _POSIX_PIPE_BUF: u32 = 512;
pub const _POSIX_RE_DUP_MAX: u32 = 255;
pub const _POSIX_RTSIG_MAX: u32 = 8;
pub const _POSIX_SEM_NSEMS_MAX: u32 = 256;
pub const _POSIX_SEM_VALUE_MAX: u32 = 32767;
pub const _POSIX_SIGQUEUE_MAX: u32 = 32;
pub const _POSIX_SSIZE_MAX: u32 = 32767;
pub const _POSIX_STREAM_MAX: u32 = 8;
pub const _POSIX_SYMLINK_MAX: u32 = 255;
pub const _POSIX_SYMLOOP_MAX: u32 = 8;
pub const _POSIX_TIMER_MAX: u32 = 32;
pub const _POSIX_TTY_NAME_MAX: u32 = 9;
pub const _POSIX_TZNAME_MAX: u32 = 6;
pub const _POSIX_CLOCKRES_MIN: u32 = 20000000;
pub const NR_OPEN: u32 = 1024;
pub const NGROUPS_MAX: u32 = 65536;
pub const ARG_MAX: u32 = 131072;
pub const LINK_MAX: u32 = 127;
pub const MAX_CANON: u32 = 255;
pub const MAX_INPUT: u32 = 255;
pub const NAME_MAX: u32 = 255;
pub const PATH_MAX: u32 = 4096;
pub const PIPE_BUF: u32 = 4096;
pub const XATTR_NAME_MAX: u32 = 255;
pub const XATTR_SIZE_MAX: u32 = 65536;
pub const XATTR_LIST_MAX: u32 = 65536;
pub const RTSIG_MAX: u32 = 32;
pub const _POSIX_THREAD_KEYS_MAX: u32 = 128;
pub const PTHREAD_KEYS_MAX: u32 = 1024;
pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
pub const _POSIX_THREAD_THREADS_MAX: u32 = 64;
pub const AIO_PRIO_DELTA_MAX: u32 = 20;
pub const PTHREAD_STACK_MIN: u32 = 16384;
pub const DELAYTIMER_MAX: u32 = 2147483647;
pub const TTY_NAME_MAX: u32 = 32;
pub const LOGIN_NAME_MAX: u32 = 256;
pub const HOST_NAME_MAX: u32 = 64;
pub const MQ_PRIO_MAX: u32 = 32768;
pub const SEM_VALUE_MAX: u32 = 2147483647;
pub const _BITS_POSIX2_LIM_H: u32 = 1;
pub const _POSIX2_BC_BASE_MAX: u32 = 99;
pub const _POSIX2_BC_DIM_MAX: u32 = 2048;
pub const _POSIX2_BC_SCALE_MAX: u32 = 99;
pub const _POSIX2_BC_STRING_MAX: u32 = 1000;
pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2;
pub const _POSIX2_EXPR_NEST_MAX: u32 = 32;
pub const _POSIX2_LINE_MAX: u32 = 2048;
pub const _POSIX2_RE_DUP_MAX: u32 = 255;
pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14;
pub const BC_BASE_MAX: u32 = 99;
pub const BC_DIM_MAX: u32 = 2048;
pub const BC_SCALE_MAX: u32 = 99;
pub const BC_STRING_MAX: u32 = 1000;
pub const COLL_WEIGHTS_MAX: u32 = 255;
pub const EXPR_NEST_MAX: u32 = 32;
pub const LINE_MAX: u32 = 2048;
pub const CHARCLASS_NAME_MAX: u32 = 2048;
pub const RE_DUP_MAX: u32 = 32767;
pub const cudaHostAllocDefault: u32 = 0;
pub const cudaHostAllocPortable: u32 = 1;
pub const cudaHostAllocMapped: u32 = 2;
pub const cudaHostAllocWriteCombined: u32 = 4;
pub const cudaHostRegisterDefault: u32 = 0;
pub const cudaHostRegisterPortable: u32 = 1;
pub const cudaHostRegisterMapped: u32 = 2;
pub const cudaHostRegisterIoMemory: u32 = 4;
pub const cudaHostRegisterReadOnly: u32 = 8;
pub const cudaPeerAccessDefault: u32 = 0;
pub const cudaStreamDefault: u32 = 0;
pub const cudaStreamNonBlocking: u32 = 1;
pub const cudaEventDefault: u32 = 0;
pub const cudaEventBlockingSync: u32 = 1;
pub const cudaEventDisableTiming: u32 = 2;
pub const cudaEventInterprocess: u32 = 4;
pub const cudaEventRecordDefault: u32 = 0;
pub const cudaEventRecordExternal: u32 = 1;
pub const cudaEventWaitDefault: u32 = 0;
pub const cudaEventWaitExternal: u32 = 1;
pub const cudaDeviceScheduleAuto: u32 = 0;
pub const cudaDeviceScheduleSpin: u32 = 1;
pub const cudaDeviceScheduleYield: u32 = 2;
pub const cudaDeviceScheduleBlockingSync: u32 = 4;
pub const cudaDeviceBlockingSync: u32 = 4;
pub const cudaDeviceScheduleMask: u32 = 7;
pub const cudaDeviceMapHost: u32 = 8;
pub const cudaDeviceLmemResizeToMax: u32 = 16;
pub const cudaDeviceSyncMemops: u32 = 128;
pub const cudaDeviceMask: u32 = 255;
pub const cudaArrayDefault: u32 = 0;
pub const cudaArrayLayered: u32 = 1;
pub const cudaArraySurfaceLoadStore: u32 = 2;
pub const cudaArrayCubemap: u32 = 4;
pub const cudaArrayTextureGather: u32 = 8;
pub const cudaArrayColorAttachment: u32 = 32;
pub const cudaArraySparse: u32 = 64;
pub const cudaArrayDeferredMapping: u32 = 128;
pub const cudaIpcMemLazyEnablePeerAccess: u32 = 1;
pub const cudaMemAttachGlobal: u32 = 1;
pub const cudaMemAttachHost: u32 = 2;
pub const cudaMemAttachSingle: u32 = 4;
pub const cudaOccupancyDefault: u32 = 0;
pub const cudaOccupancyDisableCachingOverride: u32 = 1;
pub const cudaInitDeviceFlagsAreValid: u32 = 1;
pub const cudaArraySparsePropertiesSingleMipTail: u32 = 1;
pub const cudaMemPoolCreateUsageHwDecompress: u32 = 2;
pub const CUDA_IPC_HANDLE_SIZE: u32 = 64;
pub const cudaExternalMemoryDedicated: u32 = 1;
pub const cudaExternalSemaphoreSignalSkipNvSciBufMemSync: u32 = 1;
pub const cudaExternalSemaphoreWaitSkipNvSciBufMemSync: u32 = 2;
pub const cudaNvSciSyncAttrSignal: u32 = 1;
pub const cudaNvSciSyncAttrWait: u32 = 2;
pub const cudaGraphKernelNodePortDefault: u32 = 0;
pub const cudaGraphKernelNodePortProgrammatic: u32 = 1;
pub const cudaGraphKernelNodePortLaunchCompletion: u32 = 2;
pub const cudaSurfaceType1D: u32 = 1;
pub const cudaSurfaceType2D: u32 = 2;
pub const cudaSurfaceType3D: u32 = 3;
pub const cudaSurfaceTypeCubemap: u32 = 12;
pub const cudaSurfaceType1DLayered: u32 = 241;
pub const cudaSurfaceType2DLayered: u32 = 242;
pub const cudaSurfaceTypeCubemapLayered: u32 = 252;
pub const cudaTextureType1D: u32 = 1;
pub const cudaTextureType2D: u32 = 2;
pub const cudaTextureType3D: u32 = 3;
pub const cudaTextureTypeCubemap: u32 = 12;
pub const cudaTextureType1DLayered: u32 = 241;
pub const cudaTextureType2DLayered: u32 = 242;
pub const cudaTextureTypeCubemapLayered: u32 = 252;
pub const CUDART_VERSION: u32 = 13000;
pub const __CUDART_API_VERSION: u32 = 13000;
#[repr(u32)]
#[doc = "                                                                              *\n                                                                              *\n                                                                              *"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaRoundMode {
    cudaRoundNearest = 0,
    cudaRoundZero = 1,
    cudaRoundPosInf = 2,
    cudaRoundMinInf = 3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct char1 {
    pub x: ::core::ffi::c_schar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of char1"][::core::mem::size_of::<char1>() - 1usize];
    ["Alignment of char1"][::core::mem::align_of::<char1>() - 1usize];
    ["Offset of field: char1::x"][::core::mem::offset_of!(char1, x) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uchar1 {
    pub x: ::core::ffi::c_uchar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uchar1"][::core::mem::size_of::<uchar1>() - 1usize];
    ["Alignment of uchar1"][::core::mem::align_of::<uchar1>() - 1usize];
    ["Offset of field: uchar1::x"][::core::mem::offset_of!(uchar1, x) - 0usize];
};
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Copy, Clone)]
pub struct char2 {
    pub x: ::core::ffi::c_schar,
    pub y: ::core::ffi::c_schar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of char2"][::core::mem::size_of::<char2>() - 2usize];
    ["Alignment of char2"][::core::mem::align_of::<char2>() - 2usize];
    ["Offset of field: char2::x"][::core::mem::offset_of!(char2, x) - 0usize];
    ["Offset of field: char2::y"][::core::mem::offset_of!(char2, y) - 1usize];
};
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Copy, Clone)]
pub struct uchar2 {
    pub x: ::core::ffi::c_uchar,
    pub y: ::core::ffi::c_uchar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uchar2"][::core::mem::size_of::<uchar2>() - 2usize];
    ["Alignment of uchar2"][::core::mem::align_of::<uchar2>() - 2usize];
    ["Offset of field: uchar2::x"][::core::mem::offset_of!(uchar2, x) - 0usize];
    ["Offset of field: uchar2::y"][::core::mem::offset_of!(uchar2, y) - 1usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct char3 {
    pub x: ::core::ffi::c_schar,
    pub y: ::core::ffi::c_schar,
    pub z: ::core::ffi::c_schar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of char3"][::core::mem::size_of::<char3>() - 3usize];
    ["Alignment of char3"][::core::mem::align_of::<char3>() - 1usize];
    ["Offset of field: char3::x"][::core::mem::offset_of!(char3, x) - 0usize];
    ["Offset of field: char3::y"][::core::mem::offset_of!(char3, y) - 1usize];
    ["Offset of field: char3::z"][::core::mem::offset_of!(char3, z) - 2usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uchar3 {
    pub x: ::core::ffi::c_uchar,
    pub y: ::core::ffi::c_uchar,
    pub z: ::core::ffi::c_uchar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uchar3"][::core::mem::size_of::<uchar3>() - 3usize];
    ["Alignment of uchar3"][::core::mem::align_of::<uchar3>() - 1usize];
    ["Offset of field: uchar3::x"][::core::mem::offset_of!(uchar3, x) - 0usize];
    ["Offset of field: uchar3::y"][::core::mem::offset_of!(uchar3, y) - 1usize];
    ["Offset of field: uchar3::z"][::core::mem::offset_of!(uchar3, z) - 2usize];
};
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct char4 {
    pub x: ::core::ffi::c_schar,
    pub y: ::core::ffi::c_schar,
    pub z: ::core::ffi::c_schar,
    pub w: ::core::ffi::c_schar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of char4"][::core::mem::size_of::<char4>() - 4usize];
    ["Alignment of char4"][::core::mem::align_of::<char4>() - 4usize];
    ["Offset of field: char4::x"][::core::mem::offset_of!(char4, x) - 0usize];
    ["Offset of field: char4::y"][::core::mem::offset_of!(char4, y) - 1usize];
    ["Offset of field: char4::z"][::core::mem::offset_of!(char4, z) - 2usize];
    ["Offset of field: char4::w"][::core::mem::offset_of!(char4, w) - 3usize];
};
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct uchar4 {
    pub x: ::core::ffi::c_uchar,
    pub y: ::core::ffi::c_uchar,
    pub z: ::core::ffi::c_uchar,
    pub w: ::core::ffi::c_uchar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uchar4"][::core::mem::size_of::<uchar4>() - 4usize];
    ["Alignment of uchar4"][::core::mem::align_of::<uchar4>() - 4usize];
    ["Offset of field: uchar4::x"][::core::mem::offset_of!(uchar4, x) - 0usize];
    ["Offset of field: uchar4::y"][::core::mem::offset_of!(uchar4, y) - 1usize];
    ["Offset of field: uchar4::z"][::core::mem::offset_of!(uchar4, z) - 2usize];
    ["Offset of field: uchar4::w"][::core::mem::offset_of!(uchar4, w) - 3usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct short1 {
    pub x: ::core::ffi::c_short,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of short1"][::core::mem::size_of::<short1>() - 2usize];
    ["Alignment of short1"][::core::mem::align_of::<short1>() - 2usize];
    ["Offset of field: short1::x"][::core::mem::offset_of!(short1, x) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ushort1 {
    pub x: ::core::ffi::c_ushort,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ushort1"][::core::mem::size_of::<ushort1>() - 2usize];
    ["Alignment of ushort1"][::core::mem::align_of::<ushort1>() - 2usize];
    ["Offset of field: ushort1::x"][::core::mem::offset_of!(ushort1, x) - 0usize];
};
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct short2 {
    pub x: ::core::ffi::c_short,
    pub y: ::core::ffi::c_short,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of short2"][::core::mem::size_of::<short2>() - 4usize];
    ["Alignment of short2"][::core::mem::align_of::<short2>() - 4usize];
    ["Offset of field: short2::x"][::core::mem::offset_of!(short2, x) - 0usize];
    ["Offset of field: short2::y"][::core::mem::offset_of!(short2, y) - 2usize];
};
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct ushort2 {
    pub x: ::core::ffi::c_ushort,
    pub y: ::core::ffi::c_ushort,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ushort2"][::core::mem::size_of::<ushort2>() - 4usize];
    ["Alignment of ushort2"][::core::mem::align_of::<ushort2>() - 4usize];
    ["Offset of field: ushort2::x"][::core::mem::offset_of!(ushort2, x) - 0usize];
    ["Offset of field: ushort2::y"][::core::mem::offset_of!(ushort2, y) - 2usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct short3 {
    pub x: ::core::ffi::c_short,
    pub y: ::core::ffi::c_short,
    pub z: ::core::ffi::c_short,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of short3"][::core::mem::size_of::<short3>() - 6usize];
    ["Alignment of short3"][::core::mem::align_of::<short3>() - 2usize];
    ["Offset of field: short3::x"][::core::mem::offset_of!(short3, x) - 0usize];
    ["Offset of field: short3::y"][::core::mem::offset_of!(short3, y) - 2usize];
    ["Offset of field: short3::z"][::core::mem::offset_of!(short3, z) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ushort3 {
    pub x: ::core::ffi::c_ushort,
    pub y: ::core::ffi::c_ushort,
    pub z: ::core::ffi::c_ushort,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ushort3"][::core::mem::size_of::<ushort3>() - 6usize];
    ["Alignment of ushort3"][::core::mem::align_of::<ushort3>() - 2usize];
    ["Offset of field: ushort3::x"][::core::mem::offset_of!(ushort3, x) - 0usize];
    ["Offset of field: ushort3::y"][::core::mem::offset_of!(ushort3, y) - 2usize];
    ["Offset of field: ushort3::z"][::core::mem::offset_of!(ushort3, z) - 4usize];
};
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct short4 {
    pub x: ::core::ffi::c_short,
    pub y: ::core::ffi::c_short,
    pub z: ::core::ffi::c_short,
    pub w: ::core::ffi::c_short,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of short4"][::core::mem::size_of::<short4>() - 8usize];
    ["Alignment of short4"][::core::mem::align_of::<short4>() - 8usize];
    ["Offset of field: short4::x"][::core::mem::offset_of!(short4, x) - 0usize];
    ["Offset of field: short4::y"][::core::mem::offset_of!(short4, y) - 2usize];
    ["Offset of field: short4::z"][::core::mem::offset_of!(short4, z) - 4usize];
    ["Offset of field: short4::w"][::core::mem::offset_of!(short4, w) - 6usize];
};
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct ushort4 {
    pub x: ::core::ffi::c_ushort,
    pub y: ::core::ffi::c_ushort,
    pub z: ::core::ffi::c_ushort,
    pub w: ::core::ffi::c_ushort,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ushort4"][::core::mem::size_of::<ushort4>() - 8usize];
    ["Alignment of ushort4"][::core::mem::align_of::<ushort4>() - 8usize];
    ["Offset of field: ushort4::x"][::core::mem::offset_of!(ushort4, x) - 0usize];
    ["Offset of field: ushort4::y"][::core::mem::offset_of!(ushort4, y) - 2usize];
    ["Offset of field: ushort4::z"][::core::mem::offset_of!(ushort4, z) - 4usize];
    ["Offset of field: ushort4::w"][::core::mem::offset_of!(ushort4, w) - 6usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct int1 {
    pub x: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of int1"][::core::mem::size_of::<int1>() - 4usize];
    ["Alignment of int1"][::core::mem::align_of::<int1>() - 4usize];
    ["Offset of field: int1::x"][::core::mem::offset_of!(int1, x) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uint1 {
    pub x: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uint1"][::core::mem::size_of::<uint1>() - 4usize];
    ["Alignment of uint1"][::core::mem::align_of::<uint1>() - 4usize];
    ["Offset of field: uint1::x"][::core::mem::offset_of!(uint1, x) - 0usize];
};
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct int2 {
    pub x: ::core::ffi::c_int,
    pub y: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of int2"][::core::mem::size_of::<int2>() - 8usize];
    ["Alignment of int2"][::core::mem::align_of::<int2>() - 8usize];
    ["Offset of field: int2::x"][::core::mem::offset_of!(int2, x) - 0usize];
    ["Offset of field: int2::y"][::core::mem::offset_of!(int2, y) - 4usize];
};
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct uint2 {
    pub x: ::core::ffi::c_uint,
    pub y: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uint2"][::core::mem::size_of::<uint2>() - 8usize];
    ["Alignment of uint2"][::core::mem::align_of::<uint2>() - 8usize];
    ["Offset of field: uint2::x"][::core::mem::offset_of!(uint2, x) - 0usize];
    ["Offset of field: uint2::y"][::core::mem::offset_of!(uint2, y) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct int3 {
    pub x: ::core::ffi::c_int,
    pub y: ::core::ffi::c_int,
    pub z: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of int3"][::core::mem::size_of::<int3>() - 12usize];
    ["Alignment of int3"][::core::mem::align_of::<int3>() - 4usize];
    ["Offset of field: int3::x"][::core::mem::offset_of!(int3, x) - 0usize];
    ["Offset of field: int3::y"][::core::mem::offset_of!(int3, y) - 4usize];
    ["Offset of field: int3::z"][::core::mem::offset_of!(int3, z) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uint3 {
    pub x: ::core::ffi::c_uint,
    pub y: ::core::ffi::c_uint,
    pub z: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uint3"][::core::mem::size_of::<uint3>() - 12usize];
    ["Alignment of uint3"][::core::mem::align_of::<uint3>() - 4usize];
    ["Offset of field: uint3::x"][::core::mem::offset_of!(uint3, x) - 0usize];
    ["Offset of field: uint3::y"][::core::mem::offset_of!(uint3, y) - 4usize];
    ["Offset of field: uint3::z"][::core::mem::offset_of!(uint3, z) - 8usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct int4 {
    pub x: ::core::ffi::c_int,
    pub y: ::core::ffi::c_int,
    pub z: ::core::ffi::c_int,
    pub w: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of int4"][::core::mem::size_of::<int4>() - 16usize];
    ["Alignment of int4"][::core::mem::align_of::<int4>() - 16usize];
    ["Offset of field: int4::x"][::core::mem::offset_of!(int4, x) - 0usize];
    ["Offset of field: int4::y"][::core::mem::offset_of!(int4, y) - 4usize];
    ["Offset of field: int4::z"][::core::mem::offset_of!(int4, z) - 8usize];
    ["Offset of field: int4::w"][::core::mem::offset_of!(int4, w) - 12usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct uint4 {
    pub x: ::core::ffi::c_uint,
    pub y: ::core::ffi::c_uint,
    pub z: ::core::ffi::c_uint,
    pub w: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of uint4"][::core::mem::size_of::<uint4>() - 16usize];
    ["Alignment of uint4"][::core::mem::align_of::<uint4>() - 16usize];
    ["Offset of field: uint4::x"][::core::mem::offset_of!(uint4, x) - 0usize];
    ["Offset of field: uint4::y"][::core::mem::offset_of!(uint4, y) - 4usize];
    ["Offset of field: uint4::z"][::core::mem::offset_of!(uint4, z) - 8usize];
    ["Offset of field: uint4::w"][::core::mem::offset_of!(uint4, w) - 12usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct long1 {
    pub x: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of long1"][::core::mem::size_of::<long1>() - 8usize];
    ["Alignment of long1"][::core::mem::align_of::<long1>() - 8usize];
    ["Offset of field: long1::x"][::core::mem::offset_of!(long1, x) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ulong1 {
    pub x: ::core::ffi::c_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulong1"][::core::mem::size_of::<ulong1>() - 8usize];
    ["Alignment of ulong1"][::core::mem::align_of::<ulong1>() - 8usize];
    ["Offset of field: ulong1::x"][::core::mem::offset_of!(ulong1, x) - 0usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct long2 {
    pub x: ::core::ffi::c_long,
    pub y: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of long2"][::core::mem::size_of::<long2>() - 16usize];
    ["Alignment of long2"][::core::mem::align_of::<long2>() - 16usize];
    ["Offset of field: long2::x"][::core::mem::offset_of!(long2, x) - 0usize];
    ["Offset of field: long2::y"][::core::mem::offset_of!(long2, y) - 8usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct ulong2 {
    pub x: ::core::ffi::c_ulong,
    pub y: ::core::ffi::c_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulong2"][::core::mem::size_of::<ulong2>() - 16usize];
    ["Alignment of ulong2"][::core::mem::align_of::<ulong2>() - 16usize];
    ["Offset of field: ulong2::x"][::core::mem::offset_of!(ulong2, x) - 0usize];
    ["Offset of field: ulong2::y"][::core::mem::offset_of!(ulong2, y) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct long3 {
    pub x: ::core::ffi::c_long,
    pub y: ::core::ffi::c_long,
    pub z: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of long3"][::core::mem::size_of::<long3>() - 24usize];
    ["Alignment of long3"][::core::mem::align_of::<long3>() - 8usize];
    ["Offset of field: long3::x"][::core::mem::offset_of!(long3, x) - 0usize];
    ["Offset of field: long3::y"][::core::mem::offset_of!(long3, y) - 8usize];
    ["Offset of field: long3::z"][::core::mem::offset_of!(long3, z) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ulong3 {
    pub x: ::core::ffi::c_ulong,
    pub y: ::core::ffi::c_ulong,
    pub z: ::core::ffi::c_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulong3"][::core::mem::size_of::<ulong3>() - 24usize];
    ["Alignment of ulong3"][::core::mem::align_of::<ulong3>() - 8usize];
    ["Offset of field: ulong3::x"][::core::mem::offset_of!(ulong3, x) - 0usize];
    ["Offset of field: ulong3::y"][::core::mem::offset_of!(ulong3, y) - 8usize];
    ["Offset of field: ulong3::z"][::core::mem::offset_of!(ulong3, z) - 16usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct long4 {
    pub x: ::core::ffi::c_long,
    pub y: ::core::ffi::c_long,
    pub z: ::core::ffi::c_long,
    pub w: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of long4"][::core::mem::size_of::<long4>() - 32usize];
    ["Alignment of long4"][::core::mem::align_of::<long4>() - 16usize];
    ["Offset of field: long4::x"][::core::mem::offset_of!(long4, x) - 0usize];
    ["Offset of field: long4::y"][::core::mem::offset_of!(long4, y) - 8usize];
    ["Offset of field: long4::z"][::core::mem::offset_of!(long4, z) - 16usize];
    ["Offset of field: long4::w"][::core::mem::offset_of!(long4, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct ulong4 {
    pub x: ::core::ffi::c_ulong,
    pub y: ::core::ffi::c_ulong,
    pub z: ::core::ffi::c_ulong,
    pub w: ::core::ffi::c_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulong4"][::core::mem::size_of::<ulong4>() - 32usize];
    ["Alignment of ulong4"][::core::mem::align_of::<ulong4>() - 16usize];
    ["Offset of field: ulong4::x"][::core::mem::offset_of!(ulong4, x) - 0usize];
    ["Offset of field: ulong4::y"][::core::mem::offset_of!(ulong4, y) - 8usize];
    ["Offset of field: ulong4::z"][::core::mem::offset_of!(ulong4, z) - 16usize];
    ["Offset of field: ulong4::w"][::core::mem::offset_of!(ulong4, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct long4_16a {
    pub x: ::core::ffi::c_long,
    pub y: ::core::ffi::c_long,
    pub z: ::core::ffi::c_long,
    pub w: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of long4_16a"][::core::mem::size_of::<long4_16a>() - 32usize];
    ["Alignment of long4_16a"][::core::mem::align_of::<long4_16a>() - 16usize];
    ["Offset of field: long4_16a::x"][::core::mem::offset_of!(long4_16a, x) - 0usize];
    ["Offset of field: long4_16a::y"][::core::mem::offset_of!(long4_16a, y) - 8usize];
    ["Offset of field: long4_16a::z"][::core::mem::offset_of!(long4_16a, z) - 16usize];
    ["Offset of field: long4_16a::w"][::core::mem::offset_of!(long4_16a, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct ulong4_16a {
    pub x: ::core::ffi::c_ulong,
    pub y: ::core::ffi::c_ulong,
    pub z: ::core::ffi::c_ulong,
    pub w: ::core::ffi::c_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulong4_16a"][::core::mem::size_of::<ulong4_16a>() - 32usize];
    ["Alignment of ulong4_16a"][::core::mem::align_of::<ulong4_16a>() - 16usize];
    ["Offset of field: ulong4_16a::x"][::core::mem::offset_of!(ulong4_16a, x) - 0usize];
    ["Offset of field: ulong4_16a::y"][::core::mem::offset_of!(ulong4_16a, y) - 8usize];
    ["Offset of field: ulong4_16a::z"][::core::mem::offset_of!(ulong4_16a, z) - 16usize];
    ["Offset of field: ulong4_16a::w"][::core::mem::offset_of!(ulong4_16a, w) - 24usize];
};
#[repr(C)]
#[repr(align(32))]
#[derive(Debug, Copy, Clone)]
pub struct long4_32a {
    pub x: ::core::ffi::c_long,
    pub y: ::core::ffi::c_long,
    pub z: ::core::ffi::c_long,
    pub w: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of long4_32a"][::core::mem::size_of::<long4_32a>() - 32usize];
    ["Alignment of long4_32a"][::core::mem::align_of::<long4_32a>() - 32usize];
    ["Offset of field: long4_32a::x"][::core::mem::offset_of!(long4_32a, x) - 0usize];
    ["Offset of field: long4_32a::y"][::core::mem::offset_of!(long4_32a, y) - 8usize];
    ["Offset of field: long4_32a::z"][::core::mem::offset_of!(long4_32a, z) - 16usize];
    ["Offset of field: long4_32a::w"][::core::mem::offset_of!(long4_32a, w) - 24usize];
};
#[repr(C)]
#[repr(align(32))]
#[derive(Debug, Copy, Clone)]
pub struct ulong4_32a {
    pub x: ::core::ffi::c_ulong,
    pub y: ::core::ffi::c_ulong,
    pub z: ::core::ffi::c_ulong,
    pub w: ::core::ffi::c_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulong4_32a"][::core::mem::size_of::<ulong4_32a>() - 32usize];
    ["Alignment of ulong4_32a"][::core::mem::align_of::<ulong4_32a>() - 32usize];
    ["Offset of field: ulong4_32a::x"][::core::mem::offset_of!(ulong4_32a, x) - 0usize];
    ["Offset of field: ulong4_32a::y"][::core::mem::offset_of!(ulong4_32a, y) - 8usize];
    ["Offset of field: ulong4_32a::z"][::core::mem::offset_of!(ulong4_32a, z) - 16usize];
    ["Offset of field: ulong4_32a::w"][::core::mem::offset_of!(ulong4_32a, w) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct float1 {
    pub x: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of float1"][::core::mem::size_of::<float1>() - 4usize];
    ["Alignment of float1"][::core::mem::align_of::<float1>() - 4usize];
    ["Offset of field: float1::x"][::core::mem::offset_of!(float1, x) - 0usize];
};
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct float2 {
    pub x: f32,
    pub y: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of float2"][::core::mem::size_of::<float2>() - 8usize];
    ["Alignment of float2"][::core::mem::align_of::<float2>() - 8usize];
    ["Offset of field: float2::x"][::core::mem::offset_of!(float2, x) - 0usize];
    ["Offset of field: float2::y"][::core::mem::offset_of!(float2, y) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct float3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of float3"][::core::mem::size_of::<float3>() - 12usize];
    ["Alignment of float3"][::core::mem::align_of::<float3>() - 4usize];
    ["Offset of field: float3::x"][::core::mem::offset_of!(float3, x) - 0usize];
    ["Offset of field: float3::y"][::core::mem::offset_of!(float3, y) - 4usize];
    ["Offset of field: float3::z"][::core::mem::offset_of!(float3, z) - 8usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct float4 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
    pub w: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of float4"][::core::mem::size_of::<float4>() - 16usize];
    ["Alignment of float4"][::core::mem::align_of::<float4>() - 16usize];
    ["Offset of field: float4::x"][::core::mem::offset_of!(float4, x) - 0usize];
    ["Offset of field: float4::y"][::core::mem::offset_of!(float4, y) - 4usize];
    ["Offset of field: float4::z"][::core::mem::offset_of!(float4, z) - 8usize];
    ["Offset of field: float4::w"][::core::mem::offset_of!(float4, w) - 12usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct longlong1 {
    pub x: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of longlong1"][::core::mem::size_of::<longlong1>() - 8usize];
    ["Alignment of longlong1"][::core::mem::align_of::<longlong1>() - 8usize];
    ["Offset of field: longlong1::x"][::core::mem::offset_of!(longlong1, x) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ulonglong1 {
    pub x: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulonglong1"][::core::mem::size_of::<ulonglong1>() - 8usize];
    ["Alignment of ulonglong1"][::core::mem::align_of::<ulonglong1>() - 8usize];
    ["Offset of field: ulonglong1::x"][::core::mem::offset_of!(ulonglong1, x) - 0usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct longlong2 {
    pub x: ::core::ffi::c_longlong,
    pub y: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of longlong2"][::core::mem::size_of::<longlong2>() - 16usize];
    ["Alignment of longlong2"][::core::mem::align_of::<longlong2>() - 16usize];
    ["Offset of field: longlong2::x"][::core::mem::offset_of!(longlong2, x) - 0usize];
    ["Offset of field: longlong2::y"][::core::mem::offset_of!(longlong2, y) - 8usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct ulonglong2 {
    pub x: ::core::ffi::c_ulonglong,
    pub y: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulonglong2"][::core::mem::size_of::<ulonglong2>() - 16usize];
    ["Alignment of ulonglong2"][::core::mem::align_of::<ulonglong2>() - 16usize];
    ["Offset of field: ulonglong2::x"][::core::mem::offset_of!(ulonglong2, x) - 0usize];
    ["Offset of field: ulonglong2::y"][::core::mem::offset_of!(ulonglong2, y) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct longlong3 {
    pub x: ::core::ffi::c_longlong,
    pub y: ::core::ffi::c_longlong,
    pub z: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of longlong3"][::core::mem::size_of::<longlong3>() - 24usize];
    ["Alignment of longlong3"][::core::mem::align_of::<longlong3>() - 8usize];
    ["Offset of field: longlong3::x"][::core::mem::offset_of!(longlong3, x) - 0usize];
    ["Offset of field: longlong3::y"][::core::mem::offset_of!(longlong3, y) - 8usize];
    ["Offset of field: longlong3::z"][::core::mem::offset_of!(longlong3, z) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ulonglong3 {
    pub x: ::core::ffi::c_ulonglong,
    pub y: ::core::ffi::c_ulonglong,
    pub z: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulonglong3"][::core::mem::size_of::<ulonglong3>() - 24usize];
    ["Alignment of ulonglong3"][::core::mem::align_of::<ulonglong3>() - 8usize];
    ["Offset of field: ulonglong3::x"][::core::mem::offset_of!(ulonglong3, x) - 0usize];
    ["Offset of field: ulonglong3::y"][::core::mem::offset_of!(ulonglong3, y) - 8usize];
    ["Offset of field: ulonglong3::z"][::core::mem::offset_of!(ulonglong3, z) - 16usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct longlong4 {
    pub x: ::core::ffi::c_longlong,
    pub y: ::core::ffi::c_longlong,
    pub z: ::core::ffi::c_longlong,
    pub w: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of longlong4"][::core::mem::size_of::<longlong4>() - 32usize];
    ["Alignment of longlong4"][::core::mem::align_of::<longlong4>() - 16usize];
    ["Offset of field: longlong4::x"][::core::mem::offset_of!(longlong4, x) - 0usize];
    ["Offset of field: longlong4::y"][::core::mem::offset_of!(longlong4, y) - 8usize];
    ["Offset of field: longlong4::z"][::core::mem::offset_of!(longlong4, z) - 16usize];
    ["Offset of field: longlong4::w"][::core::mem::offset_of!(longlong4, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct longlong4_16a {
    pub x: ::core::ffi::c_longlong,
    pub y: ::core::ffi::c_longlong,
    pub z: ::core::ffi::c_longlong,
    pub w: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of longlong4_16a"][::core::mem::size_of::<longlong4_16a>() - 32usize];
    ["Alignment of longlong4_16a"][::core::mem::align_of::<longlong4_16a>() - 16usize];
    ["Offset of field: longlong4_16a::x"][::core::mem::offset_of!(longlong4_16a, x) - 0usize];
    ["Offset of field: longlong4_16a::y"][::core::mem::offset_of!(longlong4_16a, y) - 8usize];
    ["Offset of field: longlong4_16a::z"][::core::mem::offset_of!(longlong4_16a, z) - 16usize];
    ["Offset of field: longlong4_16a::w"][::core::mem::offset_of!(longlong4_16a, w) - 24usize];
};
#[repr(C)]
#[repr(align(32))]
#[derive(Debug, Copy, Clone)]
pub struct longlong4_32a {
    pub x: ::core::ffi::c_longlong,
    pub y: ::core::ffi::c_longlong,
    pub z: ::core::ffi::c_longlong,
    pub w: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of longlong4_32a"][::core::mem::size_of::<longlong4_32a>() - 32usize];
    ["Alignment of longlong4_32a"][::core::mem::align_of::<longlong4_32a>() - 32usize];
    ["Offset of field: longlong4_32a::x"][::core::mem::offset_of!(longlong4_32a, x) - 0usize];
    ["Offset of field: longlong4_32a::y"][::core::mem::offset_of!(longlong4_32a, y) - 8usize];
    ["Offset of field: longlong4_32a::z"][::core::mem::offset_of!(longlong4_32a, z) - 16usize];
    ["Offset of field: longlong4_32a::w"][::core::mem::offset_of!(longlong4_32a, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct ulonglong4 {
    pub x: ::core::ffi::c_ulonglong,
    pub y: ::core::ffi::c_ulonglong,
    pub z: ::core::ffi::c_ulonglong,
    pub w: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulonglong4"][::core::mem::size_of::<ulonglong4>() - 32usize];
    ["Alignment of ulonglong4"][::core::mem::align_of::<ulonglong4>() - 16usize];
    ["Offset of field: ulonglong4::x"][::core::mem::offset_of!(ulonglong4, x) - 0usize];
    ["Offset of field: ulonglong4::y"][::core::mem::offset_of!(ulonglong4, y) - 8usize];
    ["Offset of field: ulonglong4::z"][::core::mem::offset_of!(ulonglong4, z) - 16usize];
    ["Offset of field: ulonglong4::w"][::core::mem::offset_of!(ulonglong4, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct ulonglong4_16a {
    pub x: ::core::ffi::c_ulonglong,
    pub y: ::core::ffi::c_ulonglong,
    pub z: ::core::ffi::c_ulonglong,
    pub w: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulonglong4_16a"][::core::mem::size_of::<ulonglong4_16a>() - 32usize];
    ["Alignment of ulonglong4_16a"][::core::mem::align_of::<ulonglong4_16a>() - 16usize];
    ["Offset of field: ulonglong4_16a::x"][::core::mem::offset_of!(ulonglong4_16a, x) - 0usize];
    ["Offset of field: ulonglong4_16a::y"][::core::mem::offset_of!(ulonglong4_16a, y) - 8usize];
    ["Offset of field: ulonglong4_16a::z"][::core::mem::offset_of!(ulonglong4_16a, z) - 16usize];
    ["Offset of field: ulonglong4_16a::w"][::core::mem::offset_of!(ulonglong4_16a, w) - 24usize];
};
#[repr(C)]
#[repr(align(32))]
#[derive(Debug, Copy, Clone)]
pub struct ulonglong4_32a {
    pub x: ::core::ffi::c_ulonglong,
    pub y: ::core::ffi::c_ulonglong,
    pub z: ::core::ffi::c_ulonglong,
    pub w: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ulonglong4_32a"][::core::mem::size_of::<ulonglong4_32a>() - 32usize];
    ["Alignment of ulonglong4_32a"][::core::mem::align_of::<ulonglong4_32a>() - 32usize];
    ["Offset of field: ulonglong4_32a::x"][::core::mem::offset_of!(ulonglong4_32a, x) - 0usize];
    ["Offset of field: ulonglong4_32a::y"][::core::mem::offset_of!(ulonglong4_32a, y) - 8usize];
    ["Offset of field: ulonglong4_32a::z"][::core::mem::offset_of!(ulonglong4_32a, z) - 16usize];
    ["Offset of field: ulonglong4_32a::w"][::core::mem::offset_of!(ulonglong4_32a, w) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct double1 {
    pub x: f64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of double1"][::core::mem::size_of::<double1>() - 8usize];
    ["Alignment of double1"][::core::mem::align_of::<double1>() - 8usize];
    ["Offset of field: double1::x"][::core::mem::offset_of!(double1, x) - 0usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct double2 {
    pub x: f64,
    pub y: f64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of double2"][::core::mem::size_of::<double2>() - 16usize];
    ["Alignment of double2"][::core::mem::align_of::<double2>() - 16usize];
    ["Offset of field: double2::x"][::core::mem::offset_of!(double2, x) - 0usize];
    ["Offset of field: double2::y"][::core::mem::offset_of!(double2, y) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct double3 {
    pub x: f64,
    pub y: f64,
    pub z: f64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of double3"][::core::mem::size_of::<double3>() - 24usize];
    ["Alignment of double3"][::core::mem::align_of::<double3>() - 8usize];
    ["Offset of field: double3::x"][::core::mem::offset_of!(double3, x) - 0usize];
    ["Offset of field: double3::y"][::core::mem::offset_of!(double3, y) - 8usize];
    ["Offset of field: double3::z"][::core::mem::offset_of!(double3, z) - 16usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct double4 {
    pub x: f64,
    pub y: f64,
    pub z: f64,
    pub w: f64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of double4"][::core::mem::size_of::<double4>() - 32usize];
    ["Alignment of double4"][::core::mem::align_of::<double4>() - 16usize];
    ["Offset of field: double4::x"][::core::mem::offset_of!(double4, x) - 0usize];
    ["Offset of field: double4::y"][::core::mem::offset_of!(double4, y) - 8usize];
    ["Offset of field: double4::z"][::core::mem::offset_of!(double4, z) - 16usize];
    ["Offset of field: double4::w"][::core::mem::offset_of!(double4, w) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct double4_16a {
    pub x: f64,
    pub y: f64,
    pub z: f64,
    pub w: f64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of double4_16a"][::core::mem::size_of::<double4_16a>() - 32usize];
    ["Alignment of double4_16a"][::core::mem::align_of::<double4_16a>() - 16usize];
    ["Offset of field: double4_16a::x"][::core::mem::offset_of!(double4_16a, x) - 0usize];
    ["Offset of field: double4_16a::y"][::core::mem::offset_of!(double4_16a, y) - 8usize];
    ["Offset of field: double4_16a::z"][::core::mem::offset_of!(double4_16a, z) - 16usize];
    ["Offset of field: double4_16a::w"][::core::mem::offset_of!(double4_16a, w) - 24usize];
};
#[repr(C)]
#[repr(align(32))]
#[derive(Debug, Copy, Clone)]
pub struct double4_32a {
    pub x: f64,
    pub y: f64,
    pub z: f64,
    pub w: f64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of double4_32a"][::core::mem::size_of::<double4_32a>() - 32usize];
    ["Alignment of double4_32a"][::core::mem::align_of::<double4_32a>() - 32usize];
    ["Offset of field: double4_32a::x"][::core::mem::offset_of!(double4_32a, x) - 0usize];
    ["Offset of field: double4_32a::y"][::core::mem::offset_of!(double4_32a, y) - 8usize];
    ["Offset of field: double4_32a::z"][::core::mem::offset_of!(double4_32a, z) - 16usize];
    ["Offset of field: double4_32a::w"][::core::mem::offset_of!(double4_32a, w) - 24usize];
};
#[doc = "                                                                              *\n                                                                              *\n                                                                              *"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct dim3 {
    pub x: ::core::ffi::c_uint,
    pub y: ::core::ffi::c_uint,
    pub z: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dim3"][::core::mem::size_of::<dim3>() - 12usize];
    ["Alignment of dim3"][::core::mem::align_of::<dim3>() - 4usize];
    ["Offset of field: dim3::x"][::core::mem::offset_of!(dim3, x) - 0usize];
    ["Offset of field: dim3::y"][::core::mem::offset_of!(dim3, y) - 4usize];
    ["Offset of field: dim3::z"][::core::mem::offset_of!(dim3, z) - 8usize];
};
pub type wchar_t = ::core::ffi::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
    pub __clang_max_align_nonce1: ::core::ffi::c_longlong,
    pub __bindgen_padding_0: u64,
    pub __clang_max_align_nonce2: u128,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of max_align_t"][::core::mem::size_of::<max_align_t>() - 32usize];
    ["Alignment of max_align_t"][::core::mem::align_of::<max_align_t>() - 16usize];
    ["Offset of field: max_align_t::__clang_max_align_nonce1"]
        [::core::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize];
    ["Offset of field: max_align_t::__clang_max_align_nonce2"]
        [::core::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize];
};
#[repr(u32)]
#[doc = " CUDA error types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaError {
    #[doc = " The API call returned with no errors. In the case of query calls, this\n also means that the operation being queried is complete (see\n ::cudaEventQuery() and ::cudaStreamQuery())."]
    cudaSuccess = 0,
    #[doc = " This indicates that one or more of the parameters passed to the API call\n is not within an acceptable range of values."]
    cudaErrorInvalidValue = 1,
    #[doc = " The API call failed because it was unable to allocate enough memory or\n other resources to perform the requested operation."]
    cudaErrorMemoryAllocation = 2,
    #[doc = " The API call failed because the CUDA driver and runtime could not be\n initialized."]
    cudaErrorInitializationError = 3,
    #[doc = " This indicates that a CUDA Runtime API call cannot be executed because\n it is being called during process shut down, at a point in time after\n CUDA driver has been unloaded."]
    cudaErrorCudartUnloading = 4,
    #[doc = " This indicates profiler is not initialized for this run. This can\n happen when the application is running with external profiling tools\n like visual profiler."]
    cudaErrorProfilerDisabled = 5,
    #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to attempt to enable/disable the profiling via ::cudaProfilerStart or\n ::cudaProfilerStop without initialization."]
    cudaErrorProfilerNotInitialized = 6,
    #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to call cudaProfilerStart() when profiling is already enabled."]
    cudaErrorProfilerAlreadyStarted = 7,
    #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to call cudaProfilerStop() when profiling is already disabled."]
    cudaErrorProfilerAlreadyStopped = 8,
    #[doc = " This indicates that a kernel launch is requesting resources that can\n never be satisfied by the current device. Requesting more shared memory\n per block than the device supports will trigger this error, as will\n requesting too many threads or blocks. See ::cudaDeviceProp for more\n device limitations."]
    cudaErrorInvalidConfiguration = 9,
    #[doc = " This indicates that one or more of the pitch-related parameters passed\n to the API call is not within the acceptable range for pitch."]
    cudaErrorInvalidPitchValue = 12,
    #[doc = " This indicates that the symbol name/identifier passed to the API call\n is not a valid name or identifier."]
    cudaErrorInvalidSymbol = 13,
    #[doc = " This indicates that at least one host pointer passed to the API call is\n not a valid host pointer.\n \\deprecated\n This error return is deprecated as of CUDA 10.1."]
    cudaErrorInvalidHostPointer = 16,
    #[doc = " This indicates that at least one device pointer passed to the API call is\n not a valid device pointer.\n \\deprecated\n This error return is deprecated as of CUDA 10.1."]
    cudaErrorInvalidDevicePointer = 17,
    #[doc = " This indicates that the texture passed to the API call is not a valid\n texture."]
    cudaErrorInvalidTexture = 18,
    #[doc = " This indicates that the texture binding is not valid. This occurs if you\n call ::cudaGetTextureAlignmentOffset() with an unbound texture."]
    cudaErrorInvalidTextureBinding = 19,
    #[doc = " This indicates that the channel descriptor passed to the API call is not\n valid. This occurs if the format is not one of the formats specified by\n ::cudaChannelFormatKind, or if one of the dimensions is invalid."]
    cudaErrorInvalidChannelDescriptor = 20,
    #[doc = " This indicates that the direction of the memcpy passed to the API call is\n not one of the types specified by ::cudaMemcpyKind."]
    cudaErrorInvalidMemcpyDirection = 21,
    #[doc = " This indicated that the user has taken the address of a constant variable,\n which was forbidden up until the CUDA 3.1 release.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Variables in constant\n memory may now have their address taken by the runtime via\n ::cudaGetSymbolAddress()."]
    cudaErrorAddressOfConstant = 22,
    #[doc = " This indicated that a texture fetch was not able to be performed.\n This was previously used for device emulation of texture operations.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
    cudaErrorTextureFetchFailed = 23,
    #[doc = " This indicated that a texture was not bound for access.\n This was previously used for device emulation of texture operations.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
    cudaErrorTextureNotBound = 24,
    #[doc = " This indicated that a synchronization operation had failed.\n This was previously used for some device emulation functions.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
    cudaErrorSynchronizationError = 25,
    #[doc = " This indicates that a non-float texture was being accessed with linear\n filtering. This is not supported by CUDA."]
    cudaErrorInvalidFilterSetting = 26,
    #[doc = " This indicates that an attempt was made to read an unsupported data type as a\n normalized float. This is not supported by CUDA."]
    cudaErrorInvalidNormSetting = 27,
    #[doc = " Mixing of device and device emulation code was not allowed.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
    cudaErrorMixedDeviceExecution = 28,
    #[doc = " This indicates that the API call is not yet implemented. Production\n releases of CUDA will never return this error.\n \\deprecated\n This error return is deprecated as of CUDA 4.1."]
    cudaErrorNotYetImplemented = 31,
    #[doc = " This indicated that an emulated device pointer exceeded the 32-bit address\n range.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
    cudaErrorMemoryValueTooLarge = 32,
    #[doc = " This indicates that the CUDA driver that the application has loaded is a\n stub library. Applications that run with the stub rather than a real\n driver loaded will result in CUDA API returning this error."]
    cudaErrorStubLibrary = 34,
    #[doc = " This indicates that the installed NVIDIA CUDA driver is older than the\n CUDA runtime library. This is not a supported configuration. Users should\n install an updated NVIDIA display driver to allow the application to run."]
    cudaErrorInsufficientDriver = 35,
    #[doc = " This indicates that the API call requires a newer CUDA driver than the one\n currently installed. Users should install an updated NVIDIA CUDA driver\n to allow the API call to succeed."]
    cudaErrorCallRequiresNewerDriver = 36,
    #[doc = " This indicates that the surface passed to the API call is not a valid\n surface."]
    cudaErrorInvalidSurface = 37,
    #[doc = " This indicates that multiple global or constant variables (across separate\n CUDA source files in the application) share the same string name."]
    cudaErrorDuplicateVariableName = 43,
    #[doc = " This indicates that multiple textures (across separate CUDA source\n files in the application) share the same string name."]
    cudaErrorDuplicateTextureName = 44,
    #[doc = " This indicates that multiple surfaces (across separate CUDA source\n files in the application) share the same string name."]
    cudaErrorDuplicateSurfaceName = 45,
    #[doc = " This indicates that all CUDA devices are busy or unavailable at the current\n time. Devices are often busy/unavailable due to use of\n ::cudaComputeModeProhibited, ::cudaComputeModeExclusiveProcess, or when long\n running CUDA kernels have filled up the GPU and are blocking new work\n from starting. They can also be unavailable due to memory constraints\n on a device that already has active CUDA work being performed."]
    cudaErrorDevicesUnavailable = 46,
    #[doc = " This indicates that the current context is not compatible with this\n the CUDA Runtime. This can only occur if you are using CUDA\n Runtime/Driver interoperability and have created an existing Driver\n context using the driver API. The Driver context may be incompatible\n either because the Driver context was created using an older version\n of the API, because the Runtime API call expects a primary driver\n context and the Driver context is not primary, or because the Driver\n context has been destroyed. Please see \\ref CUDART_DRIVER \"Interactions\n with the CUDA Driver API\" for more information."]
    cudaErrorIncompatibleDriverContext = 49,
    #[doc = " The device function being invoked (usually via ::cudaLaunchKernel()) was not\n previously configured via the ::cudaConfigureCall() function."]
    cudaErrorMissingConfiguration = 52,
    #[doc = " This indicated that a previous kernel launch failed. This was previously\n used for device emulation of kernel launches.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
    cudaErrorPriorLaunchFailure = 53,
    #[doc = " This error indicates that a device runtime grid launch did not occur\n because the depth of the child grid would exceed the maximum supported\n number of nested grid launches."]
    cudaErrorLaunchMaxDepthExceeded = 65,
    #[doc = " This error indicates that a grid launch did not occur because the kernel\n uses file-scoped textures which are unsupported by the device runtime.\n Kernels launched via the device runtime only support textures created with\n the Texture Object API's."]
    cudaErrorLaunchFileScopedTex = 66,
    #[doc = " This error indicates that a grid launch did not occur because the kernel\n uses file-scoped surfaces which are unsupported by the device runtime.\n Kernels launched via the device runtime only support surfaces created with\n the Surface Object API's."]
    cudaErrorLaunchFileScopedSurf = 67,
    #[doc = " This error indicates that a call to ::cudaDeviceSynchronize made from\n the device runtime failed because the call was made at grid depth greater\n than than either the default (2 levels of grids) or user specified device\n limit ::cudaLimitDevRuntimeSyncDepth. To be able to synchronize on\n launched grids at a greater depth successfully, the maximum nested\n depth at which ::cudaDeviceSynchronize will be called must be specified\n with the ::cudaLimitDevRuntimeSyncDepth limit to the ::cudaDeviceSetLimit\n api before the host-side launch of a kernel using the device runtime.\n Keep in mind that additional levels of sync depth require the runtime\n to reserve large amounts of device memory that cannot be used for\n user allocations. Note that ::cudaDeviceSynchronize made from device\n runtime is only supported on devices of compute capability < 9.0."]
    cudaErrorSyncDepthExceeded = 68,
    #[doc = " This error indicates that a device runtime grid launch failed because\n the launch would exceed the limit ::cudaLimitDevRuntimePendingLaunchCount.\n For this launch to proceed successfully, ::cudaDeviceSetLimit must be\n called to set the ::cudaLimitDevRuntimePendingLaunchCount to be higher\n than the upper bound of outstanding launches that can be issued to the\n device runtime. Keep in mind that raising the limit of pending device\n runtime launches will require the runtime to reserve device memory that\n cannot be used for user allocations."]
    cudaErrorLaunchPendingCountExceeded = 69,
    #[doc = " The requested device function does not exist or is not compiled for the\n proper device architecture."]
    cudaErrorInvalidDeviceFunction = 98,
    #[doc = " This indicates that no CUDA-capable devices were detected by the installed\n CUDA driver."]
    cudaErrorNoDevice = 100,
    #[doc = " This indicates that the device ordinal supplied by the user does not\n correspond to a valid CUDA device or that the action requested is\n invalid for the specified device."]
    cudaErrorInvalidDevice = 101,
    #[doc = " This indicates that the device doesn't have a valid Grid License."]
    cudaErrorDeviceNotLicensed = 102,
    #[doc = " By default, the CUDA runtime may perform a minimal set of self-tests,\n as well as CUDA driver tests, to establish the validity of both.\n Introduced in CUDA 11.2, this error return indicates that at least one\n of these tests has failed and the validity of either the runtime\n or the driver could not be established."]
    cudaErrorSoftwareValidityNotEstablished = 103,
    #[doc = " This indicates an internal startup failure in the CUDA runtime."]
    cudaErrorStartupFailure = 127,
    #[doc = " This indicates that the device kernel image is invalid."]
    cudaErrorInvalidKernelImage = 200,
    #[doc = " This most frequently indicates that there is no context bound to the\n current thread. This can also be returned if the context passed to an\n API call is not a valid handle (such as a context that has had\n ::cuCtxDestroy() invoked on it). This can also be returned if a user\n mixes different API versions (i.e. 3010 context with 3020 API calls).\n See ::cuCtxGetApiVersion() for more details."]
    cudaErrorDeviceUninitialized = 201,
    #[doc = " This indicates that the buffer object could not be mapped."]
    cudaErrorMapBufferObjectFailed = 205,
    #[doc = " This indicates that the buffer object could not be unmapped."]
    cudaErrorUnmapBufferObjectFailed = 206,
    #[doc = " This indicates that the specified array is currently mapped and thus\n cannot be destroyed."]
    cudaErrorArrayIsMapped = 207,
    #[doc = " This indicates that the resource is already mapped."]
    cudaErrorAlreadyMapped = 208,
    #[doc = " This indicates that there is no kernel image available that is suitable\n for the device. This can occur when a user specifies code generation\n options for a particular CUDA source file that do not include the\n corresponding device configuration."]
    cudaErrorNoKernelImageForDevice = 209,
    #[doc = " This indicates that a resource has already been acquired."]
    cudaErrorAlreadyAcquired = 210,
    #[doc = " This indicates that a resource is not mapped."]
    cudaErrorNotMapped = 211,
    #[doc = " This indicates that a mapped resource is not available for access as an\n array."]
    cudaErrorNotMappedAsArray = 212,
    #[doc = " This indicates that a mapped resource is not available for access as a\n pointer."]
    cudaErrorNotMappedAsPointer = 213,
    #[doc = " This indicates that an uncorrectable ECC error was detected during\n execution."]
    cudaErrorECCUncorrectable = 214,
    #[doc = " This indicates that the ::cudaLimit passed to the API call is not\n supported by the active device."]
    cudaErrorUnsupportedLimit = 215,
    #[doc = " This indicates that a call tried to access an exclusive-thread device that\n is already in use by a different thread."]
    cudaErrorDeviceAlreadyInUse = 216,
    #[doc = " This error indicates that P2P access is not supported across the given\n devices."]
    cudaErrorPeerAccessUnsupported = 217,
    #[doc = " A PTX compilation failed. The runtime may fall back to compiling PTX if\n an application does not contain a suitable binary for the current device."]
    cudaErrorInvalidPtx = 218,
    #[doc = " This indicates an error with the OpenGL or DirectX context."]
    cudaErrorInvalidGraphicsContext = 219,
    #[doc = " This indicates that an uncorrectable NVLink error was detected during the\n execution."]
    cudaErrorNvlinkUncorrectable = 220,
    #[doc = " This indicates that the PTX JIT compiler library was not found. The JIT Compiler\n library is used for PTX compilation. The runtime may fall back to compiling PTX\n if an application does not contain a suitable binary for the current device."]
    cudaErrorJitCompilerNotFound = 221,
    #[doc = " This indicates that the provided PTX was compiled with an unsupported toolchain.\n The most common reason for this, is the PTX was generated by a compiler newer\n than what is supported by the CUDA driver and PTX JIT compiler."]
    cudaErrorUnsupportedPtxVersion = 222,
    #[doc = " This indicates that the JIT compilation was disabled. The JIT compilation compiles\n PTX. The runtime may fall back to compiling PTX if an application does not contain\n a suitable binary for the current device."]
    cudaErrorJitCompilationDisabled = 223,
    #[doc = " This indicates that the provided execution affinity is not supported by the device."]
    cudaErrorUnsupportedExecAffinity = 224,
    #[doc = " This indicates that the code to be compiled by the PTX JIT contains\n unsupported call to cudaDeviceSynchronize."]
    cudaErrorUnsupportedDevSideSync = 225,
    #[doc = " This indicates that an exception occurred on the device that is now\n contained by the GPU's error containment capability. Common causes are -\n a. Certain types of invalid accesses of peer GPU memory over nvlink\n b. Certain classes of hardware errors\n This leaves the process in an inconsistent state and any further CUDA\n work will return the same error. To continue using CUDA, the process must\n be terminated and relaunched."]
    cudaErrorContained = 226,
    #[doc = " This indicates that the device kernel source is invalid."]
    cudaErrorInvalidSource = 300,
    #[doc = " This indicates that the file specified was not found."]
    cudaErrorFileNotFound = 301,
    #[doc = " This indicates that a link to a shared object failed to resolve."]
    cudaErrorSharedObjectSymbolNotFound = 302,
    #[doc = " This indicates that initialization of a shared object failed."]
    cudaErrorSharedObjectInitFailed = 303,
    #[doc = " This error indicates that an OS call failed."]
    cudaErrorOperatingSystem = 304,
    #[doc = " This indicates that a resource handle passed to the API call was not\n valid. Resource handles are opaque types like ::cudaStream_t and\n ::cudaEvent_t."]
    cudaErrorInvalidResourceHandle = 400,
    #[doc = " This indicates that a resource required by the API call is not in a\n valid state to perform the requested operation."]
    cudaErrorIllegalState = 401,
    #[doc = " This indicates an attempt was made to introspect an object in a way that\n would discard semantically important information. This is either due to\n the object using funtionality newer than the API version used to\n introspect it or omission of optional return arguments."]
    cudaErrorLossyQuery = 402,
    #[doc = " This indicates that a named symbol was not found. Examples of symbols\n are global/constant variable names, driver function names, texture names,\n and surface names."]
    cudaErrorSymbolNotFound = 500,
    #[doc = " This indicates that asynchronous operations issued previously have not\n completed yet. This result is not actually an error, but must be indicated\n differently than ::cudaSuccess (which indicates completion). Calls that\n may return this value include ::cudaEventQuery() and ::cudaStreamQuery()."]
    cudaErrorNotReady = 600,
    #[doc = " The device encountered a load or store instruction on an invalid memory address.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorIllegalAddress = 700,
    #[doc = " This indicates that a launch did not occur because it did not have\n appropriate resources. Although this error is similar to\n ::cudaErrorInvalidConfiguration, this error usually indicates that the\n user has attempted to pass too many arguments to the device kernel, or the\n kernel launch specifies too many threads for the kernel's register count."]
    cudaErrorLaunchOutOfResources = 701,
    #[doc = " This indicates that the device kernel took too long to execute. This can\n only occur if timeouts are enabled - see the device attribute\n \\ref ::cudaDeviceAttr::cudaDevAttrKernelExecTimeout \"cudaDevAttrKernelExecTimeout\"\n for more information.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorLaunchTimeout = 702,
    #[doc = " This error indicates a kernel launch that uses an incompatible texturing\n mode."]
    cudaErrorLaunchIncompatibleTexturing = 703,
    #[doc = " This error indicates that a call to ::cudaDeviceEnablePeerAccess() is\n trying to re-enable peer addressing on from a context which has already\n had peer addressing enabled."]
    cudaErrorPeerAccessAlreadyEnabled = 704,
    #[doc = " This error indicates that ::cudaDeviceDisablePeerAccess() is trying to\n disable peer addressing which has not been enabled yet via\n ::cudaDeviceEnablePeerAccess()."]
    cudaErrorPeerAccessNotEnabled = 705,
    #[doc = " This indicates that the user has called ::cudaSetValidDevices(),\n ::cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(),\n ::cudaD3D10SetDirect3DDevice, ::cudaD3D11SetDirect3DDevice(), or\n ::cudaVDPAUSetVDPAUDevice() after initializing the CUDA runtime by\n calling non-device management operations (allocating memory and\n launching kernels are examples of non-device management operations).\n This error can also be returned if using runtime/driver\n interoperability and there is an existing ::CUcontext active on the\n host thread."]
    cudaErrorSetOnActiveProcess = 708,
    #[doc = " This error indicates that the context current to the calling thread\n has been destroyed using ::cuCtxDestroy, or is a primary context which\n has not yet been initialized."]
    cudaErrorContextIsDestroyed = 709,
    #[doc = " An assert triggered in device code during kernel execution. The device\n cannot be used again. All existing allocations are invalid. To continue\n using CUDA, the process must be terminated and relaunched."]
    cudaErrorAssert = 710,
    #[doc = " This error indicates that the hardware resources required to enable\n peer access have been exhausted for one or more of the devices\n passed to ::cudaEnablePeerAccess()."]
    cudaErrorTooManyPeers = 711,
    #[doc = " This error indicates that the memory range passed to ::cudaHostRegister()\n has already been registered."]
    cudaErrorHostMemoryAlreadyRegistered = 712,
    #[doc = " This error indicates that the pointer passed to ::cudaHostUnregister()\n does not correspond to any currently registered memory region."]
    cudaErrorHostMemoryNotRegistered = 713,
    #[doc = " Device encountered an error in the call stack during kernel execution,\n possibly due to stack corruption or exceeding the stack size limit.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorHardwareStackError = 714,
    #[doc = " The device encountered an illegal instruction during kernel execution\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorIllegalInstruction = 715,
    #[doc = " The device encountered a load or store instruction\n on a memory address which is not aligned.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorMisalignedAddress = 716,
    #[doc = " While executing a kernel, the device encountered an instruction\n which can only operate on memory locations in certain address spaces\n (global, shared, or local), but was supplied a memory address not\n belonging to an allowed address space.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorInvalidAddressSpace = 717,
    #[doc = " The device encountered an invalid program counter.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorInvalidPc = 718,
    #[doc = " An exception occurred on the device while executing a kernel. Common\n causes include dereferencing an invalid device pointer and accessing\n out of bounds shared memory. Less common cases can be system specific - more\n information about these cases can be found in the system specific user guide.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
    cudaErrorLaunchFailure = 719,
    #[doc = " This error indicates that the number of blocks launched per grid for a kernel that was\n launched via either ::cudaLaunchCooperativeKernel\n exceeds the maximum number of blocks as allowed by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor\n or ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors\n as specified by the device attribute ::cudaDevAttrMultiProcessorCount."]
    cudaErrorCooperativeLaunchTooLarge = 720,
    #[doc = " An exception occurred on the device while exiting a kernel using tensor memory: the\n tensor memory was not completely deallocated. This leaves the process in an inconsistent\n state and any further CUDA work will return the same error. To continue using CUDA, the\n process must be terminated and relaunched."]
    cudaErrorTensorMemoryLeak = 721,
    #[doc = " This error indicates the attempted operation is not permitted."]
    cudaErrorNotPermitted = 800,
    #[doc = " This error indicates the attempted operation is not supported\n on the current system or device."]
    cudaErrorNotSupported = 801,
    #[doc = " This error indicates that the system is not yet ready to start any CUDA\n work.  To continue using CUDA, verify the system configuration is in a\n valid state and all required driver daemons are actively running.\n More information about this error can be found in the system specific\n user guide."]
    cudaErrorSystemNotReady = 802,
    #[doc = " This error indicates that there is a mismatch between the versions of\n the display driver and the CUDA driver. Refer to the compatibility documentation\n for supported versions."]
    cudaErrorSystemDriverMismatch = 803,
    #[doc = " This error indicates that the system was upgraded to run with forward compatibility\n but the visible hardware detected by CUDA does not support this configuration.\n Refer to the compatibility documentation for the supported hardware matrix or ensure\n that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES\n environment variable."]
    cudaErrorCompatNotSupportedOnDevice = 804,
    #[doc = " This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."]
    cudaErrorMpsConnectionFailed = 805,
    #[doc = " This error indicates that the remote procedural call between the MPS server and the MPS client failed."]
    cudaErrorMpsRpcFailure = 806,
    #[doc = " This error indicates that the MPS server is not ready to accept new MPS client requests.\n This error can be returned when the MPS server is in the process of recovering from a fatal failure."]
    cudaErrorMpsServerNotReady = 807,
    #[doc = " This error indicates that the hardware resources required to create MPS client have been exhausted."]
    cudaErrorMpsMaxClientsReached = 808,
    #[doc = " This error indicates the the hardware resources required to device connections have been exhausted."]
    cudaErrorMpsMaxConnectionsReached = 809,
    #[doc = " This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched."]
    cudaErrorMpsClientTerminated = 810,
    #[doc = " This error indicates, that the program is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it."]
    cudaErrorCdpNotSupported = 811,
    #[doc = " This error indicates, that the program contains an unsupported interaction between different versions of CUDA Dynamic Parallelism."]
    cudaErrorCdpVersionMismatch = 812,
    #[doc = " The operation is not permitted when the stream is capturing."]
    cudaErrorStreamCaptureUnsupported = 900,
    #[doc = " The current capture sequence on the stream has been invalidated due to\n a previous error."]
    cudaErrorStreamCaptureInvalidated = 901,
    #[doc = " The operation would have resulted in a merge of two independent capture\n sequences."]
    cudaErrorStreamCaptureMerge = 902,
    #[doc = " The capture was not initiated in this stream."]
    cudaErrorStreamCaptureUnmatched = 903,
    #[doc = " The capture sequence contains a fork that was not joined to the primary\n stream."]
    cudaErrorStreamCaptureUnjoined = 904,
    #[doc = " A dependency would have been created which crosses the capture sequence\n boundary. Only implicit in-stream ordering dependencies are allowed to\n cross the boundary."]
    cudaErrorStreamCaptureIsolation = 905,
    #[doc = " The operation would have resulted in a disallowed implicit dependency on\n a current capture sequence from cudaStreamLegacy."]
    cudaErrorStreamCaptureImplicit = 906,
    #[doc = " The operation is not permitted on an event which was last recorded in a\n capturing stream."]
    cudaErrorCapturedEvent = 907,
    #[doc = " A stream capture sequence not initiated with the ::cudaStreamCaptureModeRelaxed\n argument to ::cudaStreamBeginCapture was passed to ::cudaStreamEndCapture in a\n different thread."]
    cudaErrorStreamCaptureWrongThread = 908,
    #[doc = " This indicates that the wait operation has timed out."]
    cudaErrorTimeout = 909,
    #[doc = " This error indicates that the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update."]
    cudaErrorGraphExecUpdateFailure = 910,
    #[doc = " This indicates that an async error has occurred in a device outside of CUDA.\n If CUDA was waiting for an external device's signal before consuming shared data,\n the external device signaled an error indicating that the data is not valid for\n consumption. This leaves the process in an inconsistent state and any further CUDA\n work will return the same error. To continue using CUDA, the process must be\n terminated and relaunched."]
    cudaErrorExternalDevice = 911,
    #[doc = " This indicates that a kernel launch error has occurred due to cluster\n misconfiguration."]
    cudaErrorInvalidClusterSize = 912,
    #[doc = " Indiciates a function handle is not loaded when calling an API that requires\n a loaded function."]
    cudaErrorFunctionNotLoaded = 913,
    #[doc = " This error indicates one or more resources passed in are not valid resource\n types for the operation."]
    cudaErrorInvalidResourceType = 914,
    #[doc = " This error indicates one or more resources are insufficient or non-applicable for\n the operation."]
    cudaErrorInvalidResourceConfiguration = 915,
    #[doc = " This indicates that an unknown internal error has occurred."]
    cudaErrorUnknown = 999,
    #[doc = " Any unhandled CUDA driver error is added to this value and returned via\n the runtime. Production releases of CUDA should not return such errors.\n \\deprecated\n This error return is deprecated as of CUDA 4.1."]
    cudaErrorApiFailureBase = 10000,
}
#[repr(u32)]
#[doc = " Channel format kind"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaChannelFormatKind {
    #[doc = "< Signed channel format"]
    cudaChannelFormatKindSigned = 0,
    #[doc = "< Unsigned channel format"]
    cudaChannelFormatKindUnsigned = 1,
    #[doc = "< Float channel format"]
    cudaChannelFormatKindFloat = 2,
    #[doc = "< No channel format"]
    cudaChannelFormatKindNone = 3,
    #[doc = "< Unsigned 8-bit integers, planar 4:2:0 YUV format"]
    cudaChannelFormatKindNV12 = 4,
    #[doc = "< 1 channel unsigned 8-bit normalized integer"]
    cudaChannelFormatKindUnsignedNormalized8X1 = 5,
    #[doc = "< 2 channel unsigned 8-bit normalized integer"]
    cudaChannelFormatKindUnsignedNormalized8X2 = 6,
    #[doc = "< 4 channel unsigned 8-bit normalized integer"]
    cudaChannelFormatKindUnsignedNormalized8X4 = 7,
    #[doc = "< 1 channel unsigned 16-bit normalized integer"]
    cudaChannelFormatKindUnsignedNormalized16X1 = 8,
    #[doc = "< 2 channel unsigned 16-bit normalized integer"]
    cudaChannelFormatKindUnsignedNormalized16X2 = 9,
    #[doc = "< 4 channel unsigned 16-bit normalized integer"]
    cudaChannelFormatKindUnsignedNormalized16X4 = 10,
    #[doc = "< 1 channel signed 8-bit normalized integer"]
    cudaChannelFormatKindSignedNormalized8X1 = 11,
    #[doc = "< 2 channel signed 8-bit normalized integer"]
    cudaChannelFormatKindSignedNormalized8X2 = 12,
    #[doc = "< 4 channel signed 8-bit normalized integer"]
    cudaChannelFormatKindSignedNormalized8X4 = 13,
    #[doc = "< 1 channel signed 16-bit normalized integer"]
    cudaChannelFormatKindSignedNormalized16X1 = 14,
    #[doc = "< 2 channel signed 16-bit normalized integer"]
    cudaChannelFormatKindSignedNormalized16X2 = 15,
    #[doc = "< 4 channel signed 16-bit normalized integer"]
    cudaChannelFormatKindSignedNormalized16X4 = 16,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed1 = 17,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding"]
    cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed2 = 19,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding"]
    cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed3 = 21,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding"]
    cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22,
    #[doc = "< 1 channel unsigned normalized block-compressed (BC4 compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed4 = 23,
    #[doc = "< 1 channel signed normalized block-compressed (BC4 compression) format"]
    cudaChannelFormatKindSignedBlockCompressed4 = 24,
    #[doc = "< 2 channel unsigned normalized block-compressed (BC5 compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed5 = 25,
    #[doc = "< 2 channel signed normalized block-compressed (BC5 compression) format"]
    cudaChannelFormatKindSignedBlockCompressed5 = 26,
    #[doc = "< 3 channel unsigned half-float block-compressed (BC6H compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed6H = 27,
    #[doc = "< 3 channel signed half-float block-compressed (BC6H compression) format"]
    cudaChannelFormatKindSignedBlockCompressed6H = 28,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format"]
    cudaChannelFormatKindUnsignedBlockCompressed7 = 29,
    #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding"]
    cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30,
    #[doc = "< 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format"]
    cudaChannelFormatKindUnsignedNormalized1010102 = 31,
}
#[doc = " CUDA Channel format descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaChannelFormatDesc {
    #[doc = "< x"]
    pub x: ::core::ffi::c_int,
    #[doc = "< y"]
    pub y: ::core::ffi::c_int,
    #[doc = "< z"]
    pub z: ::core::ffi::c_int,
    #[doc = "< w"]
    pub w: ::core::ffi::c_int,
    #[doc = "< Channel format kind"]
    pub f: cudaChannelFormatKind,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaChannelFormatDesc"][::core::mem::size_of::<cudaChannelFormatDesc>() - 20usize];
    ["Alignment of cudaChannelFormatDesc"]
        [::core::mem::align_of::<cudaChannelFormatDesc>() - 4usize];
    ["Offset of field: cudaChannelFormatDesc::x"]
        [::core::mem::offset_of!(cudaChannelFormatDesc, x) - 0usize];
    ["Offset of field: cudaChannelFormatDesc::y"]
        [::core::mem::offset_of!(cudaChannelFormatDesc, y) - 4usize];
    ["Offset of field: cudaChannelFormatDesc::z"]
        [::core::mem::offset_of!(cudaChannelFormatDesc, z) - 8usize];
    ["Offset of field: cudaChannelFormatDesc::w"]
        [::core::mem::offset_of!(cudaChannelFormatDesc, w) - 12usize];
    ["Offset of field: cudaChannelFormatDesc::f"]
        [::core::mem::offset_of!(cudaChannelFormatDesc, f) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaArray {
    _unused: [u8; 0],
}
#[doc = " CUDA array"]
pub type cudaArray_t = *mut cudaArray;
#[doc = " CUDA array (as source copy argument)"]
pub type cudaArray_const_t = *const cudaArray;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMipmappedArray {
    _unused: [u8; 0],
}
#[doc = " CUDA mipmapped array"]
pub type cudaMipmappedArray_t = *mut cudaMipmappedArray;
#[doc = " CUDA mipmapped array (as source argument)"]
pub type cudaMipmappedArray_const_t = *const cudaMipmappedArray;
#[doc = " Sparse CUDA array and CUDA mipmapped array properties"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaArraySparseProperties {
    pub tileExtent: cudaArraySparseProperties__bindgen_ty_1,
    #[doc = "< First mip level at which the mip tail begins"]
    pub miptailFirstLevel: ::core::ffi::c_uint,
    #[doc = "< Total size of the mip tail."]
    pub miptailSize: ::core::ffi::c_ulonglong,
    #[doc = "< Flags will either be zero or ::cudaArraySparsePropertiesSingleMipTail"]
    pub flags: ::core::ffi::c_uint,
    pub reserved: [::core::ffi::c_uint; 4usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaArraySparseProperties__bindgen_ty_1 {
    #[doc = "< Tile width in elements"]
    pub width: ::core::ffi::c_uint,
    #[doc = "< Tile height in elements"]
    pub height: ::core::ffi::c_uint,
    #[doc = "< Tile depth in elements"]
    pub depth: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaArraySparseProperties__bindgen_ty_1"]
        [::core::mem::size_of::<cudaArraySparseProperties__bindgen_ty_1>() - 12usize];
    ["Alignment of cudaArraySparseProperties__bindgen_ty_1"]
        [::core::mem::align_of::<cudaArraySparseProperties__bindgen_ty_1>() - 4usize];
    ["Offset of field: cudaArraySparseProperties__bindgen_ty_1::width"]
        [::core::mem::offset_of!(cudaArraySparseProperties__bindgen_ty_1, width) - 0usize];
    ["Offset of field: cudaArraySparseProperties__bindgen_ty_1::height"]
        [::core::mem::offset_of!(cudaArraySparseProperties__bindgen_ty_1, height) - 4usize];
    ["Offset of field: cudaArraySparseProperties__bindgen_ty_1::depth"]
        [::core::mem::offset_of!(cudaArraySparseProperties__bindgen_ty_1, depth) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaArraySparseProperties"]
        [::core::mem::size_of::<cudaArraySparseProperties>() - 48usize];
    ["Alignment of cudaArraySparseProperties"]
        [::core::mem::align_of::<cudaArraySparseProperties>() - 8usize];
    ["Offset of field: cudaArraySparseProperties::tileExtent"]
        [::core::mem::offset_of!(cudaArraySparseProperties, tileExtent) - 0usize];
    ["Offset of field: cudaArraySparseProperties::miptailFirstLevel"]
        [::core::mem::offset_of!(cudaArraySparseProperties, miptailFirstLevel) - 12usize];
    ["Offset of field: cudaArraySparseProperties::miptailSize"]
        [::core::mem::offset_of!(cudaArraySparseProperties, miptailSize) - 16usize];
    ["Offset of field: cudaArraySparseProperties::flags"]
        [::core::mem::offset_of!(cudaArraySparseProperties, flags) - 24usize];
    ["Offset of field: cudaArraySparseProperties::reserved"]
        [::core::mem::offset_of!(cudaArraySparseProperties, reserved) - 28usize];
};
#[doc = " CUDA array and CUDA mipmapped array memory requirements"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaArrayMemoryRequirements {
    #[doc = "< Total size of the array."]
    pub size: usize,
    #[doc = "< Alignment necessary for mapping the array."]
    pub alignment: usize,
    pub reserved: [::core::ffi::c_uint; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaArrayMemoryRequirements"]
        [::core::mem::size_of::<cudaArrayMemoryRequirements>() - 32usize];
    ["Alignment of cudaArrayMemoryRequirements"]
        [::core::mem::align_of::<cudaArrayMemoryRequirements>() - 8usize];
    ["Offset of field: cudaArrayMemoryRequirements::size"]
        [::core::mem::offset_of!(cudaArrayMemoryRequirements, size) - 0usize];
    ["Offset of field: cudaArrayMemoryRequirements::alignment"]
        [::core::mem::offset_of!(cudaArrayMemoryRequirements, alignment) - 8usize];
    ["Offset of field: cudaArrayMemoryRequirements::reserved"]
        [::core::mem::offset_of!(cudaArrayMemoryRequirements, reserved) - 16usize];
};
#[repr(u32)]
#[doc = " CUDA memory types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemoryType {
    #[doc = "< Unregistered memory"]
    cudaMemoryTypeUnregistered = 0,
    #[doc = "< Host memory"]
    cudaMemoryTypeHost = 1,
    #[doc = "< Device memory"]
    cudaMemoryTypeDevice = 2,
    #[doc = "< Managed memory"]
    cudaMemoryTypeManaged = 3,
}
#[repr(u32)]
#[doc = " CUDA memory copy types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemcpyKind {
    #[doc = "< Host   -> Host"]
    cudaMemcpyHostToHost = 0,
    #[doc = "< Host   -> Device"]
    cudaMemcpyHostToDevice = 1,
    #[doc = "< Device -> Host"]
    cudaMemcpyDeviceToHost = 2,
    #[doc = "< Device -> Device"]
    cudaMemcpyDeviceToDevice = 3,
    #[doc = "< Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing"]
    cudaMemcpyDefault = 4,
}
#[doc = " CUDA Pitched memory pointer\n\n \\sa ::make_cudaPitchedPtr"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaPitchedPtr {
    #[doc = "< Pointer to allocated memory"]
    pub ptr: *mut ::core::ffi::c_void,
    #[doc = "< Pitch of allocated memory in bytes"]
    pub pitch: usize,
    #[doc = "< Logical width of allocation in elements"]
    pub xsize: usize,
    #[doc = "< Logical height of allocation in elements"]
    pub ysize: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaPitchedPtr"][::core::mem::size_of::<cudaPitchedPtr>() - 32usize];
    ["Alignment of cudaPitchedPtr"][::core::mem::align_of::<cudaPitchedPtr>() - 8usize];
    ["Offset of field: cudaPitchedPtr::ptr"][::core::mem::offset_of!(cudaPitchedPtr, ptr) - 0usize];
    ["Offset of field: cudaPitchedPtr::pitch"]
        [::core::mem::offset_of!(cudaPitchedPtr, pitch) - 8usize];
    ["Offset of field: cudaPitchedPtr::xsize"]
        [::core::mem::offset_of!(cudaPitchedPtr, xsize) - 16usize];
    ["Offset of field: cudaPitchedPtr::ysize"]
        [::core::mem::offset_of!(cudaPitchedPtr, ysize) - 24usize];
};
#[doc = " CUDA extent\n\n \\sa ::make_cudaExtent"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExtent {
    #[doc = "< Width in elements when referring to array memory, in bytes when referring to linear memory"]
    pub width: usize,
    #[doc = "< Height in elements"]
    pub height: usize,
    #[doc = "< Depth in elements"]
    pub depth: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExtent"][::core::mem::size_of::<cudaExtent>() - 24usize];
    ["Alignment of cudaExtent"][::core::mem::align_of::<cudaExtent>() - 8usize];
    ["Offset of field: cudaExtent::width"][::core::mem::offset_of!(cudaExtent, width) - 0usize];
    ["Offset of field: cudaExtent::height"][::core::mem::offset_of!(cudaExtent, height) - 8usize];
    ["Offset of field: cudaExtent::depth"][::core::mem::offset_of!(cudaExtent, depth) - 16usize];
};
#[doc = " CUDA 3D position\n\n \\sa ::make_cudaPos"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaPos {
    #[doc = "< x"]
    pub x: usize,
    #[doc = "< y"]
    pub y: usize,
    #[doc = "< z"]
    pub z: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaPos"][::core::mem::size_of::<cudaPos>() - 24usize];
    ["Alignment of cudaPos"][::core::mem::align_of::<cudaPos>() - 8usize];
    ["Offset of field: cudaPos::x"][::core::mem::offset_of!(cudaPos, x) - 0usize];
    ["Offset of field: cudaPos::y"][::core::mem::offset_of!(cudaPos, y) - 8usize];
    ["Offset of field: cudaPos::z"][::core::mem::offset_of!(cudaPos, z) - 16usize];
};
#[doc = " CUDA 3D memory copying parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemcpy3DParms {
    #[doc = "< Source memory address"]
    pub srcArray: cudaArray_t,
    #[doc = "< Source position offset"]
    pub srcPos: cudaPos,
    #[doc = "< Pitched source memory address"]
    pub srcPtr: cudaPitchedPtr,
    #[doc = "< Destination memory address"]
    pub dstArray: cudaArray_t,
    #[doc = "< Destination position offset"]
    pub dstPos: cudaPos,
    #[doc = "< Pitched destination memory address"]
    pub dstPtr: cudaPitchedPtr,
    #[doc = "< Requested memory copy size"]
    pub extent: cudaExtent,
    #[doc = "< Type of transfer"]
    pub kind: cudaMemcpyKind,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DParms"][::core::mem::size_of::<cudaMemcpy3DParms>() - 160usize];
    ["Alignment of cudaMemcpy3DParms"][::core::mem::align_of::<cudaMemcpy3DParms>() - 8usize];
    ["Offset of field: cudaMemcpy3DParms::srcArray"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, srcArray) - 0usize];
    ["Offset of field: cudaMemcpy3DParms::srcPos"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, srcPos) - 8usize];
    ["Offset of field: cudaMemcpy3DParms::srcPtr"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, srcPtr) - 32usize];
    ["Offset of field: cudaMemcpy3DParms::dstArray"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, dstArray) - 64usize];
    ["Offset of field: cudaMemcpy3DParms::dstPos"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, dstPos) - 72usize];
    ["Offset of field: cudaMemcpy3DParms::dstPtr"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, dstPtr) - 96usize];
    ["Offset of field: cudaMemcpy3DParms::extent"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, extent) - 128usize];
    ["Offset of field: cudaMemcpy3DParms::kind"]
        [::core::mem::offset_of!(cudaMemcpy3DParms, kind) - 152usize];
};
#[doc = " Memcpy node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemcpyNodeParams {
    #[doc = "< Must be zero"]
    pub flags: ::core::ffi::c_int,
    #[doc = "< Must be zero"]
    pub reserved: [::core::ffi::c_int; 3usize],
    #[doc = "< Parameters for the memory copy"]
    pub copyParams: cudaMemcpy3DParms,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpyNodeParams"][::core::mem::size_of::<cudaMemcpyNodeParams>() - 176usize];
    ["Alignment of cudaMemcpyNodeParams"][::core::mem::align_of::<cudaMemcpyNodeParams>() - 8usize];
    ["Offset of field: cudaMemcpyNodeParams::flags"]
        [::core::mem::offset_of!(cudaMemcpyNodeParams, flags) - 0usize];
    ["Offset of field: cudaMemcpyNodeParams::reserved"]
        [::core::mem::offset_of!(cudaMemcpyNodeParams, reserved) - 4usize];
    ["Offset of field: cudaMemcpyNodeParams::copyParams"]
        [::core::mem::offset_of!(cudaMemcpyNodeParams, copyParams) - 16usize];
};
#[doc = " CUDA 3D cross-device memory copying parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemcpy3DPeerParms {
    #[doc = "< Source memory address"]
    pub srcArray: cudaArray_t,
    #[doc = "< Source position offset"]
    pub srcPos: cudaPos,
    #[doc = "< Pitched source memory address"]
    pub srcPtr: cudaPitchedPtr,
    #[doc = "< Source device"]
    pub srcDevice: ::core::ffi::c_int,
    #[doc = "< Destination memory address"]
    pub dstArray: cudaArray_t,
    #[doc = "< Destination position offset"]
    pub dstPos: cudaPos,
    #[doc = "< Pitched destination memory address"]
    pub dstPtr: cudaPitchedPtr,
    #[doc = "< Destination device"]
    pub dstDevice: ::core::ffi::c_int,
    #[doc = "< Requested memory copy size"]
    pub extent: cudaExtent,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DPeerParms"][::core::mem::size_of::<cudaMemcpy3DPeerParms>() - 168usize];
    ["Alignment of cudaMemcpy3DPeerParms"]
        [::core::mem::align_of::<cudaMemcpy3DPeerParms>() - 8usize];
    ["Offset of field: cudaMemcpy3DPeerParms::srcArray"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, srcArray) - 0usize];
    ["Offset of field: cudaMemcpy3DPeerParms::srcPos"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, srcPos) - 8usize];
    ["Offset of field: cudaMemcpy3DPeerParms::srcPtr"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, srcPtr) - 32usize];
    ["Offset of field: cudaMemcpy3DPeerParms::srcDevice"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, srcDevice) - 64usize];
    ["Offset of field: cudaMemcpy3DPeerParms::dstArray"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, dstArray) - 72usize];
    ["Offset of field: cudaMemcpy3DPeerParms::dstPos"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, dstPos) - 80usize];
    ["Offset of field: cudaMemcpy3DPeerParms::dstPtr"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, dstPtr) - 104usize];
    ["Offset of field: cudaMemcpy3DPeerParms::dstDevice"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, dstDevice) - 136usize];
    ["Offset of field: cudaMemcpy3DPeerParms::extent"]
        [::core::mem::offset_of!(cudaMemcpy3DPeerParms, extent) - 144usize];
};
#[doc = " CUDA Memset node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemsetParams {
    #[doc = "< Destination device pointer"]
    pub dst: *mut ::core::ffi::c_void,
    #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
    pub pitch: usize,
    #[doc = "< Value to be set"]
    pub value: ::core::ffi::c_uint,
    #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
    pub elementSize: ::core::ffi::c_uint,
    #[doc = "< Width of the row in elements"]
    pub width: usize,
    #[doc = "< Number of rows"]
    pub height: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemsetParams"][::core::mem::size_of::<cudaMemsetParams>() - 40usize];
    ["Alignment of cudaMemsetParams"][::core::mem::align_of::<cudaMemsetParams>() - 8usize];
    ["Offset of field: cudaMemsetParams::dst"]
        [::core::mem::offset_of!(cudaMemsetParams, dst) - 0usize];
    ["Offset of field: cudaMemsetParams::pitch"]
        [::core::mem::offset_of!(cudaMemsetParams, pitch) - 8usize];
    ["Offset of field: cudaMemsetParams::value"]
        [::core::mem::offset_of!(cudaMemsetParams, value) - 16usize];
    ["Offset of field: cudaMemsetParams::elementSize"]
        [::core::mem::offset_of!(cudaMemsetParams, elementSize) - 20usize];
    ["Offset of field: cudaMemsetParams::width"]
        [::core::mem::offset_of!(cudaMemsetParams, width) - 24usize];
    ["Offset of field: cudaMemsetParams::height"]
        [::core::mem::offset_of!(cudaMemsetParams, height) - 32usize];
};
#[doc = " CUDA Memset node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemsetParamsV2 {
    #[doc = "< Destination device pointer"]
    pub dst: *mut ::core::ffi::c_void,
    #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
    pub pitch: usize,
    #[doc = "< Value to be set"]
    pub value: ::core::ffi::c_uint,
    #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
    pub elementSize: ::core::ffi::c_uint,
    #[doc = "< Width of the row in elements"]
    pub width: usize,
    #[doc = "< Number of rows"]
    pub height: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemsetParamsV2"][::core::mem::size_of::<cudaMemsetParamsV2>() - 40usize];
    ["Alignment of cudaMemsetParamsV2"][::core::mem::align_of::<cudaMemsetParamsV2>() - 8usize];
    ["Offset of field: cudaMemsetParamsV2::dst"]
        [::core::mem::offset_of!(cudaMemsetParamsV2, dst) - 0usize];
    ["Offset of field: cudaMemsetParamsV2::pitch"]
        [::core::mem::offset_of!(cudaMemsetParamsV2, pitch) - 8usize];
    ["Offset of field: cudaMemsetParamsV2::value"]
        [::core::mem::offset_of!(cudaMemsetParamsV2, value) - 16usize];
    ["Offset of field: cudaMemsetParamsV2::elementSize"]
        [::core::mem::offset_of!(cudaMemsetParamsV2, elementSize) - 20usize];
    ["Offset of field: cudaMemsetParamsV2::width"]
        [::core::mem::offset_of!(cudaMemsetParamsV2, width) - 24usize];
    ["Offset of field: cudaMemsetParamsV2::height"]
        [::core::mem::offset_of!(cudaMemsetParamsV2, height) - 32usize];
};
#[repr(u32)]
#[doc = " Specifies performance hint with ::cudaAccessPolicyWindow for hitProp and missProp members."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaAccessProperty {
    #[doc = "< Normal cache persistence."]
    cudaAccessPropertyNormal = 0,
    #[doc = "< Streaming access is less likely to persit from cache."]
    cudaAccessPropertyStreaming = 1,
    #[doc = "< Persisting access is more likely to persist in cache."]
    cudaAccessPropertyPersisting = 2,
}
#[doc = " Specifies an access policy for a window, a contiguous extent of memory\n beginning at base_ptr and ending at base_ptr + num_bytes.\n Partition into many segments and assign segments such that.\n sum of \"hit segments\" / window == approx. ratio.\n sum of \"miss segments\" / window == approx 1-ratio.\n Segments and ratio specifications are fitted to the capabilities of\n the architecture.\n Accesses in a hit segment apply the hitProp access policy.\n Accesses in a miss segment apply the missProp access policy."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaAccessPolicyWindow {
    #[doc = "< Starting address of the access policy window. CUDA driver may align it."]
    pub base_ptr: *mut ::core::ffi::c_void,
    #[doc = "< Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment."]
    pub num_bytes: usize,
    #[doc = "< hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp."]
    pub hitRatio: f32,
    #[doc = "< ::CUaccessProperty set for hit."]
    pub hitProp: cudaAccessProperty,
    #[doc = "< ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING."]
    pub missProp: cudaAccessProperty,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaAccessPolicyWindow"][::core::mem::size_of::<cudaAccessPolicyWindow>() - 32usize];
    ["Alignment of cudaAccessPolicyWindow"]
        [::core::mem::align_of::<cudaAccessPolicyWindow>() - 8usize];
    ["Offset of field: cudaAccessPolicyWindow::base_ptr"]
        [::core::mem::offset_of!(cudaAccessPolicyWindow, base_ptr) - 0usize];
    ["Offset of field: cudaAccessPolicyWindow::num_bytes"]
        [::core::mem::offset_of!(cudaAccessPolicyWindow, num_bytes) - 8usize];
    ["Offset of field: cudaAccessPolicyWindow::hitRatio"]
        [::core::mem::offset_of!(cudaAccessPolicyWindow, hitRatio) - 16usize];
    ["Offset of field: cudaAccessPolicyWindow::hitProp"]
        [::core::mem::offset_of!(cudaAccessPolicyWindow, hitProp) - 20usize];
    ["Offset of field: cudaAccessPolicyWindow::missProp"]
        [::core::mem::offset_of!(cudaAccessPolicyWindow, missProp) - 24usize];
};
#[doc = " CUDA host function\n \\param userData Argument value passed to the function"]
pub type cudaHostFn_t =
    ::core::option::Option<unsafe extern "C" fn(userData: *mut ::core::ffi::c_void)>;
#[doc = " CUDA host node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaHostNodeParams {
    #[doc = "< The function to call when the node executes"]
    pub fn_: cudaHostFn_t,
    #[doc = "< Argument to pass to the function"]
    pub userData: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaHostNodeParams"][::core::mem::size_of::<cudaHostNodeParams>() - 16usize];
    ["Alignment of cudaHostNodeParams"][::core::mem::align_of::<cudaHostNodeParams>() - 8usize];
    ["Offset of field: cudaHostNodeParams::fn_"]
        [::core::mem::offset_of!(cudaHostNodeParams, fn_) - 0usize];
    ["Offset of field: cudaHostNodeParams::userData"]
        [::core::mem::offset_of!(cudaHostNodeParams, userData) - 8usize];
};
#[doc = " CUDA host node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaHostNodeParamsV2 {
    #[doc = "< The function to call when the node executes"]
    pub fn_: cudaHostFn_t,
    #[doc = "< Argument to pass to the function"]
    pub userData: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaHostNodeParamsV2"][::core::mem::size_of::<cudaHostNodeParamsV2>() - 16usize];
    ["Alignment of cudaHostNodeParamsV2"][::core::mem::align_of::<cudaHostNodeParamsV2>() - 8usize];
    ["Offset of field: cudaHostNodeParamsV2::fn_"]
        [::core::mem::offset_of!(cudaHostNodeParamsV2, fn_) - 0usize];
    ["Offset of field: cudaHostNodeParamsV2::userData"]
        [::core::mem::offset_of!(cudaHostNodeParamsV2, userData) - 8usize];
};
#[repr(u32)]
#[doc = " Possible stream capture statuses returned by ::cudaStreamIsCapturing"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaStreamCaptureStatus {
    #[doc = "< Stream is not capturing"]
    cudaStreamCaptureStatusNone = 0,
    #[doc = "< Stream is actively capturing"]
    cudaStreamCaptureStatusActive = 1,
    #[doc = "< Stream is part of a capture sequence that\nhas been invalidated, but not terminated"]
    cudaStreamCaptureStatusInvalidated = 2,
}
#[repr(u32)]
#[doc = " Possible modes for stream capture thread interactions. For more details see\n ::cudaStreamBeginCapture and ::cudaThreadExchangeStreamCaptureMode"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaStreamCaptureMode {
    cudaStreamCaptureModeGlobal = 0,
    cudaStreamCaptureModeThreadLocal = 1,
    cudaStreamCaptureModeRelaxed = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaSynchronizationPolicy {
    cudaSyncPolicyAuto = 1,
    cudaSyncPolicySpin = 2,
    cudaSyncPolicyYield = 3,
    cudaSyncPolicyBlockingSync = 4,
}
#[repr(u32)]
#[doc = " Cluster scheduling policies. These may be passed to ::cudaFuncSetAttribute"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaClusterSchedulingPolicy {
    #[doc = "< the default policy"]
    cudaClusterSchedulingPolicyDefault = 0,
    #[doc = "< spread the blocks within a cluster to the SMs"]
    cudaClusterSchedulingPolicySpread = 1,
    #[doc = "< allow the hardware to load-balance the blocks in a cluster to the SMs"]
    cudaClusterSchedulingPolicyLoadBalancing = 2,
}
#[repr(u32)]
#[doc = " Flags for ::cudaStreamUpdateCaptureDependencies"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaStreamUpdateCaptureDependenciesFlags {
    #[doc = "< Add new nodes to the dependency set"]
    cudaStreamAddCaptureDependencies = 0,
    #[doc = "< Replace the dependency set with the new nodes"]
    cudaStreamSetCaptureDependencies = 1,
}
#[repr(u32)]
#[doc = " Flags for user objects for graphs"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaUserObjectFlags {
    #[doc = "< Indicates the destructor execution is not synchronized by any CUDA handle."]
    cudaUserObjectNoDestructorSync = 1,
}
#[repr(u32)]
#[doc = " Flags for retaining user object references for graphs"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaUserObjectRetainFlags {
    #[doc = "< Transfer references from the caller rather than creating new references."]
    cudaGraphUserObjectMove = 1,
}
#[doc = " CUDA graphics interop resource"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaGraphicsResource {
    _unused: [u8; 0],
}
#[repr(u32)]
#[doc = " CUDA graphics interop register flags"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphicsRegisterFlags {
    #[doc = "< Default"]
    cudaGraphicsRegisterFlagsNone = 0,
    #[doc = "< CUDA will not write to this resource"]
    cudaGraphicsRegisterFlagsReadOnly = 1,
    #[doc = "< CUDA will only write to and will not read from this resource"]
    cudaGraphicsRegisterFlagsWriteDiscard = 2,
    #[doc = "< CUDA will bind this resource to a surface reference"]
    cudaGraphicsRegisterFlagsSurfaceLoadStore = 4,
    #[doc = "< CUDA will perform texture gather operations on this resource"]
    cudaGraphicsRegisterFlagsTextureGather = 8,
}
#[repr(u32)]
#[doc = " CUDA graphics interop map flags"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphicsMapFlags {
    #[doc = "< Default; Assume resource can be read/written"]
    cudaGraphicsMapFlagsNone = 0,
    #[doc = "< CUDA will not write to this resource"]
    cudaGraphicsMapFlagsReadOnly = 1,
    #[doc = "< CUDA will only write to and will not read from this resource"]
    cudaGraphicsMapFlagsWriteDiscard = 2,
}
#[repr(u32)]
#[doc = " CUDA graphics interop array indices for cube maps"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphicsCubeFace {
    #[doc = "< Positive X face of cubemap"]
    cudaGraphicsCubeFacePositiveX = 0,
    #[doc = "< Negative X face of cubemap"]
    cudaGraphicsCubeFaceNegativeX = 1,
    #[doc = "< Positive Y face of cubemap"]
    cudaGraphicsCubeFacePositiveY = 2,
    #[doc = "< Negative Y face of cubemap"]
    cudaGraphicsCubeFaceNegativeY = 3,
    #[doc = "< Positive Z face of cubemap"]
    cudaGraphicsCubeFacePositiveZ = 4,
    #[doc = "< Negative Z face of cubemap"]
    cudaGraphicsCubeFaceNegativeZ = 5,
}
#[repr(u32)]
#[doc = " CUDA resource types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaResourceType {
    #[doc = "< Array resource"]
    cudaResourceTypeArray = 0,
    #[doc = "< Mipmapped array resource"]
    cudaResourceTypeMipmappedArray = 1,
    #[doc = "< Linear resource"]
    cudaResourceTypeLinear = 2,
    #[doc = "< Pitch 2D resource"]
    cudaResourceTypePitch2D = 3,
}
#[repr(u32)]
#[doc = " CUDA texture resource view formats"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaResourceViewFormat {
    #[doc = "< No resource view format (use underlying resource format)"]
    cudaResViewFormatNone = 0,
    #[doc = "< 1 channel unsigned 8-bit integers"]
    cudaResViewFormatUnsignedChar1 = 1,
    #[doc = "< 2 channel unsigned 8-bit integers"]
    cudaResViewFormatUnsignedChar2 = 2,
    #[doc = "< 4 channel unsigned 8-bit integers"]
    cudaResViewFormatUnsignedChar4 = 3,
    #[doc = "< 1 channel signed 8-bit integers"]
    cudaResViewFormatSignedChar1 = 4,
    #[doc = "< 2 channel signed 8-bit integers"]
    cudaResViewFormatSignedChar2 = 5,
    #[doc = "< 4 channel signed 8-bit integers"]
    cudaResViewFormatSignedChar4 = 6,
    #[doc = "< 1 channel unsigned 16-bit integers"]
    cudaResViewFormatUnsignedShort1 = 7,
    #[doc = "< 2 channel unsigned 16-bit integers"]
    cudaResViewFormatUnsignedShort2 = 8,
    #[doc = "< 4 channel unsigned 16-bit integers"]
    cudaResViewFormatUnsignedShort4 = 9,
    #[doc = "< 1 channel signed 16-bit integers"]
    cudaResViewFormatSignedShort1 = 10,
    #[doc = "< 2 channel signed 16-bit integers"]
    cudaResViewFormatSignedShort2 = 11,
    #[doc = "< 4 channel signed 16-bit integers"]
    cudaResViewFormatSignedShort4 = 12,
    #[doc = "< 1 channel unsigned 32-bit integers"]
    cudaResViewFormatUnsignedInt1 = 13,
    #[doc = "< 2 channel unsigned 32-bit integers"]
    cudaResViewFormatUnsignedInt2 = 14,
    #[doc = "< 4 channel unsigned 32-bit integers"]
    cudaResViewFormatUnsignedInt4 = 15,
    #[doc = "< 1 channel signed 32-bit integers"]
    cudaResViewFormatSignedInt1 = 16,
    #[doc = "< 2 channel signed 32-bit integers"]
    cudaResViewFormatSignedInt2 = 17,
    #[doc = "< 4 channel signed 32-bit integers"]
    cudaResViewFormatSignedInt4 = 18,
    #[doc = "< 1 channel 16-bit floating point"]
    cudaResViewFormatHalf1 = 19,
    #[doc = "< 2 channel 16-bit floating point"]
    cudaResViewFormatHalf2 = 20,
    #[doc = "< 4 channel 16-bit floating point"]
    cudaResViewFormatHalf4 = 21,
    #[doc = "< 1 channel 32-bit floating point"]
    cudaResViewFormatFloat1 = 22,
    #[doc = "< 2 channel 32-bit floating point"]
    cudaResViewFormatFloat2 = 23,
    #[doc = "< 4 channel 32-bit floating point"]
    cudaResViewFormatFloat4 = 24,
    #[doc = "< Block compressed 1"]
    cudaResViewFormatUnsignedBlockCompressed1 = 25,
    #[doc = "< Block compressed 2"]
    cudaResViewFormatUnsignedBlockCompressed2 = 26,
    #[doc = "< Block compressed 3"]
    cudaResViewFormatUnsignedBlockCompressed3 = 27,
    #[doc = "< Block compressed 4 unsigned"]
    cudaResViewFormatUnsignedBlockCompressed4 = 28,
    #[doc = "< Block compressed 4 signed"]
    cudaResViewFormatSignedBlockCompressed4 = 29,
    #[doc = "< Block compressed 5 unsigned"]
    cudaResViewFormatUnsignedBlockCompressed5 = 30,
    #[doc = "< Block compressed 5 signed"]
    cudaResViewFormatSignedBlockCompressed5 = 31,
    #[doc = "< Block compressed 6 unsigned half-float"]
    cudaResViewFormatUnsignedBlockCompressed6H = 32,
    #[doc = "< Block compressed 6 signed half-float"]
    cudaResViewFormatSignedBlockCompressed6H = 33,
    #[doc = "< Block compressed 7"]
    cudaResViewFormatUnsignedBlockCompressed7 = 34,
}
#[doc = " CUDA resource descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaResourceDesc {
    #[doc = "< Resource type"]
    pub resType: cudaResourceType,
    pub res: cudaResourceDesc__bindgen_ty_1,
    #[doc = "< Flags (must be zero)"]
    pub flags: ::core::ffi::c_uint,
}
#[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,
    pub reserved: cudaResourceDesc__bindgen_ty_1__bindgen_ty_5,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< CUDA array"]
    pub array: cudaArray_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_1::array"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1, array) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 {
    #[doc = "< CUDA mipmapped array"]
    pub mipmap: cudaMipmappedArray_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_2"]
        [::core::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_2>() - 8usize];
    ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_2"]
        [::core::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_2>() - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_2::mipmap"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2, mipmap) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 {
    #[doc = "< Device pointer"]
    pub devPtr: *mut ::core::ffi::c_void,
    #[doc = "< Channel descriptor"]
    pub desc: cudaChannelFormatDesc,
    #[doc = "< Size in bytes"]
    pub sizeInBytes: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_3"]
        [::core::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_3>() - 40usize];
    ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_3"]
        [::core::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_3>() - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3::devPtr"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, devPtr) - 0usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3::desc"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, desc) - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3::sizeInBytes"][::core::mem::offset_of!(
        cudaResourceDesc__bindgen_ty_1__bindgen_ty_3,
        sizeInBytes
    ) - 32usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 {
    #[doc = "< Device pointer"]
    pub devPtr: *mut ::core::ffi::c_void,
    #[doc = "< Channel descriptor"]
    pub desc: cudaChannelFormatDesc,
    #[doc = "< Width of the array in elements"]
    pub width: usize,
    #[doc = "< Height of the array in elements"]
    pub height: usize,
    #[doc = "< Pitch between two rows in bytes"]
    pub pitchInBytes: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_4"]
        [::core::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_4>() - 56usize];
    ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_4"]
        [::core::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_4>() - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::devPtr"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, devPtr) - 0usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::desc"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, desc) - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::width"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, width) - 32usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::height"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, height) - 40usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::pitchInBytes"][::core::mem::offset_of!(
        cudaResourceDesc__bindgen_ty_1__bindgen_ty_4,
        pitchInBytes
    ) - 48usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_5 {
    pub reserved: [::core::ffi::c_int; 32usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_5"]
        [::core::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_5>() - 128usize];
    ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_5"]
        [::core::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_5>() - 4usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_5::reserved"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_5, reserved) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc__bindgen_ty_1"]
        [::core::mem::size_of::<cudaResourceDesc__bindgen_ty_1>() - 128usize];
    ["Alignment of cudaResourceDesc__bindgen_ty_1"]
        [::core::mem::align_of::<cudaResourceDesc__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1::array"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, array) - 0usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1::mipmap"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, mipmap) - 0usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1::linear"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, linear) - 0usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1::pitch2D"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, pitch2D) - 0usize];
    ["Offset of field: cudaResourceDesc__bindgen_ty_1::reserved"]
        [::core::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, reserved) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceDesc"][::core::mem::size_of::<cudaResourceDesc>() - 144usize];
    ["Alignment of cudaResourceDesc"][::core::mem::align_of::<cudaResourceDesc>() - 8usize];
    ["Offset of field: cudaResourceDesc::resType"]
        [::core::mem::offset_of!(cudaResourceDesc, resType) - 0usize];
    ["Offset of field: cudaResourceDesc::res"]
        [::core::mem::offset_of!(cudaResourceDesc, res) - 8usize];
    ["Offset of field: cudaResourceDesc::flags"]
        [::core::mem::offset_of!(cudaResourceDesc, flags) - 136usize];
};
#[doc = " CUDA resource view descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaResourceViewDesc {
    #[doc = "< Resource view format"]
    pub format: cudaResourceViewFormat,
    #[doc = "< Width of the resource view"]
    pub width: usize,
    #[doc = "< Height of the resource view"]
    pub height: usize,
    #[doc = "< Depth of the resource view"]
    pub depth: usize,
    #[doc = "< First defined mipmap level"]
    pub firstMipmapLevel: ::core::ffi::c_uint,
    #[doc = "< Last defined mipmap level"]
    pub lastMipmapLevel: ::core::ffi::c_uint,
    #[doc = "< First layer index"]
    pub firstLayer: ::core::ffi::c_uint,
    #[doc = "< Last layer index"]
    pub lastLayer: ::core::ffi::c_uint,
    #[doc = "< Must be zero"]
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaResourceViewDesc"][::core::mem::size_of::<cudaResourceViewDesc>() - 112usize];
    ["Alignment of cudaResourceViewDesc"][::core::mem::align_of::<cudaResourceViewDesc>() - 8usize];
    ["Offset of field: cudaResourceViewDesc::format"]
        [::core::mem::offset_of!(cudaResourceViewDesc, format) - 0usize];
    ["Offset of field: cudaResourceViewDesc::width"]
        [::core::mem::offset_of!(cudaResourceViewDesc, width) - 8usize];
    ["Offset of field: cudaResourceViewDesc::height"]
        [::core::mem::offset_of!(cudaResourceViewDesc, height) - 16usize];
    ["Offset of field: cudaResourceViewDesc::depth"]
        [::core::mem::offset_of!(cudaResourceViewDesc, depth) - 24usize];
    ["Offset of field: cudaResourceViewDesc::firstMipmapLevel"]
        [::core::mem::offset_of!(cudaResourceViewDesc, firstMipmapLevel) - 32usize];
    ["Offset of field: cudaResourceViewDesc::lastMipmapLevel"]
        [::core::mem::offset_of!(cudaResourceViewDesc, lastMipmapLevel) - 36usize];
    ["Offset of field: cudaResourceViewDesc::firstLayer"]
        [::core::mem::offset_of!(cudaResourceViewDesc, firstLayer) - 40usize];
    ["Offset of field: cudaResourceViewDesc::lastLayer"]
        [::core::mem::offset_of!(cudaResourceViewDesc, lastLayer) - 44usize];
    ["Offset of field: cudaResourceViewDesc::reserved"]
        [::core::mem::offset_of!(cudaResourceViewDesc, reserved) - 48usize];
};
#[doc = " CUDA pointer attributes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaPointerAttributes {
    #[doc = " The type of memory - ::cudaMemoryTypeUnregistered, ::cudaMemoryTypeHost,\n ::cudaMemoryTypeDevice or ::cudaMemoryTypeManaged."]
    pub type_: cudaMemoryType,
    #[doc = " The device against which the memory was allocated or registered.\n If the memory type is ::cudaMemoryTypeDevice then this identifies\n the device on which the memory referred physically resides.  If\n the memory type is ::cudaMemoryTypeHost or::cudaMemoryTypeManaged then\n this identifies the device which was current when the memory was allocated\n or registered (and if that device is deinitialized then this allocation\n will vanish with that device's state)."]
    pub device: ::core::ffi::c_int,
    #[doc = " The address which may be dereferenced on the current device to access\n the memory or NULL if no such address exists."]
    pub devicePointer: *mut ::core::ffi::c_void,
    #[doc = " The address which may be dereferenced on the host to access the\n memory or NULL if no such address exists.\n\n \\note CUDA doesn't check if unregistered memory is allocated so this field\n may contain invalid pointer if an invalid pointer has been passed to CUDA."]
    pub hostPointer: *mut ::core::ffi::c_void,
    #[doc = " Must be zero"]
    pub reserved: [::core::ffi::c_long; 8usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaPointerAttributes"][::core::mem::size_of::<cudaPointerAttributes>() - 88usize];
    ["Alignment of cudaPointerAttributes"]
        [::core::mem::align_of::<cudaPointerAttributes>() - 8usize];
    ["Offset of field: cudaPointerAttributes::type_"]
        [::core::mem::offset_of!(cudaPointerAttributes, type_) - 0usize];
    ["Offset of field: cudaPointerAttributes::device"]
        [::core::mem::offset_of!(cudaPointerAttributes, device) - 4usize];
    ["Offset of field: cudaPointerAttributes::devicePointer"]
        [::core::mem::offset_of!(cudaPointerAttributes, devicePointer) - 8usize];
    ["Offset of field: cudaPointerAttributes::hostPointer"]
        [::core::mem::offset_of!(cudaPointerAttributes, hostPointer) - 16usize];
    ["Offset of field: cudaPointerAttributes::reserved"]
        [::core::mem::offset_of!(cudaPointerAttributes, reserved) - 24usize];
};
#[doc = " CUDA function attributes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaFuncAttributes {
    #[doc = " The size in bytes of statically-allocated shared memory per block\n required by this function. This does not include dynamically-allocated\n shared memory requested by the user at runtime."]
    pub sharedSizeBytes: usize,
    #[doc = " The size in bytes of user-allocated constant memory required by this\n function."]
    pub constSizeBytes: usize,
    #[doc = " The size in bytes of local memory used by each thread of this function."]
    pub localSizeBytes: usize,
    #[doc = " The maximum number of threads per block, beyond which a launch of the\n function would fail. This number depends on both the function and the\n device on which the function is currently loaded."]
    pub maxThreadsPerBlock: ::core::ffi::c_int,
    #[doc = " The number of registers used by each thread of this function."]
    pub numRegs: ::core::ffi::c_int,
    #[doc = " The PTX virtual architecture version for which the function was\n compiled. This value is the major PTX version * 10 + the minor PTX\n version, so a PTX version 1.3 function would return the value 13."]
    pub ptxVersion: ::core::ffi::c_int,
    #[doc = " The binary architecture version for which the function was compiled.\n This value is the major binary version * 10 + the minor binary version,\n so a binary version 1.3 function would return the value 13."]
    pub binaryVersion: ::core::ffi::c_int,
    #[doc = " The attribute to indicate whether the function has been compiled with\n user specified option \"-Xptxas --dlcm=ca\" set."]
    pub cacheModeCA: ::core::ffi::c_int,
    #[doc = " The maximum size in bytes of dynamic shared memory per block for\n this function. Any launch must have a dynamic shared memory size\n smaller than this value."]
    pub maxDynamicSharedSizeBytes: ::core::ffi::c_int,
    #[doc = " On devices where the L1 cache and shared memory use the same hardware resources,\n this sets the shared memory carveout preference, in percent of the maximum shared memory.\n Refer to ::cudaDevAttrMaxSharedMemoryPerMultiprocessor.\n This is only a hint, and the driver can choose a different ratio if required to execute the function.\n See ::cudaFuncSetAttribute"]
    pub preferredShmemCarveout: ::core::ffi::c_int,
    #[doc = " If this attribute is set, the kernel must launch with a valid cluster dimension\n specified."]
    pub clusterDimMustBeSet: ::core::ffi::c_int,
    #[doc = " The required cluster width/height/depth in blocks. The values must either\n all be 0 or all be positive. The validity of the cluster dimensions is\n otherwise checked at launch time.\n\n If the value is set during compile time, it cannot be set at runtime.\n Setting it at runtime should return cudaErrorNotPermitted.\n See ::cudaFuncSetAttribute"]
    pub requiredClusterWidth: ::core::ffi::c_int,
    pub requiredClusterHeight: ::core::ffi::c_int,
    pub requiredClusterDepth: ::core::ffi::c_int,
    #[doc = " The block scheduling policy of a function.\n See ::cudaFuncSetAttribute"]
    pub clusterSchedulingPolicyPreference: ::core::ffi::c_int,
    #[doc = " Whether the function can be launched with non-portable cluster size. 1 is\n allowed, 0 is disallowed. A non-portable cluster size may only function\n on the specific SKUs the program is tested on. The launch might fail if\n the program is run on a different hardware platform.\n\n CUDA API provides ::cudaOccupancyMaxActiveClusters to assist with checking\n whether the desired size can be launched on the current device.\n\n Portable Cluster Size\n\n A portable cluster size is guaranteed to be functional on all compute\n capabilities higher than the target compute capability. The portable\n cluster size for sm_90 is 8 blocks per cluster. This value may increase\n for future compute capabilities.\n\n The specific hardware unit may support higher cluster sizes that’s not\n guaranteed to be portable.\n See ::cudaFuncSetAttribute"]
    pub nonPortableClusterSizeAllowed: ::core::ffi::c_int,
    #[doc = " Reserved for future use."]
    pub reserved: [::core::ffi::c_int; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaFuncAttributes"][::core::mem::size_of::<cudaFuncAttributes>() - 144usize];
    ["Alignment of cudaFuncAttributes"][::core::mem::align_of::<cudaFuncAttributes>() - 8usize];
    ["Offset of field: cudaFuncAttributes::sharedSizeBytes"]
        [::core::mem::offset_of!(cudaFuncAttributes, sharedSizeBytes) - 0usize];
    ["Offset of field: cudaFuncAttributes::constSizeBytes"]
        [::core::mem::offset_of!(cudaFuncAttributes, constSizeBytes) - 8usize];
    ["Offset of field: cudaFuncAttributes::localSizeBytes"]
        [::core::mem::offset_of!(cudaFuncAttributes, localSizeBytes) - 16usize];
    ["Offset of field: cudaFuncAttributes::maxThreadsPerBlock"]
        [::core::mem::offset_of!(cudaFuncAttributes, maxThreadsPerBlock) - 24usize];
    ["Offset of field: cudaFuncAttributes::numRegs"]
        [::core::mem::offset_of!(cudaFuncAttributes, numRegs) - 28usize];
    ["Offset of field: cudaFuncAttributes::ptxVersion"]
        [::core::mem::offset_of!(cudaFuncAttributes, ptxVersion) - 32usize];
    ["Offset of field: cudaFuncAttributes::binaryVersion"]
        [::core::mem::offset_of!(cudaFuncAttributes, binaryVersion) - 36usize];
    ["Offset of field: cudaFuncAttributes::cacheModeCA"]
        [::core::mem::offset_of!(cudaFuncAttributes, cacheModeCA) - 40usize];
    ["Offset of field: cudaFuncAttributes::maxDynamicSharedSizeBytes"]
        [::core::mem::offset_of!(cudaFuncAttributes, maxDynamicSharedSizeBytes) - 44usize];
    ["Offset of field: cudaFuncAttributes::preferredShmemCarveout"]
        [::core::mem::offset_of!(cudaFuncAttributes, preferredShmemCarveout) - 48usize];
    ["Offset of field: cudaFuncAttributes::clusterDimMustBeSet"]
        [::core::mem::offset_of!(cudaFuncAttributes, clusterDimMustBeSet) - 52usize];
    ["Offset of field: cudaFuncAttributes::requiredClusterWidth"]
        [::core::mem::offset_of!(cudaFuncAttributes, requiredClusterWidth) - 56usize];
    ["Offset of field: cudaFuncAttributes::requiredClusterHeight"]
        [::core::mem::offset_of!(cudaFuncAttributes, requiredClusterHeight) - 60usize];
    ["Offset of field: cudaFuncAttributes::requiredClusterDepth"]
        [::core::mem::offset_of!(cudaFuncAttributes, requiredClusterDepth) - 64usize];
    ["Offset of field: cudaFuncAttributes::clusterSchedulingPolicyPreference"]
        [::core::mem::offset_of!(cudaFuncAttributes, clusterSchedulingPolicyPreference) - 68usize];
    ["Offset of field: cudaFuncAttributes::nonPortableClusterSizeAllowed"]
        [::core::mem::offset_of!(cudaFuncAttributes, nonPortableClusterSizeAllowed) - 72usize];
    ["Offset of field: cudaFuncAttributes::reserved"]
        [::core::mem::offset_of!(cudaFuncAttributes, reserved) - 76usize];
};
#[repr(u32)]
#[doc = " CUDA function attributes that can be set using ::cudaFuncSetAttribute"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaFuncAttribute {
    #[doc = "< Maximum dynamic shared memory size"]
    cudaFuncAttributeMaxDynamicSharedMemorySize = 8,
    #[doc = "< Preferred shared memory-L1 cache split"]
    cudaFuncAttributePreferredSharedMemoryCarveout = 9,
    #[doc = "< Indicator to enforce valid cluster dimension specification on kernel launch"]
    cudaFuncAttributeClusterDimMustBeSet = 10,
    #[doc = "< Required cluster width"]
    cudaFuncAttributeRequiredClusterWidth = 11,
    #[doc = "< Required cluster height"]
    cudaFuncAttributeRequiredClusterHeight = 12,
    #[doc = "< Required cluster depth"]
    cudaFuncAttributeRequiredClusterDepth = 13,
    #[doc = "< Whether non-portable cluster scheduling policy is supported"]
    cudaFuncAttributeNonPortableClusterSizeAllowed = 14,
    #[doc = "< Required cluster scheduling policy preference"]
    cudaFuncAttributeClusterSchedulingPolicyPreference = 15,
    cudaFuncAttributeMax = 16,
}
#[repr(u32)]
#[doc = " CUDA function cache configurations"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaFuncCache {
    #[doc = "< Default function cache configuration, no preference"]
    cudaFuncCachePreferNone = 0,
    #[doc = "< Prefer larger shared memory and smaller L1 cache"]
    cudaFuncCachePreferShared = 1,
    #[doc = "< Prefer larger L1 cache and smaller shared memory"]
    cudaFuncCachePreferL1 = 2,
    #[doc = "< Prefer equal size L1 cache and shared memory"]
    cudaFuncCachePreferEqual = 3,
}
#[repr(u32)]
#[doc = " CUDA shared memory configuration\n \\deprecated"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaSharedMemConfig {
    cudaSharedMemBankSizeDefault = 0,
    cudaSharedMemBankSizeFourByte = 1,
    cudaSharedMemBankSizeEightByte = 2,
}
#[repr(i32)]
#[doc = " Shared memory carveout configurations. These may be passed to cudaFuncSetAttribute"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaSharedCarveout {
    #[doc = "< No preference for shared memory or L1 (default)"]
    cudaSharedmemCarveoutDefault = -1,
    #[doc = "< Prefer maximum available shared memory, minimum L1 cache"]
    cudaSharedmemCarveoutMaxShared = 100,
    #[doc = "< Prefer maximum available L1 cache, minimum shared memory"]
    cudaSharedmemCarveoutMaxL1 = 0,
}
#[repr(u32)]
#[doc = " CUDA device compute modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaComputeMode {
    #[doc = "< Default compute mode (Multiple threads can use ::cudaSetDevice() with this device)"]
    cudaComputeModeDefault = 0,
    #[doc = "< Compute-exclusive-thread mode (Only one thread in one process will be able to use ::cudaSetDevice() with this device)"]
    cudaComputeModeExclusive = 1,
    #[doc = "< Compute-prohibited mode (No threads can use ::cudaSetDevice() with this device)"]
    cudaComputeModeProhibited = 2,
    #[doc = "< Compute-exclusive-process mode (Many threads in one process will be able to use ::cudaSetDevice() with this device)"]
    cudaComputeModeExclusiveProcess = 3,
}
#[repr(u32)]
#[doc = " CUDA Limits"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaLimit {
    #[doc = "< GPU thread stack size"]
    cudaLimitStackSize = 0,
    #[doc = "< GPU printf FIFO size"]
    cudaLimitPrintfFifoSize = 1,
    #[doc = "< GPU malloc heap size"]
    cudaLimitMallocHeapSize = 2,
    #[doc = "< GPU device runtime synchronize depth"]
    cudaLimitDevRuntimeSyncDepth = 3,
    #[doc = "< GPU device runtime pending launch count"]
    cudaLimitDevRuntimePendingLaunchCount = 4,
    #[doc = "< A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint"]
    cudaLimitMaxL2FetchGranularity = 5,
    #[doc = "< A size in bytes for L2 persisting lines cache size"]
    cudaLimitPersistingL2CacheSize = 6,
}
#[repr(u32)]
#[doc = " CUDA Memory Advise values"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemoryAdvise {
    #[doc = "< Data will mostly be read and only occassionally be written to"]
    cudaMemAdviseSetReadMostly = 1,
    #[doc = "< Undo the effect of ::cudaMemAdviseSetReadMostly"]
    cudaMemAdviseUnsetReadMostly = 2,
    #[doc = "< Set the preferred location for the data as the specified device"]
    cudaMemAdviseSetPreferredLocation = 3,
    #[doc = "< Clear the preferred location for the data"]
    cudaMemAdviseUnsetPreferredLocation = 4,
    #[doc = "< Data will be accessed by the specified device, so prevent page faults as much as possible"]
    cudaMemAdviseSetAccessedBy = 5,
    #[doc = "< Let the Unified Memory subsystem decide on the page faulting policy for the specified device"]
    cudaMemAdviseUnsetAccessedBy = 6,
}
#[repr(u32)]
#[doc = " CUDA range attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemRangeAttribute {
    #[doc = "< Whether the range will mostly be read and only occassionally be written to"]
    cudaMemRangeAttributeReadMostly = 1,
    #[doc = "< The preferred location of the range"]
    cudaMemRangeAttributePreferredLocation = 2,
    #[doc = "< Memory range has ::cudaMemAdviseSetAccessedBy set for specified device"]
    cudaMemRangeAttributeAccessedBy = 3,
    #[doc = "< The last location to which the range was prefetched"]
    cudaMemRangeAttributeLastPrefetchLocation = 4,
    #[doc = "< The preferred location type of the range"]
    cudaMemRangeAttributePreferredLocationType = 5,
    #[doc = "< The preferred location id of the range"]
    cudaMemRangeAttributePreferredLocationId = 6,
    #[doc = "< The last location type to which the range was prefetched"]
    cudaMemRangeAttributeLastPrefetchLocationType = 7,
    #[doc = "< The last location id to which the range was prefetched"]
    cudaMemRangeAttributeLastPrefetchLocationId = 8,
}
#[repr(u32)]
#[doc = " CUDA GPUDirect RDMA flush writes APIs supported on the device"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaFlushGPUDirectRDMAWritesOptions {
    #[doc = "< ::cudaDeviceFlushGPUDirectRDMAWrites() and its CUDA Driver API counterpart are supported on the device."]
    cudaFlushGPUDirectRDMAWritesOptionHost = 1,
    #[doc = "< The ::CU_STREAM_WAIT_VALUE_FLUSH flag and the ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the CUDA device."]
    cudaFlushGPUDirectRDMAWritesOptionMemOps = 2,
}
#[repr(u32)]
#[doc = " CUDA GPUDirect RDMA flush writes ordering features of the device"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGPUDirectRDMAWritesOrdering {
    #[doc = "< The device does not natively support ordering of GPUDirect RDMA writes. ::cudaFlushGPUDirectRDMAWrites() can be leveraged if supported."]
    cudaGPUDirectRDMAWritesOrderingNone = 0,
    #[doc = "< Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not."]
    cudaGPUDirectRDMAWritesOrderingOwner = 100,
    #[doc = "< Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device."]
    cudaGPUDirectRDMAWritesOrderingAllDevices = 200,
}
#[repr(u32)]
#[doc = " CUDA GPUDirect RDMA flush writes scopes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaFlushGPUDirectRDMAWritesScope {
    #[doc = "< Blocks until remote writes are visible to the CUDA device context owning the data."]
    cudaFlushGPUDirectRDMAWritesToOwner = 100,
    #[doc = "< Blocks until remote writes are visible to all CUDA device contexts."]
    cudaFlushGPUDirectRDMAWritesToAllDevices = 200,
}
#[repr(u32)]
#[doc = " CUDA GPUDirect RDMA flush writes targets"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaFlushGPUDirectRDMAWritesTarget {
    #[doc = "< Sets the target for ::cudaDeviceFlushGPUDirectRDMAWrites() to the currently active CUDA device context."]
    cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0,
}
#[repr(u32)]
#[doc = " CUDA device attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaDeviceAttr {
    #[doc = "< Maximum number of threads per block"]
    cudaDevAttrMaxThreadsPerBlock = 1,
    #[doc = "< Maximum block dimension X"]
    cudaDevAttrMaxBlockDimX = 2,
    #[doc = "< Maximum block dimension Y"]
    cudaDevAttrMaxBlockDimY = 3,
    #[doc = "< Maximum block dimension Z"]
    cudaDevAttrMaxBlockDimZ = 4,
    #[doc = "< Maximum grid dimension X"]
    cudaDevAttrMaxGridDimX = 5,
    #[doc = "< Maximum grid dimension Y"]
    cudaDevAttrMaxGridDimY = 6,
    #[doc = "< Maximum grid dimension Z"]
    cudaDevAttrMaxGridDimZ = 7,
    #[doc = "< Maximum shared memory available per block in bytes"]
    cudaDevAttrMaxSharedMemoryPerBlock = 8,
    #[doc = "< Memory available on device for __constant__ variables in a CUDA C kernel in bytes"]
    cudaDevAttrTotalConstantMemory = 9,
    #[doc = "< Warp size in threads"]
    cudaDevAttrWarpSize = 10,
    #[doc = "< Maximum pitch in bytes allowed by memory copies"]
    cudaDevAttrMaxPitch = 11,
    #[doc = "< Maximum number of 32-bit registers available per block"]
    cudaDevAttrMaxRegistersPerBlock = 12,
    #[doc = "< Peak clock frequency in kilohertz"]
    cudaDevAttrClockRate = 13,
    #[doc = "< Alignment requirement for textures"]
    cudaDevAttrTextureAlignment = 14,
    #[doc = "< Device can possibly copy memory and execute a kernel concurrently"]
    cudaDevAttrGpuOverlap = 15,
    #[doc = "< Number of multiprocessors on device"]
    cudaDevAttrMultiProcessorCount = 16,
    #[doc = "< Specifies whether there is a run time limit on kernels"]
    cudaDevAttrKernelExecTimeout = 17,
    #[doc = "< Device is integrated with host memory"]
    cudaDevAttrIntegrated = 18,
    #[doc = "< Device can map host memory into CUDA address space"]
    cudaDevAttrCanMapHostMemory = 19,
    #[doc = "< Compute mode (See ::cudaComputeMode for details)"]
    cudaDevAttrComputeMode = 20,
    #[doc = "< Maximum 1D texture width"]
    cudaDevAttrMaxTexture1DWidth = 21,
    #[doc = "< Maximum 2D texture width"]
    cudaDevAttrMaxTexture2DWidth = 22,
    #[doc = "< Maximum 2D texture height"]
    cudaDevAttrMaxTexture2DHeight = 23,
    #[doc = "< Maximum 3D texture width"]
    cudaDevAttrMaxTexture3DWidth = 24,
    #[doc = "< Maximum 3D texture height"]
    cudaDevAttrMaxTexture3DHeight = 25,
    #[doc = "< Maximum 3D texture depth"]
    cudaDevAttrMaxTexture3DDepth = 26,
    #[doc = "< Maximum 2D layered texture width"]
    cudaDevAttrMaxTexture2DLayeredWidth = 27,
    #[doc = "< Maximum 2D layered texture height"]
    cudaDevAttrMaxTexture2DLayeredHeight = 28,
    #[doc = "< Maximum layers in a 2D layered texture"]
    cudaDevAttrMaxTexture2DLayeredLayers = 29,
    #[doc = "< Alignment requirement for surfaces"]
    cudaDevAttrSurfaceAlignment = 30,
    #[doc = "< Device can possibly execute multiple kernels concurrently"]
    cudaDevAttrConcurrentKernels = 31,
    #[doc = "< Device has ECC support enabled"]
    cudaDevAttrEccEnabled = 32,
    #[doc = "< PCI bus ID of the device"]
    cudaDevAttrPciBusId = 33,
    #[doc = "< PCI device ID of the device"]
    cudaDevAttrPciDeviceId = 34,
    #[doc = "< Device is using TCC driver model"]
    cudaDevAttrTccDriver = 35,
    #[doc = "< Peak memory clock frequency in kilohertz"]
    cudaDevAttrMemoryClockRate = 36,
    #[doc = "< Global memory bus width in bits"]
    cudaDevAttrGlobalMemoryBusWidth = 37,
    #[doc = "< Size of L2 cache in bytes"]
    cudaDevAttrL2CacheSize = 38,
    #[doc = "< Maximum resident threads per multiprocessor"]
    cudaDevAttrMaxThreadsPerMultiProcessor = 39,
    #[doc = "< Number of asynchronous engines"]
    cudaDevAttrAsyncEngineCount = 40,
    #[doc = "< Device shares a unified address space with the host"]
    cudaDevAttrUnifiedAddressing = 41,
    #[doc = "< Maximum 1D layered texture width"]
    cudaDevAttrMaxTexture1DLayeredWidth = 42,
    #[doc = "< Maximum layers in a 1D layered texture"]
    cudaDevAttrMaxTexture1DLayeredLayers = 43,
    #[doc = "< Maximum 2D texture width if cudaArrayTextureGather is set"]
    cudaDevAttrMaxTexture2DGatherWidth = 45,
    #[doc = "< Maximum 2D texture height if cudaArrayTextureGather is set"]
    cudaDevAttrMaxTexture2DGatherHeight = 46,
    #[doc = "< Alternate maximum 3D texture width"]
    cudaDevAttrMaxTexture3DWidthAlt = 47,
    #[doc = "< Alternate maximum 3D texture height"]
    cudaDevAttrMaxTexture3DHeightAlt = 48,
    #[doc = "< Alternate maximum 3D texture depth"]
    cudaDevAttrMaxTexture3DDepthAlt = 49,
    #[doc = "< PCI domain ID of the device"]
    cudaDevAttrPciDomainId = 50,
    #[doc = "< Pitch alignment requirement for textures"]
    cudaDevAttrTexturePitchAlignment = 51,
    #[doc = "< Maximum cubemap texture width/height"]
    cudaDevAttrMaxTextureCubemapWidth = 52,
    #[doc = "< Maximum cubemap layered texture width/height"]
    cudaDevAttrMaxTextureCubemapLayeredWidth = 53,
    #[doc = "< Maximum layers in a cubemap layered texture"]
    cudaDevAttrMaxTextureCubemapLayeredLayers = 54,
    #[doc = "< Maximum 1D surface width"]
    cudaDevAttrMaxSurface1DWidth = 55,
    #[doc = "< Maximum 2D surface width"]
    cudaDevAttrMaxSurface2DWidth = 56,
    #[doc = "< Maximum 2D surface height"]
    cudaDevAttrMaxSurface2DHeight = 57,
    #[doc = "< Maximum 3D surface width"]
    cudaDevAttrMaxSurface3DWidth = 58,
    #[doc = "< Maximum 3D surface height"]
    cudaDevAttrMaxSurface3DHeight = 59,
    #[doc = "< Maximum 3D surface depth"]
    cudaDevAttrMaxSurface3DDepth = 60,
    #[doc = "< Maximum 1D layered surface width"]
    cudaDevAttrMaxSurface1DLayeredWidth = 61,
    #[doc = "< Maximum layers in a 1D layered surface"]
    cudaDevAttrMaxSurface1DLayeredLayers = 62,
    #[doc = "< Maximum 2D layered surface width"]
    cudaDevAttrMaxSurface2DLayeredWidth = 63,
    #[doc = "< Maximum 2D layered surface height"]
    cudaDevAttrMaxSurface2DLayeredHeight = 64,
    #[doc = "< Maximum layers in a 2D layered surface"]
    cudaDevAttrMaxSurface2DLayeredLayers = 65,
    #[doc = "< Maximum cubemap surface width"]
    cudaDevAttrMaxSurfaceCubemapWidth = 66,
    #[doc = "< Maximum cubemap layered surface width"]
    cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67,
    #[doc = "< Maximum layers in a cubemap layered surface"]
    cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68,
    #[doc = "< Maximum 1D linear texture width"]
    cudaDevAttrMaxTexture1DLinearWidth = 69,
    #[doc = "< Maximum 2D linear texture width"]
    cudaDevAttrMaxTexture2DLinearWidth = 70,
    #[doc = "< Maximum 2D linear texture height"]
    cudaDevAttrMaxTexture2DLinearHeight = 71,
    #[doc = "< Maximum 2D linear texture pitch in bytes"]
    cudaDevAttrMaxTexture2DLinearPitch = 72,
    #[doc = "< Maximum mipmapped 2D texture width"]
    cudaDevAttrMaxTexture2DMipmappedWidth = 73,
    #[doc = "< Maximum mipmapped 2D texture height"]
    cudaDevAttrMaxTexture2DMipmappedHeight = 74,
    #[doc = "< Major compute capability version number"]
    cudaDevAttrComputeCapabilityMajor = 75,
    #[doc = "< Minor compute capability version number"]
    cudaDevAttrComputeCapabilityMinor = 76,
    #[doc = "< Maximum mipmapped 1D texture width"]
    cudaDevAttrMaxTexture1DMipmappedWidth = 77,
    #[doc = "< Device supports stream priorities"]
    cudaDevAttrStreamPrioritiesSupported = 78,
    #[doc = "< Device supports caching globals in L1"]
    cudaDevAttrGlobalL1CacheSupported = 79,
    #[doc = "< Device supports caching locals in L1"]
    cudaDevAttrLocalL1CacheSupported = 80,
    #[doc = "< Maximum shared memory available per multiprocessor in bytes"]
    cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81,
    #[doc = "< Maximum number of 32-bit registers available per multiprocessor"]
    cudaDevAttrMaxRegistersPerMultiprocessor = 82,
    #[doc = "< Device can allocate managed memory on this system"]
    cudaDevAttrManagedMemory = 83,
    #[doc = "< Device is on a multi-GPU board"]
    cudaDevAttrIsMultiGpuBoard = 84,
    #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"]
    cudaDevAttrMultiGpuBoardGroupID = 85,
    #[doc = "< Link between the device and the host supports native atomic operations"]
    cudaDevAttrHostNativeAtomicSupported = 86,
    #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"]
    cudaDevAttrSingleToDoublePrecisionPerfRatio = 87,
    #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"]
    cudaDevAttrPageableMemoryAccess = 88,
    #[doc = "< Device can coherently access managed memory concurrently with the CPU"]
    cudaDevAttrConcurrentManagedAccess = 89,
    #[doc = "< Device supports Compute Preemption"]
    cudaDevAttrComputePreemptionSupported = 90,
    #[doc = "< Device can access host registered memory at the same virtual address as the CPU"]
    cudaDevAttrCanUseHostPointerForRegisteredMem = 91,
    cudaDevAttrReserved92 = 92,
    cudaDevAttrReserved93 = 93,
    cudaDevAttrReserved94 = 94,
    #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"]
    cudaDevAttrCooperativeLaunch = 95,
    cudaDevAttrReserved96 = 96,
    #[doc = "< The maximum optin shared memory per block. This value may vary by chip. See ::cudaFuncSetAttribute"]
    cudaDevAttrMaxSharedMemoryPerBlockOptin = 97,
    #[doc = "< Device supports flushing of outstanding remote writes."]
    cudaDevAttrCanFlushRemoteWrites = 98,
    #[doc = "< Device supports host memory registration via ::cudaHostRegister."]
    cudaDevAttrHostRegisterSupported = 99,
    #[doc = "< Device accesses pageable memory via the host's page tables."]
    cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100,
    #[doc = "< Host can directly access managed memory on the device without migration."]
    cudaDevAttrDirectManagedMemAccessFromHost = 101,
    #[doc = "< Maximum number of blocks per multiprocessor"]
    cudaDevAttrMaxBlocksPerMultiprocessor = 106,
    #[doc = "< Maximum L2 persisting lines capacity setting in bytes."]
    cudaDevAttrMaxPersistingL2CacheSize = 108,
    #[doc = "< Maximum value of cudaAccessPolicyWindow::num_bytes."]
    cudaDevAttrMaxAccessPolicyWindowSize = 109,
    #[doc = "< Shared memory reserved by CUDA driver per block in bytes"]
    cudaDevAttrReservedSharedMemoryPerBlock = 111,
    #[doc = "< Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays"]
    cudaDevAttrSparseCudaArraySupported = 112,
    #[doc = "< Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU"]
    cudaDevAttrHostRegisterReadOnlySupported = 113,
    #[doc = "< External timeline semaphore interop is supported on the device"]
    cudaDevAttrTimelineSemaphoreInteropSupported = 114,
    #[doc = "< Device supports using the ::cudaMallocAsync and ::cudaMemPool family of APIs"]
    cudaDevAttrMemoryPoolsSupported = 115,
    #[doc = "< Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)"]
    cudaDevAttrGPUDirectRDMASupported = 116,
    #[doc = "< The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the ::cudaFlushGPUDirectRDMAWritesOptions enum"]
    cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117,
    #[doc = "< GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See ::cudaGPUDirectRDMAWritesOrdering for the numerical values returned here."]
    cudaDevAttrGPUDirectRDMAWritesOrdering = 118,
    #[doc = "< Handle types supported with mempool based IPC"]
    cudaDevAttrMemoryPoolSupportedHandleTypes = 119,
    #[doc = "< Indicates device supports cluster launch"]
    cudaDevAttrClusterLaunch = 120,
    #[doc = "< Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays"]
    cudaDevAttrDeferredMappingCudaArraySupported = 121,
    cudaDevAttrReserved122 = 122,
    cudaDevAttrReserved123 = 123,
    cudaDevAttrReserved124 = 124,
    #[doc = "< Device supports IPC Events."]
    cudaDevAttrIpcEventSupport = 125,
    #[doc = "< Number of memory synchronization domains the device supports."]
    cudaDevAttrMemSyncDomainCount = 126,
    cudaDevAttrReserved127 = 127,
    cudaDevAttrReserved128 = 128,
    cudaDevAttrReserved129 = 129,
    #[doc = "< NUMA configuration of a device: value is of type ::cudaDeviceNumaConfig enum"]
    cudaDevAttrNumaConfig = 130,
    #[doc = "< NUMA node ID of the GPU memory"]
    cudaDevAttrNumaId = 131,
    cudaDevAttrReserved132 = 132,
    #[doc = "< Contexts created on this device will be shared via MPS"]
    cudaDevAttrMpsEnabled = 133,
    #[doc = "< NUMA ID of the host node closest to the device or -1 when system does not support NUMA"]
    cudaDevAttrHostNumaId = 134,
    #[doc = "< Device supports CIG with D3D12."]
    cudaDevAttrD3D12CigSupported = 135,
    #[doc = "< Device supports CIG with Vulkan."]
    cudaDevAttrVulkanCigSupported = 138,
    #[doc = "< The combined 16-bit PCI device ID and 16-bit PCI vendor ID."]
    cudaDevAttrGpuPciDeviceId = 139,
    #[doc = "< The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID."]
    cudaDevAttrGpuPciSubsystemId = 140,
    cudaDevAttrReserved141 = 141,
    #[doc = "< Device supports HOST_NUMA location with the ::cudaMallocAsync and ::cudaMemPool family of APIs"]
    cudaDevAttrHostNumaMemoryPoolsSupported = 142,
    #[doc = "< Device supports HostNuma location IPC between nodes in a multi-node system."]
    cudaDevAttrHostNumaMultinodeIpcSupported = 143,
    #[doc = "< Device suports HOST location with the ::cuMemAllocAsync and ::cuMemPool family of APIs"]
    cudaDevAttrHostMemoryPoolsSupported = 144,
    cudaDevAttrReserved145 = 145,
    #[doc = "< Link between the device and the host supports only some native atomic operations"]
    cudaDevAttrOnlyPartialHostNativeAtomicSupported = 147,
    cudaDevAttrMax = 148,
}
#[repr(u32)]
#[doc = " CUDA memory pool attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemPoolAttr {
    #[doc = " (value type = int)\n Allow cuMemAllocAsync to use memory asynchronously freed\n in another streams as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n Cuda events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)"]
    cudaMemPoolReuseFollowEventDependencies = 1,
    #[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
    cudaMemPoolReuseAllowOpportunistic = 2,
    #[doc = " (value type = int)\n Allow cuMemAllocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by cuFreeAsync (default enabled)."]
    cudaMemPoolReuseAllowInternalDependencies = 3,
    #[doc = " (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)"]
    cudaMemPoolAttrReleaseThreshold = 4,
    #[doc = " (value type = cuuint64_t)\n Amount of backing memory currently allocated for the mempool."]
    cudaMemPoolAttrReservedMemCurrent = 5,
    #[doc = " (value type = cuuint64_t)\n High watermark of backing memory allocated for the mempool since the\n last time it was reset. High watermark can only be reset to zero."]
    cudaMemPoolAttrReservedMemHigh = 6,
    #[doc = " (value type = cuuint64_t)\n Amount of memory from the pool that is currently in use by the application."]
    cudaMemPoolAttrUsedMemCurrent = 7,
    #[doc = " (value type = cuuint64_t)\n High watermark of the amount of memory from the pool that was in use by the application since\n the last time it was reset. High watermark can only be reset to zero."]
    cudaMemPoolAttrUsedMemHigh = 8,
}
impl cudaMemLocationType {
    pub const cudaMemLocationTypeNone: cudaMemLocationType =
        cudaMemLocationType::cudaMemLocationTypeInvalid;
}
#[repr(u32)]
#[doc = " Specifies the type of location"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemLocationType {
    cudaMemLocationTypeInvalid = 0,
    #[doc = "< Location is a device location, thus id is a device ordinal"]
    cudaMemLocationTypeDevice = 1,
    #[doc = "< Location is host, id is ignored"]
    cudaMemLocationTypeHost = 2,
    #[doc = "< Location is a host NUMA node, thus id is a host NUMA node id"]
    cudaMemLocationTypeHostNuma = 3,
    #[doc = "< Location is the host NUMA node closest to the current thread's CPU, id is ignored"]
    cudaMemLocationTypeHostNumaCurrent = 4,
}
#[doc = " Specifies a memory location.\n\n To specify a gpu, set type = ::cudaMemLocationTypeDevice and set id = the gpu's device ordinal.\n To specify a cpu NUMA node, set type = ::cudaMemLocationTypeHostNuma and set id = host NUMA node id."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemLocation {
    #[doc = "< Specifies the location type, which modifies the meaning of id."]
    pub type_: cudaMemLocationType,
    #[doc = "< identifier for a given this location's ::CUmemLocationType."]
    pub id: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemLocation"][::core::mem::size_of::<cudaMemLocation>() - 8usize];
    ["Alignment of cudaMemLocation"][::core::mem::align_of::<cudaMemLocation>() - 4usize];
    ["Offset of field: cudaMemLocation::type_"]
        [::core::mem::offset_of!(cudaMemLocation, type_) - 0usize];
    ["Offset of field: cudaMemLocation::id"][::core::mem::offset_of!(cudaMemLocation, id) - 4usize];
};
#[repr(u32)]
#[doc = " Specifies the memory protection flags for mapping."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemAccessFlags {
    #[doc = "< Default, make the address range not accessible"]
    cudaMemAccessFlagsProtNone = 0,
    #[doc = "< Make the address range read accessible"]
    cudaMemAccessFlagsProtRead = 1,
    #[doc = "< Make the address range read-write accessible"]
    cudaMemAccessFlagsProtReadWrite = 3,
}
#[doc = " Memory access descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemAccessDesc {
    #[doc = "< Location on which the request is to change it's accessibility"]
    pub location: cudaMemLocation,
    #[doc = "< ::CUmemProt accessibility flags to set on the request"]
    pub flags: cudaMemAccessFlags,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemAccessDesc"][::core::mem::size_of::<cudaMemAccessDesc>() - 12usize];
    ["Alignment of cudaMemAccessDesc"][::core::mem::align_of::<cudaMemAccessDesc>() - 4usize];
    ["Offset of field: cudaMemAccessDesc::location"]
        [::core::mem::offset_of!(cudaMemAccessDesc, location) - 0usize];
    ["Offset of field: cudaMemAccessDesc::flags"]
        [::core::mem::offset_of!(cudaMemAccessDesc, flags) - 8usize];
};
#[repr(u32)]
#[doc = " Defines the allocation types available"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemAllocationType {
    cudaMemAllocationTypeInvalid = 0,
    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
    cudaMemAllocationTypePinned = 1,
    #[doc = " This allocation type is managed memory"]
    cudaMemAllocationTypeManaged = 2,
    #[doc = " This allocation type is managed memory"]
    cudaMemAllocationTypeMax = 2147483647,
}
#[repr(u32)]
#[doc = " Flags for specifying particular handle types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemAllocationHandleType {
    #[doc = "< Does not allow any export mechanism. >"]
    cudaMemHandleTypeNone = 0,
    #[doc = "< Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)"]
    cudaMemHandleTypePosixFileDescriptor = 1,
    #[doc = "< Allows a Win32 NT handle to be used for exporting. (HANDLE)"]
    cudaMemHandleTypeWin32 = 2,
    #[doc = "< Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)"]
    cudaMemHandleTypeWin32Kmt = 4,
    #[doc = "< Allows a fabric handle to be used for exporting. (cudaMemFabricHandle_t)"]
    cudaMemHandleTypeFabric = 8,
}
#[doc = " Specifies the properties of allocations made from the pool."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemPoolProps {
    #[doc = "< Allocation type. Currently must be specified as cudaMemAllocationTypePinned"]
    pub allocType: cudaMemAllocationType,
    #[doc = "< Handle types that will be supported by allocations from the pool."]
    pub handleTypes: cudaMemAllocationHandleType,
    #[doc = "< Location allocations should reside."]
    pub location: cudaMemLocation,
    #[doc = " Windows-specific LPSECURITYATTRIBUTES required when\n ::cudaMemHandleTypeWin32 is specified.  This security attribute defines\n the scope of which exported allocations may be tranferred to other\n processes.  In all other cases, this field is required to be zero."]
    pub win32SecurityAttributes: *mut ::core::ffi::c_void,
    #[doc = "< Maximum pool size. When set to 0, defaults to a system dependent value."]
    pub maxSize: usize,
    #[doc = "< Bitmask indicating intended usage for the pool."]
    pub usage: ::core::ffi::c_ushort,
    #[doc = "< reserved for future use, must be 0"]
    pub reserved: [::core::ffi::c_uchar; 54usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemPoolProps"][::core::mem::size_of::<cudaMemPoolProps>() - 88usize];
    ["Alignment of cudaMemPoolProps"][::core::mem::align_of::<cudaMemPoolProps>() - 8usize];
    ["Offset of field: cudaMemPoolProps::allocType"]
        [::core::mem::offset_of!(cudaMemPoolProps, allocType) - 0usize];
    ["Offset of field: cudaMemPoolProps::handleTypes"]
        [::core::mem::offset_of!(cudaMemPoolProps, handleTypes) - 4usize];
    ["Offset of field: cudaMemPoolProps::location"]
        [::core::mem::offset_of!(cudaMemPoolProps, location) - 8usize];
    ["Offset of field: cudaMemPoolProps::win32SecurityAttributes"]
        [::core::mem::offset_of!(cudaMemPoolProps, win32SecurityAttributes) - 16usize];
    ["Offset of field: cudaMemPoolProps::maxSize"]
        [::core::mem::offset_of!(cudaMemPoolProps, maxSize) - 24usize];
    ["Offset of field: cudaMemPoolProps::usage"]
        [::core::mem::offset_of!(cudaMemPoolProps, usage) - 32usize];
    ["Offset of field: cudaMemPoolProps::reserved"]
        [::core::mem::offset_of!(cudaMemPoolProps, reserved) - 34usize];
};
#[doc = " Opaque data for exporting a pool allocation"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemPoolPtrExportData {
    pub reserved: [::core::ffi::c_uchar; 64usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemPoolPtrExportData"]
        [::core::mem::size_of::<cudaMemPoolPtrExportData>() - 64usize];
    ["Alignment of cudaMemPoolPtrExportData"]
        [::core::mem::align_of::<cudaMemPoolPtrExportData>() - 1usize];
    ["Offset of field: cudaMemPoolPtrExportData::reserved"]
        [::core::mem::offset_of!(cudaMemPoolPtrExportData, reserved) - 0usize];
};
#[doc = " Memory allocation node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemAllocNodeParams {
    #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
    pub poolProps: cudaMemPoolProps,
    #[doc = "< in: number of memory access descriptors.  Must not exceed the number of GPUs."]
    pub accessDescs: *const cudaMemAccessDesc,
    #[doc = "< in: Number of `accessDescs`s"]
    pub accessDescCount: usize,
    #[doc = "< in: size in bytes of the requested allocation"]
    pub bytesize: usize,
    #[doc = "< out: address of the allocation returned by CUDA"]
    pub dptr: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemAllocNodeParams"][::core::mem::size_of::<cudaMemAllocNodeParams>() - 120usize];
    ["Alignment of cudaMemAllocNodeParams"]
        [::core::mem::align_of::<cudaMemAllocNodeParams>() - 8usize];
    ["Offset of field: cudaMemAllocNodeParams::poolProps"]
        [::core::mem::offset_of!(cudaMemAllocNodeParams, poolProps) - 0usize];
    ["Offset of field: cudaMemAllocNodeParams::accessDescs"]
        [::core::mem::offset_of!(cudaMemAllocNodeParams, accessDescs) - 88usize];
    ["Offset of field: cudaMemAllocNodeParams::accessDescCount"]
        [::core::mem::offset_of!(cudaMemAllocNodeParams, accessDescCount) - 96usize];
    ["Offset of field: cudaMemAllocNodeParams::bytesize"]
        [::core::mem::offset_of!(cudaMemAllocNodeParams, bytesize) - 104usize];
    ["Offset of field: cudaMemAllocNodeParams::dptr"]
        [::core::mem::offset_of!(cudaMemAllocNodeParams, dptr) - 112usize];
};
#[doc = " Memory allocation node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemAllocNodeParamsV2 {
    #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
    pub poolProps: cudaMemPoolProps,
    #[doc = "< in: number of memory access descriptors.  Must not exceed the number of GPUs."]
    pub accessDescs: *const cudaMemAccessDesc,
    #[doc = "< in: Number of `accessDescs`s"]
    pub accessDescCount: usize,
    #[doc = "< in: size in bytes of the requested allocation"]
    pub bytesize: usize,
    #[doc = "< out: address of the allocation returned by CUDA"]
    pub dptr: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemAllocNodeParamsV2"]
        [::core::mem::size_of::<cudaMemAllocNodeParamsV2>() - 120usize];
    ["Alignment of cudaMemAllocNodeParamsV2"]
        [::core::mem::align_of::<cudaMemAllocNodeParamsV2>() - 8usize];
    ["Offset of field: cudaMemAllocNodeParamsV2::poolProps"]
        [::core::mem::offset_of!(cudaMemAllocNodeParamsV2, poolProps) - 0usize];
    ["Offset of field: cudaMemAllocNodeParamsV2::accessDescs"]
        [::core::mem::offset_of!(cudaMemAllocNodeParamsV2, accessDescs) - 88usize];
    ["Offset of field: cudaMemAllocNodeParamsV2::accessDescCount"]
        [::core::mem::offset_of!(cudaMemAllocNodeParamsV2, accessDescCount) - 96usize];
    ["Offset of field: cudaMemAllocNodeParamsV2::bytesize"]
        [::core::mem::offset_of!(cudaMemAllocNodeParamsV2, bytesize) - 104usize];
    ["Offset of field: cudaMemAllocNodeParamsV2::dptr"]
        [::core::mem::offset_of!(cudaMemAllocNodeParamsV2, dptr) - 112usize];
};
#[doc = " Memory free node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemFreeNodeParams {
    #[doc = "< in: the pointer to free"]
    pub dptr: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemFreeNodeParams"][::core::mem::size_of::<cudaMemFreeNodeParams>() - 8usize];
    ["Alignment of cudaMemFreeNodeParams"]
        [::core::mem::align_of::<cudaMemFreeNodeParams>() - 8usize];
    ["Offset of field: cudaMemFreeNodeParams::dptr"]
        [::core::mem::offset_of!(cudaMemFreeNodeParams, dptr) - 0usize];
};
#[repr(u32)]
#[doc = " Graph memory attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphMemAttributeType {
    #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently associated with graphs."]
    cudaGraphMemAttrUsedMemCurrent = 0,
    #[doc = " (value type = cuuint64_t)\n High watermark of memory, in bytes, associated with graphs since the\n last time it was reset.  High watermark can only be reset to zero."]
    cudaGraphMemAttrUsedMemHigh = 1,
    #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
    cudaGraphMemAttrReservedMemCurrent = 2,
    #[doc = " (value type = cuuint64_t)\n High watermark of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
    cudaGraphMemAttrReservedMemHigh = 3,
}
#[repr(u32)]
#[doc = " Flags to specify for copies within a batch. For more details see ::cudaMemcpyBatchAsync."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemcpyFlags {
    cudaMemcpyFlagDefault = 0,
    #[doc = " Hint to the driver to try and overlap the copy with compute work on the SMs."]
    cudaMemcpyFlagPreferOverlapWithCompute = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemcpySrcAccessOrder {
    #[doc = " Default invalid."]
    cudaMemcpySrcAccessOrderInvalid = 0,
    #[doc = " Indicates that access to the source pointer must be in stream order."]
    cudaMemcpySrcAccessOrderStream = 1,
    #[doc = " Indicates that access to the source pointer can be out of stream order and all\n accesses must be complete before the API call returns. This flag is suited for\n ephemeral sources (ex., stack variables) when it's known that no prior operations\n in the stream can be accessing the memory and also that the lifetime of the memory\n is limited to the scope that the source variable was declared in. Specifying\n this flag allows the driver to optimize the copy and removes the need for the user\n to synchronize the stream after the API call."]
    cudaMemcpySrcAccessOrderDuringApiCall = 2,
    #[doc = " Indicates that access to the source pointer can be out of stream order and the accesses\n can happen even after the API call returns. This flag is suited for host pointers\n allocated outside CUDA (ex., via malloc) when it's known that no prior operations\n in the stream can be accessing the memory. Specifying this flag allows the driver\n to optimize the copy on certain platforms."]
    cudaMemcpySrcAccessOrderAny = 3,
    #[doc = " Indicates that access to the source pointer can be out of stream order and the accesses\n can happen even after the API call returns. This flag is suited for host pointers\n allocated outside CUDA (ex., via malloc) when it's known that no prior operations\n in the stream can be accessing the memory. Specifying this flag allows the driver\n to optimize the copy on certain platforms."]
    cudaMemcpySrcAccessOrderMax = 2147483647,
}
#[doc = " Attributes specific to copies within a batch. For more details on usage see ::cudaMemcpyBatchAsync."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemcpyAttributes {
    #[doc = "< Source access ordering to be observed for copies with this attribute."]
    pub srcAccessOrder: cudaMemcpySrcAccessOrder,
    #[doc = "< Hint location for the source operand. Ignored when the pointers are not managed memory or memory allocated outside CUDA."]
    pub srcLocHint: cudaMemLocation,
    #[doc = "< Hint location for the destination operand. Ignored when the pointers are not managed memory or memory allocated outside CUDA."]
    pub dstLocHint: cudaMemLocation,
    #[doc = "< Additional flags for copies with this attribute. See ::cudaMemcpyFlags."]
    pub flags: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpyAttributes"][::core::mem::size_of::<cudaMemcpyAttributes>() - 24usize];
    ["Alignment of cudaMemcpyAttributes"][::core::mem::align_of::<cudaMemcpyAttributes>() - 4usize];
    ["Offset of field: cudaMemcpyAttributes::srcAccessOrder"]
        [::core::mem::offset_of!(cudaMemcpyAttributes, srcAccessOrder) - 0usize];
    ["Offset of field: cudaMemcpyAttributes::srcLocHint"]
        [::core::mem::offset_of!(cudaMemcpyAttributes, srcLocHint) - 4usize];
    ["Offset of field: cudaMemcpyAttributes::dstLocHint"]
        [::core::mem::offset_of!(cudaMemcpyAttributes, dstLocHint) - 12usize];
    ["Offset of field: cudaMemcpyAttributes::flags"]
        [::core::mem::offset_of!(cudaMemcpyAttributes, flags) - 20usize];
};
#[repr(u32)]
#[doc = " These flags allow applications to convey the operand type for individual copies specified in ::cudaMemcpy3DBatchAsync."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaMemcpy3DOperandType {
    #[doc = "< Memcpy operand is a valid pointer."]
    cudaMemcpyOperandTypePointer = 1,
    #[doc = "< Memcpy operand is a CUarray."]
    cudaMemcpyOperandTypeArray = 2,
    cudaMemcpyOperandTypeMax = 2147483647,
}
#[doc = " Struct representing offset into a ::cudaArray_t in elements"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaOffset3D {
    pub x: usize,
    pub y: usize,
    pub z: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaOffset3D"][::core::mem::size_of::<cudaOffset3D>() - 24usize];
    ["Alignment of cudaOffset3D"][::core::mem::align_of::<cudaOffset3D>() - 8usize];
    ["Offset of field: cudaOffset3D::x"][::core::mem::offset_of!(cudaOffset3D, x) - 0usize];
    ["Offset of field: cudaOffset3D::y"][::core::mem::offset_of!(cudaOffset3D, y) - 8usize];
    ["Offset of field: cudaOffset3D::z"][::core::mem::offset_of!(cudaOffset3D, z) - 16usize];
};
#[doc = " Struct representing an operand for copy with ::cudaMemcpy3DBatchAsync"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaMemcpy3DOperand {
    pub type_: cudaMemcpy3DOperandType,
    pub op: cudaMemcpy3DOperand__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaMemcpy3DOperand__bindgen_ty_1 {
    pub ptr: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
    pub array: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2,
}
#[doc = " Struct representing an operand when ::cudaMemcpy3DOperand::type is ::cudaMemcpyOperandTypePointer"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1 {
    pub ptr: *mut ::core::ffi::c_void,
    #[doc = "< Length of each row in elements."]
    pub rowLength: usize,
    #[doc = "< Height of each layer in elements."]
    pub layerHeight: usize,
    #[doc = "< Hint location for the operand. Ignored when the pointers are not managed memory or memory allocated outside CUDA."]
    pub locHint: cudaMemLocation,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::size_of::<cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1>() - 32usize];
    ["Alignment of cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1::ptr"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1, ptr) - 0usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1::rowLength"][::core::mem::offset_of!(
        cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
        rowLength
    ) - 8usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1::layerHeight"][::core::mem::offset_of!(
        cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
        layerHeight
    ) - 16usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1::locHint"][::core::mem::offset_of!(
        cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
        locHint
    ) - 24usize];
};
#[doc = " Struct representing an operand when ::cudaMemcpy3DOperand::type is ::cudaMemcpyOperandTypeArray"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2 {
    pub array: cudaArray_t,
    pub offset: cudaOffset3D,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2"]
        [::core::mem::size_of::<cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2>() - 32usize];
    ["Alignment of cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2"]
        [::core::mem::align_of::<cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2>() - 8usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2::array"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2, array) - 0usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2::offset"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2, offset) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DOperand__bindgen_ty_1"]
        [::core::mem::size_of::<cudaMemcpy3DOperand__bindgen_ty_1>() - 32usize];
    ["Alignment of cudaMemcpy3DOperand__bindgen_ty_1"]
        [::core::mem::align_of::<cudaMemcpy3DOperand__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1::ptr"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand__bindgen_ty_1, ptr) - 0usize];
    ["Offset of field: cudaMemcpy3DOperand__bindgen_ty_1::array"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand__bindgen_ty_1, array) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DOperand"][::core::mem::size_of::<cudaMemcpy3DOperand>() - 40usize];
    ["Alignment of cudaMemcpy3DOperand"][::core::mem::align_of::<cudaMemcpy3DOperand>() - 8usize];
    ["Offset of field: cudaMemcpy3DOperand::type_"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand, type_) - 0usize];
    ["Offset of field: cudaMemcpy3DOperand::op"]
        [::core::mem::offset_of!(cudaMemcpy3DOperand, op) - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaMemcpy3DBatchOp {
    #[doc = "< Source memcpy operand."]
    pub src: cudaMemcpy3DOperand,
    #[doc = "< Destination memcpy operand."]
    pub dst: cudaMemcpy3DOperand,
    #[doc = "< Extents of the memcpy between src and dst. The width, height and depth components must not be 0."]
    pub extent: cudaExtent,
    #[doc = "< Source access ordering to be observed for copy from src to dst."]
    pub srcAccessOrder: cudaMemcpySrcAccessOrder,
    #[doc = "< Additional flags for copy from src to dst. See ::cudaMemcpyFlags."]
    pub flags: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemcpy3DBatchOp"][::core::mem::size_of::<cudaMemcpy3DBatchOp>() - 112usize];
    ["Alignment of cudaMemcpy3DBatchOp"][::core::mem::align_of::<cudaMemcpy3DBatchOp>() - 8usize];
    ["Offset of field: cudaMemcpy3DBatchOp::src"]
        [::core::mem::offset_of!(cudaMemcpy3DBatchOp, src) - 0usize];
    ["Offset of field: cudaMemcpy3DBatchOp::dst"]
        [::core::mem::offset_of!(cudaMemcpy3DBatchOp, dst) - 40usize];
    ["Offset of field: cudaMemcpy3DBatchOp::extent"]
        [::core::mem::offset_of!(cudaMemcpy3DBatchOp, extent) - 80usize];
    ["Offset of field: cudaMemcpy3DBatchOp::srcAccessOrder"]
        [::core::mem::offset_of!(cudaMemcpy3DBatchOp, srcAccessOrder) - 104usize];
    ["Offset of field: cudaMemcpy3DBatchOp::flags"]
        [::core::mem::offset_of!(cudaMemcpy3DBatchOp, flags) - 108usize];
};
#[repr(u32)]
#[doc = " CUDA device P2P attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaDeviceP2PAttr {
    #[doc = "< A relative value indicating the performance of the link between two devices"]
    cudaDevP2PAttrPerformanceRank = 1,
    #[doc = "< Peer access is enabled"]
    cudaDevP2PAttrAccessSupported = 2,
    #[doc = "< Native atomic operation over the link supported"]
    cudaDevP2PAttrNativeAtomicSupported = 3,
    #[doc = "< Accessing CUDA arrays over the link supported"]
    cudaDevP2PAttrCudaArrayAccessSupported = 4,
    #[doc = "< Only some CUDA-valid atomic operations over the link are supported."]
    cudaDevP2PAttrOnlyPartialNativeAtomicSupported = 5,
}
#[repr(u32)]
#[doc = " CUDA-valid Atomic Operations"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaAtomicOperation {
    cudaAtomicOperationIntegerAdd = 0,
    cudaAtomicOperationIntegerMin = 1,
    cudaAtomicOperationIntegerMax = 2,
    cudaAtomicOperationIntegerIncrement = 3,
    cudaAtomicOperationIntegerDecrement = 4,
    cudaAtomicOperationAnd = 5,
    cudaAtomicOperationOr = 6,
    cudaAtomicOperationXOR = 7,
    cudaAtomicOperationExchange = 8,
    cudaAtomicOperationCAS = 9,
    cudaAtomicOperationFloatAdd = 10,
    cudaAtomicOperationFloatMin = 11,
    cudaAtomicOperationFloatMax = 12,
}
#[repr(u32)]
#[doc = " CUDA-valid Atomic Operation capabilities"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaAtomicOperationCapability {
    cudaAtomicCapabilitySigned = 1,
    cudaAtomicCapabilityUnsigned = 2,
    cudaAtomicCapabilityReduction = 4,
    cudaAtomicCapabilityScalar32 = 8,
    cudaAtomicCapabilityScalar64 = 16,
    cudaAtomicCapabilityScalar128 = 32,
    cudaAtomicCapabilityVector32x4 = 64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUuuid_st {
    pub bytes: [::core::ffi::c_char; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of CUuuid_st"][::core::mem::size_of::<CUuuid_st>() - 16usize];
    ["Alignment of CUuuid_st"][::core::mem::align_of::<CUuuid_st>() - 1usize];
    ["Offset of field: CUuuid_st::bytes"][::core::mem::offset_of!(CUuuid_st, bytes) - 0usize];
};
pub type CUuuid = CUuuid_st;
pub type cudaUUID_t = CUuuid_st;
#[doc = " CUDA device properties"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaDeviceProp {
    #[doc = "< ASCII string identifying device"]
    pub name: [::core::ffi::c_char; 256usize],
    #[doc = "< 16-byte unique identifier"]
    pub uuid: cudaUUID_t,
    #[doc = "< 8-byte locally unique identifier. Value is undefined on TCC and non-Windows platforms"]
    pub luid: [::core::ffi::c_char; 8usize],
    #[doc = "< LUID device node mask. Value is undefined on TCC and non-Windows platforms"]
    pub luidDeviceNodeMask: ::core::ffi::c_uint,
    #[doc = "< Global memory available on device in bytes"]
    pub totalGlobalMem: usize,
    #[doc = "< Shared memory available per block in bytes"]
    pub sharedMemPerBlock: usize,
    #[doc = "< 32-bit registers available per block"]
    pub regsPerBlock: ::core::ffi::c_int,
    #[doc = "< Warp size in threads"]
    pub warpSize: ::core::ffi::c_int,
    #[doc = "< Maximum pitch in bytes allowed by memory copies"]
    pub memPitch: usize,
    #[doc = "< Maximum number of threads per block"]
    pub maxThreadsPerBlock: ::core::ffi::c_int,
    #[doc = "< Maximum size of each dimension of a block"]
    pub maxThreadsDim: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum size of each dimension of a grid"]
    pub maxGridSize: [::core::ffi::c_int; 3usize],
    #[doc = "< Constant memory available on device in bytes"]
    pub totalConstMem: usize,
    #[doc = "< Major compute capability"]
    pub major: ::core::ffi::c_int,
    #[doc = "< Minor compute capability"]
    pub minor: ::core::ffi::c_int,
    #[doc = "< Alignment requirement for textures"]
    pub textureAlignment: usize,
    #[doc = "< Pitch alignment requirement for texture references bound to pitched memory"]
    pub texturePitchAlignment: usize,
    #[doc = "< Number of multiprocessors on device"]
    pub multiProcessorCount: ::core::ffi::c_int,
    #[doc = "< Device is integrated as opposed to discrete"]
    pub integrated: ::core::ffi::c_int,
    #[doc = "< Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer"]
    pub canMapHostMemory: ::core::ffi::c_int,
    #[doc = "< Maximum 1D texture size"]
    pub maxTexture1D: ::core::ffi::c_int,
    #[doc = "< Maximum 1D mipmapped texture size"]
    pub maxTexture1DMipmap: ::core::ffi::c_int,
    #[doc = "< Maximum 2D texture dimensions"]
    pub maxTexture2D: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum 2D mipmapped texture dimensions"]
    pub maxTexture2DMipmap: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory"]
    pub maxTexture2DLinear: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum 2D texture dimensions if texture gather operations have to be performed"]
    pub maxTexture2DGather: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum 3D texture dimensions"]
    pub maxTexture3D: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum alternate 3D texture dimensions"]
    pub maxTexture3DAlt: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum Cubemap texture dimensions"]
    pub maxTextureCubemap: ::core::ffi::c_int,
    #[doc = "< Maximum 1D layered texture dimensions"]
    pub maxTexture1DLayered: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum 2D layered texture dimensions"]
    pub maxTexture2DLayered: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum Cubemap layered texture dimensions"]
    pub maxTextureCubemapLayered: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum 1D surface size"]
    pub maxSurface1D: ::core::ffi::c_int,
    #[doc = "< Maximum 2D surface dimensions"]
    pub maxSurface2D: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum 3D surface dimensions"]
    pub maxSurface3D: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum 1D layered surface dimensions"]
    pub maxSurface1DLayered: [::core::ffi::c_int; 2usize],
    #[doc = "< Maximum 2D layered surface dimensions"]
    pub maxSurface2DLayered: [::core::ffi::c_int; 3usize],
    #[doc = "< Maximum Cubemap surface dimensions"]
    pub maxSurfaceCubemap: ::core::ffi::c_int,
    #[doc = "< Maximum Cubemap layered surface dimensions"]
    pub maxSurfaceCubemapLayered: [::core::ffi::c_int; 2usize],
    #[doc = "< Alignment requirements for surfaces"]
    pub surfaceAlignment: usize,
    #[doc = "< Device can possibly execute multiple kernels concurrently"]
    pub concurrentKernels: ::core::ffi::c_int,
    #[doc = "< Device has ECC support enabled"]
    pub ECCEnabled: ::core::ffi::c_int,
    #[doc = "< PCI bus ID of the device"]
    pub pciBusID: ::core::ffi::c_int,
    #[doc = "< PCI device ID of the device"]
    pub pciDeviceID: ::core::ffi::c_int,
    #[doc = "< PCI domain ID of the device"]
    pub pciDomainID: ::core::ffi::c_int,
    #[doc = "< 1 if device is a Tesla device using TCC driver, 0 otherwise"]
    pub tccDriver: ::core::ffi::c_int,
    #[doc = "< Number of asynchronous engines"]
    pub asyncEngineCount: ::core::ffi::c_int,
    #[doc = "< Device shares a unified address space with the host"]
    pub unifiedAddressing: ::core::ffi::c_int,
    #[doc = "< Global memory bus width in bits"]
    pub memoryBusWidth: ::core::ffi::c_int,
    #[doc = "< Size of L2 cache in bytes"]
    pub l2CacheSize: ::core::ffi::c_int,
    #[doc = "< Device's maximum l2 persisting lines capacity setting in bytes"]
    pub persistingL2CacheMaxSize: ::core::ffi::c_int,
    #[doc = "< Maximum resident threads per multiprocessor"]
    pub maxThreadsPerMultiProcessor: ::core::ffi::c_int,
    #[doc = "< Device supports stream priorities"]
    pub streamPrioritiesSupported: ::core::ffi::c_int,
    #[doc = "< Device supports caching globals in L1"]
    pub globalL1CacheSupported: ::core::ffi::c_int,
    #[doc = "< Device supports caching locals in L1"]
    pub localL1CacheSupported: ::core::ffi::c_int,
    #[doc = "< Shared memory available per multiprocessor in bytes"]
    pub sharedMemPerMultiprocessor: usize,
    #[doc = "< 32-bit registers available per multiprocessor"]
    pub regsPerMultiprocessor: ::core::ffi::c_int,
    #[doc = "< Device supports allocating managed memory on this system"]
    pub managedMemory: ::core::ffi::c_int,
    #[doc = "< Device is on a multi-GPU board"]
    pub isMultiGpuBoard: ::core::ffi::c_int,
    #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"]
    pub multiGpuBoardGroupID: ::core::ffi::c_int,
    #[doc = "< Link between the device and the host supports native atomic operations"]
    pub hostNativeAtomicSupported: ::core::ffi::c_int,
    #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"]
    pub pageableMemoryAccess: ::core::ffi::c_int,
    #[doc = "< Device can coherently access managed memory concurrently with the CPU"]
    pub concurrentManagedAccess: ::core::ffi::c_int,
    #[doc = "< Device supports Compute Preemption"]
    pub computePreemptionSupported: ::core::ffi::c_int,
    #[doc = "< Device can access host registered memory at the same virtual address as the CPU"]
    pub canUseHostPointerForRegisteredMem: ::core::ffi::c_int,
    #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"]
    pub cooperativeLaunch: ::core::ffi::c_int,
    #[doc = "< Per device maximum shared memory per block usable by special opt in"]
    pub sharedMemPerBlockOptin: usize,
    #[doc = "< Device accesses pageable memory via the host's page tables"]
    pub pageableMemoryAccessUsesHostPageTables: ::core::ffi::c_int,
    #[doc = "< Host can directly access managed memory on the device without migration."]
    pub directManagedMemAccessFromHost: ::core::ffi::c_int,
    #[doc = "< Maximum number of resident blocks per multiprocessor"]
    pub maxBlocksPerMultiProcessor: ::core::ffi::c_int,
    #[doc = "< The maximum value of ::cudaAccessPolicyWindow::num_bytes."]
    pub accessPolicyMaxWindowSize: ::core::ffi::c_int,
    #[doc = "< Shared memory reserved by CUDA driver per block in bytes"]
    pub reservedSharedMemPerBlock: usize,
    #[doc = "< Device supports host memory registration via ::cudaHostRegister."]
    pub hostRegisterSupported: ::core::ffi::c_int,
    #[doc = "< 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise"]
    pub sparseCudaArraySupported: ::core::ffi::c_int,
    #[doc = "< Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU"]
    pub hostRegisterReadOnlySupported: ::core::ffi::c_int,
    #[doc = "< External timeline semaphore interop is supported on the device"]
    pub timelineSemaphoreInteropSupported: ::core::ffi::c_int,
    #[doc = "< 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise"]
    pub memoryPoolsSupported: ::core::ffi::c_int,
    #[doc = "< 1 if the device supports GPUDirect RDMA APIs, 0 otherwise"]
    pub gpuDirectRDMASupported: ::core::ffi::c_int,
    #[doc = "< Bitmask to be interpreted according to the ::cudaFlushGPUDirectRDMAWritesOptions enum"]
    pub gpuDirectRDMAFlushWritesOptions: ::core::ffi::c_uint,
    #[doc = "< See the ::cudaGPUDirectRDMAWritesOrdering enum for numerical values"]
    pub gpuDirectRDMAWritesOrdering: ::core::ffi::c_int,
    #[doc = "< Bitmask of handle types supported with mempool-based IPC"]
    pub memoryPoolSupportedHandleTypes: ::core::ffi::c_uint,
    #[doc = "< 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays"]
    pub deferredMappingCudaArraySupported: ::core::ffi::c_int,
    #[doc = "< Device supports IPC Events."]
    pub ipcEventSupported: ::core::ffi::c_int,
    #[doc = "< Indicates device supports cluster launch"]
    pub clusterLaunch: ::core::ffi::c_int,
    #[doc = "< Indicates device supports unified pointers"]
    pub unifiedFunctionPointers: ::core::ffi::c_int,
    #[doc = "< NUMA configuration of a device: value is of type ::cudaDeviceNumaConfig enum"]
    pub deviceNumaConfig: ::core::ffi::c_int,
    #[doc = "< NUMA node ID of the GPU memory"]
    pub deviceNumaId: ::core::ffi::c_int,
    #[doc = "< Indicates if contexts created on this device will be shared via MPS"]
    pub mpsEnabled: ::core::ffi::c_int,
    #[doc = "< NUMA ID of the host node closest to the device or -1 when system does not support NUMA"]
    pub hostNumaId: ::core::ffi::c_int,
    #[doc = "< The combined 16-bit PCI device ID and 16-bit PCI vendor ID"]
    pub gpuPciDeviceID: ::core::ffi::c_uint,
    #[doc = "< The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID"]
    pub gpuPciSubsystemID: ::core::ffi::c_uint,
    #[doc = "< 1 if the device supports HostNuma location IPC between nodes in a multi-node system."]
    pub hostNumaMultinodeIpcSupported: ::core::ffi::c_int,
    #[doc = "< Reserved for future use"]
    pub reserved: [::core::ffi::c_int; 56usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaDeviceProp"][::core::mem::size_of::<cudaDeviceProp>() - 1008usize];
    ["Alignment of cudaDeviceProp"][::core::mem::align_of::<cudaDeviceProp>() - 8usize];
    ["Offset of field: cudaDeviceProp::name"]
        [::core::mem::offset_of!(cudaDeviceProp, name) - 0usize];
    ["Offset of field: cudaDeviceProp::uuid"]
        [::core::mem::offset_of!(cudaDeviceProp, uuid) - 256usize];
    ["Offset of field: cudaDeviceProp::luid"]
        [::core::mem::offset_of!(cudaDeviceProp, luid) - 272usize];
    ["Offset of field: cudaDeviceProp::luidDeviceNodeMask"]
        [::core::mem::offset_of!(cudaDeviceProp, luidDeviceNodeMask) - 280usize];
    ["Offset of field: cudaDeviceProp::totalGlobalMem"]
        [::core::mem::offset_of!(cudaDeviceProp, totalGlobalMem) - 288usize];
    ["Offset of field: cudaDeviceProp::sharedMemPerBlock"]
        [::core::mem::offset_of!(cudaDeviceProp, sharedMemPerBlock) - 296usize];
    ["Offset of field: cudaDeviceProp::regsPerBlock"]
        [::core::mem::offset_of!(cudaDeviceProp, regsPerBlock) - 304usize];
    ["Offset of field: cudaDeviceProp::warpSize"]
        [::core::mem::offset_of!(cudaDeviceProp, warpSize) - 308usize];
    ["Offset of field: cudaDeviceProp::memPitch"]
        [::core::mem::offset_of!(cudaDeviceProp, memPitch) - 312usize];
    ["Offset of field: cudaDeviceProp::maxThreadsPerBlock"]
        [::core::mem::offset_of!(cudaDeviceProp, maxThreadsPerBlock) - 320usize];
    ["Offset of field: cudaDeviceProp::maxThreadsDim"]
        [::core::mem::offset_of!(cudaDeviceProp, maxThreadsDim) - 324usize];
    ["Offset of field: cudaDeviceProp::maxGridSize"]
        [::core::mem::offset_of!(cudaDeviceProp, maxGridSize) - 336usize];
    ["Offset of field: cudaDeviceProp::totalConstMem"]
        [::core::mem::offset_of!(cudaDeviceProp, totalConstMem) - 352usize];
    ["Offset of field: cudaDeviceProp::major"]
        [::core::mem::offset_of!(cudaDeviceProp, major) - 360usize];
    ["Offset of field: cudaDeviceProp::minor"]
        [::core::mem::offset_of!(cudaDeviceProp, minor) - 364usize];
    ["Offset of field: cudaDeviceProp::textureAlignment"]
        [::core::mem::offset_of!(cudaDeviceProp, textureAlignment) - 368usize];
    ["Offset of field: cudaDeviceProp::texturePitchAlignment"]
        [::core::mem::offset_of!(cudaDeviceProp, texturePitchAlignment) - 376usize];
    ["Offset of field: cudaDeviceProp::multiProcessorCount"]
        [::core::mem::offset_of!(cudaDeviceProp, multiProcessorCount) - 384usize];
    ["Offset of field: cudaDeviceProp::integrated"]
        [::core::mem::offset_of!(cudaDeviceProp, integrated) - 388usize];
    ["Offset of field: cudaDeviceProp::canMapHostMemory"]
        [::core::mem::offset_of!(cudaDeviceProp, canMapHostMemory) - 392usize];
    ["Offset of field: cudaDeviceProp::maxTexture1D"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture1D) - 396usize];
    ["Offset of field: cudaDeviceProp::maxTexture1DMipmap"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture1DMipmap) - 400usize];
    ["Offset of field: cudaDeviceProp::maxTexture2D"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture2D) - 404usize];
    ["Offset of field: cudaDeviceProp::maxTexture2DMipmap"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture2DMipmap) - 412usize];
    ["Offset of field: cudaDeviceProp::maxTexture2DLinear"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture2DLinear) - 420usize];
    ["Offset of field: cudaDeviceProp::maxTexture2DGather"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture2DGather) - 432usize];
    ["Offset of field: cudaDeviceProp::maxTexture3D"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture3D) - 440usize];
    ["Offset of field: cudaDeviceProp::maxTexture3DAlt"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture3DAlt) - 452usize];
    ["Offset of field: cudaDeviceProp::maxTextureCubemap"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTextureCubemap) - 464usize];
    ["Offset of field: cudaDeviceProp::maxTexture1DLayered"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture1DLayered) - 468usize];
    ["Offset of field: cudaDeviceProp::maxTexture2DLayered"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTexture2DLayered) - 476usize];
    ["Offset of field: cudaDeviceProp::maxTextureCubemapLayered"]
        [::core::mem::offset_of!(cudaDeviceProp, maxTextureCubemapLayered) - 488usize];
    ["Offset of field: cudaDeviceProp::maxSurface1D"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurface1D) - 496usize];
    ["Offset of field: cudaDeviceProp::maxSurface2D"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurface2D) - 500usize];
    ["Offset of field: cudaDeviceProp::maxSurface3D"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurface3D) - 508usize];
    ["Offset of field: cudaDeviceProp::maxSurface1DLayered"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurface1DLayered) - 520usize];
    ["Offset of field: cudaDeviceProp::maxSurface2DLayered"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurface2DLayered) - 528usize];
    ["Offset of field: cudaDeviceProp::maxSurfaceCubemap"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurfaceCubemap) - 540usize];
    ["Offset of field: cudaDeviceProp::maxSurfaceCubemapLayered"]
        [::core::mem::offset_of!(cudaDeviceProp, maxSurfaceCubemapLayered) - 544usize];
    ["Offset of field: cudaDeviceProp::surfaceAlignment"]
        [::core::mem::offset_of!(cudaDeviceProp, surfaceAlignment) - 552usize];
    ["Offset of field: cudaDeviceProp::concurrentKernels"]
        [::core::mem::offset_of!(cudaDeviceProp, concurrentKernels) - 560usize];
    ["Offset of field: cudaDeviceProp::ECCEnabled"]
        [::core::mem::offset_of!(cudaDeviceProp, ECCEnabled) - 564usize];
    ["Offset of field: cudaDeviceProp::pciBusID"]
        [::core::mem::offset_of!(cudaDeviceProp, pciBusID) - 568usize];
    ["Offset of field: cudaDeviceProp::pciDeviceID"]
        [::core::mem::offset_of!(cudaDeviceProp, pciDeviceID) - 572usize];
    ["Offset of field: cudaDeviceProp::pciDomainID"]
        [::core::mem::offset_of!(cudaDeviceProp, pciDomainID) - 576usize];
    ["Offset of field: cudaDeviceProp::tccDriver"]
        [::core::mem::offset_of!(cudaDeviceProp, tccDriver) - 580usize];
    ["Offset of field: cudaDeviceProp::asyncEngineCount"]
        [::core::mem::offset_of!(cudaDeviceProp, asyncEngineCount) - 584usize];
    ["Offset of field: cudaDeviceProp::unifiedAddressing"]
        [::core::mem::offset_of!(cudaDeviceProp, unifiedAddressing) - 588usize];
    ["Offset of field: cudaDeviceProp::memoryBusWidth"]
        [::core::mem::offset_of!(cudaDeviceProp, memoryBusWidth) - 592usize];
    ["Offset of field: cudaDeviceProp::l2CacheSize"]
        [::core::mem::offset_of!(cudaDeviceProp, l2CacheSize) - 596usize];
    ["Offset of field: cudaDeviceProp::persistingL2CacheMaxSize"]
        [::core::mem::offset_of!(cudaDeviceProp, persistingL2CacheMaxSize) - 600usize];
    ["Offset of field: cudaDeviceProp::maxThreadsPerMultiProcessor"]
        [::core::mem::offset_of!(cudaDeviceProp, maxThreadsPerMultiProcessor) - 604usize];
    ["Offset of field: cudaDeviceProp::streamPrioritiesSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, streamPrioritiesSupported) - 608usize];
    ["Offset of field: cudaDeviceProp::globalL1CacheSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, globalL1CacheSupported) - 612usize];
    ["Offset of field: cudaDeviceProp::localL1CacheSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, localL1CacheSupported) - 616usize];
    ["Offset of field: cudaDeviceProp::sharedMemPerMultiprocessor"]
        [::core::mem::offset_of!(cudaDeviceProp, sharedMemPerMultiprocessor) - 624usize];
    ["Offset of field: cudaDeviceProp::regsPerMultiprocessor"]
        [::core::mem::offset_of!(cudaDeviceProp, regsPerMultiprocessor) - 632usize];
    ["Offset of field: cudaDeviceProp::managedMemory"]
        [::core::mem::offset_of!(cudaDeviceProp, managedMemory) - 636usize];
    ["Offset of field: cudaDeviceProp::isMultiGpuBoard"]
        [::core::mem::offset_of!(cudaDeviceProp, isMultiGpuBoard) - 640usize];
    ["Offset of field: cudaDeviceProp::multiGpuBoardGroupID"]
        [::core::mem::offset_of!(cudaDeviceProp, multiGpuBoardGroupID) - 644usize];
    ["Offset of field: cudaDeviceProp::hostNativeAtomicSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, hostNativeAtomicSupported) - 648usize];
    ["Offset of field: cudaDeviceProp::pageableMemoryAccess"]
        [::core::mem::offset_of!(cudaDeviceProp, pageableMemoryAccess) - 652usize];
    ["Offset of field: cudaDeviceProp::concurrentManagedAccess"]
        [::core::mem::offset_of!(cudaDeviceProp, concurrentManagedAccess) - 656usize];
    ["Offset of field: cudaDeviceProp::computePreemptionSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, computePreemptionSupported) - 660usize];
    ["Offset of field: cudaDeviceProp::canUseHostPointerForRegisteredMem"]
        [::core::mem::offset_of!(cudaDeviceProp, canUseHostPointerForRegisteredMem) - 664usize];
    ["Offset of field: cudaDeviceProp::cooperativeLaunch"]
        [::core::mem::offset_of!(cudaDeviceProp, cooperativeLaunch) - 668usize];
    ["Offset of field: cudaDeviceProp::sharedMemPerBlockOptin"]
        [::core::mem::offset_of!(cudaDeviceProp, sharedMemPerBlockOptin) - 672usize];
    ["Offset of field: cudaDeviceProp::pageableMemoryAccessUsesHostPageTables"][::core::mem::offset_of!(
        cudaDeviceProp,
        pageableMemoryAccessUsesHostPageTables
    ) - 680usize];
    ["Offset of field: cudaDeviceProp::directManagedMemAccessFromHost"]
        [::core::mem::offset_of!(cudaDeviceProp, directManagedMemAccessFromHost) - 684usize];
    ["Offset of field: cudaDeviceProp::maxBlocksPerMultiProcessor"]
        [::core::mem::offset_of!(cudaDeviceProp, maxBlocksPerMultiProcessor) - 688usize];
    ["Offset of field: cudaDeviceProp::accessPolicyMaxWindowSize"]
        [::core::mem::offset_of!(cudaDeviceProp, accessPolicyMaxWindowSize) - 692usize];
    ["Offset of field: cudaDeviceProp::reservedSharedMemPerBlock"]
        [::core::mem::offset_of!(cudaDeviceProp, reservedSharedMemPerBlock) - 696usize];
    ["Offset of field: cudaDeviceProp::hostRegisterSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, hostRegisterSupported) - 704usize];
    ["Offset of field: cudaDeviceProp::sparseCudaArraySupported"]
        [::core::mem::offset_of!(cudaDeviceProp, sparseCudaArraySupported) - 708usize];
    ["Offset of field: cudaDeviceProp::hostRegisterReadOnlySupported"]
        [::core::mem::offset_of!(cudaDeviceProp, hostRegisterReadOnlySupported) - 712usize];
    ["Offset of field: cudaDeviceProp::timelineSemaphoreInteropSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, timelineSemaphoreInteropSupported) - 716usize];
    ["Offset of field: cudaDeviceProp::memoryPoolsSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, memoryPoolsSupported) - 720usize];
    ["Offset of field: cudaDeviceProp::gpuDirectRDMASupported"]
        [::core::mem::offset_of!(cudaDeviceProp, gpuDirectRDMASupported) - 724usize];
    ["Offset of field: cudaDeviceProp::gpuDirectRDMAFlushWritesOptions"]
        [::core::mem::offset_of!(cudaDeviceProp, gpuDirectRDMAFlushWritesOptions) - 728usize];
    ["Offset of field: cudaDeviceProp::gpuDirectRDMAWritesOrdering"]
        [::core::mem::offset_of!(cudaDeviceProp, gpuDirectRDMAWritesOrdering) - 732usize];
    ["Offset of field: cudaDeviceProp::memoryPoolSupportedHandleTypes"]
        [::core::mem::offset_of!(cudaDeviceProp, memoryPoolSupportedHandleTypes) - 736usize];
    ["Offset of field: cudaDeviceProp::deferredMappingCudaArraySupported"]
        [::core::mem::offset_of!(cudaDeviceProp, deferredMappingCudaArraySupported) - 740usize];
    ["Offset of field: cudaDeviceProp::ipcEventSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, ipcEventSupported) - 744usize];
    ["Offset of field: cudaDeviceProp::clusterLaunch"]
        [::core::mem::offset_of!(cudaDeviceProp, clusterLaunch) - 748usize];
    ["Offset of field: cudaDeviceProp::unifiedFunctionPointers"]
        [::core::mem::offset_of!(cudaDeviceProp, unifiedFunctionPointers) - 752usize];
    ["Offset of field: cudaDeviceProp::deviceNumaConfig"]
        [::core::mem::offset_of!(cudaDeviceProp, deviceNumaConfig) - 756usize];
    ["Offset of field: cudaDeviceProp::deviceNumaId"]
        [::core::mem::offset_of!(cudaDeviceProp, deviceNumaId) - 760usize];
    ["Offset of field: cudaDeviceProp::mpsEnabled"]
        [::core::mem::offset_of!(cudaDeviceProp, mpsEnabled) - 764usize];
    ["Offset of field: cudaDeviceProp::hostNumaId"]
        [::core::mem::offset_of!(cudaDeviceProp, hostNumaId) - 768usize];
    ["Offset of field: cudaDeviceProp::gpuPciDeviceID"]
        [::core::mem::offset_of!(cudaDeviceProp, gpuPciDeviceID) - 772usize];
    ["Offset of field: cudaDeviceProp::gpuPciSubsystemID"]
        [::core::mem::offset_of!(cudaDeviceProp, gpuPciSubsystemID) - 776usize];
    ["Offset of field: cudaDeviceProp::hostNumaMultinodeIpcSupported"]
        [::core::mem::offset_of!(cudaDeviceProp, hostNumaMultinodeIpcSupported) - 780usize];
    ["Offset of field: cudaDeviceProp::reserved"]
        [::core::mem::offset_of!(cudaDeviceProp, reserved) - 784usize];
};
#[doc = " CUDA IPC event handle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaIpcEventHandle_st {
    pub reserved: [::core::ffi::c_char; 64usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaIpcEventHandle_st"][::core::mem::size_of::<cudaIpcEventHandle_st>() - 64usize];
    ["Alignment of cudaIpcEventHandle_st"]
        [::core::mem::align_of::<cudaIpcEventHandle_st>() - 1usize];
    ["Offset of field: cudaIpcEventHandle_st::reserved"]
        [::core::mem::offset_of!(cudaIpcEventHandle_st, reserved) - 0usize];
};
#[doc = " CUDA IPC event handle"]
pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st;
#[doc = " CUDA IPC memory handle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaIpcMemHandle_st {
    pub reserved: [::core::ffi::c_char; 64usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaIpcMemHandle_st"][::core::mem::size_of::<cudaIpcMemHandle_st>() - 64usize];
    ["Alignment of cudaIpcMemHandle_st"][::core::mem::align_of::<cudaIpcMemHandle_st>() - 1usize];
    ["Offset of field: cudaIpcMemHandle_st::reserved"]
        [::core::mem::offset_of!(cudaIpcMemHandle_st, reserved) - 0usize];
};
#[doc = " CUDA IPC memory handle"]
pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaMemFabricHandle_st {
    pub reserved: [::core::ffi::c_char; 64usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaMemFabricHandle_st"][::core::mem::size_of::<cudaMemFabricHandle_st>() - 64usize];
    ["Alignment of cudaMemFabricHandle_st"]
        [::core::mem::align_of::<cudaMemFabricHandle_st>() - 1usize];
    ["Offset of field: cudaMemFabricHandle_st::reserved"]
        [::core::mem::offset_of!(cudaMemFabricHandle_st, reserved) - 0usize];
};
pub type cudaMemFabricHandle_t = cudaMemFabricHandle_st;
#[repr(u32)]
#[doc = " External memory handle types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaExternalMemoryHandleType {
    #[doc = " Handle is an opaque file descriptor"]
    cudaExternalMemoryHandleTypeOpaqueFd = 1,
    #[doc = " Handle is an opaque shared NT handle"]
    cudaExternalMemoryHandleTypeOpaqueWin32 = 2,
    #[doc = " Handle is an opaque, globally shared handle"]
    cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3,
    #[doc = " Handle is a D3D12 heap object"]
    cudaExternalMemoryHandleTypeD3D12Heap = 4,
    #[doc = " Handle is a D3D12 committed resource"]
    cudaExternalMemoryHandleTypeD3D12Resource = 5,
    #[doc = "  Handle is a shared NT handle to a D3D11 resource"]
    cudaExternalMemoryHandleTypeD3D11Resource = 6,
    #[doc = "  Handle is a globally shared handle to a D3D11 resource"]
    cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7,
    #[doc = "  Handle is an NvSciBuf object"]
    cudaExternalMemoryHandleTypeNvSciBuf = 8,
}
#[doc = " External memory handle descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaExternalMemoryHandleDesc {
    #[doc = " Type of the handle"]
    pub type_: cudaExternalMemoryHandleType,
    pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1,
    #[doc = " Size of the memory allocation"]
    pub size: ::core::ffi::c_ulonglong,
    #[doc = " Flags must either be zero or ::cudaExternalMemoryDedicated"]
    pub flags: ::core::ffi::c_uint,
    #[doc = " Must be zero"]
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 {
    #[doc = " File descriptor referencing the memory object. Valid\n when type is\n ::cudaExternalMemoryHandleTypeOpaqueFd"]
    pub fd: ::core::ffi::c_int,
    pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
    #[doc = " A handle representing NvSciBuf Object. Valid when type\n is ::cudaExternalMemoryHandleTypeNvSciBuf"]
    pub nvSciBufObject: *const ::core::ffi::c_void,
}
#[doc = " Win32 handle referencing the semaphore object. Valid when\n type is one of the following:\n - ::cudaExternalMemoryHandleTypeOpaqueWin32\n - ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt\n - ::cudaExternalMemoryHandleTypeD3D12Heap\n - ::cudaExternalMemoryHandleTypeD3D12Resource\n - ::cudaExternalMemoryHandleTypeD3D11Resource\n - ::cudaExternalMemoryHandleTypeD3D11ResourceKmt\n Exactly one of 'handle' and 'name' must be non-NULL. If\n type is one of the following:\n ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt\n ::cudaExternalMemoryHandleTypeD3D11ResourceKmt\n then 'name' must be NULL."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
    pub handle: *mut ::core::ffi::c_void,
    #[doc = " Name of a valid memory object.\n Must be NULL if 'handle' is non-NULL."]
    pub name: *const ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1"][::core::mem::size_of::<
        cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
    >() - 16usize];
    ["Alignment of cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1"][::core::mem::align_of::<
        cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
    >() - 8usize];
    ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1::handle"][::core::mem::offset_of!(
        cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
        handle
    )
        - 0usize];
    ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1::name"][::core::mem::offset_of!(
        cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
        name
    ) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalMemoryHandleDesc__bindgen_ty_1"]
        [::core::mem::size_of::<cudaExternalMemoryHandleDesc__bindgen_ty_1>() - 16usize];
    ["Alignment of cudaExternalMemoryHandleDesc__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalMemoryHandleDesc__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1::fd"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc__bindgen_ty_1, fd) - 0usize];
    ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1::win32"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc__bindgen_ty_1, win32) - 0usize];
    ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1::nvSciBufObject"][::core::mem::offset_of!(
        cudaExternalMemoryHandleDesc__bindgen_ty_1,
        nvSciBufObject
    ) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalMemoryHandleDesc"]
        [::core::mem::size_of::<cudaExternalMemoryHandleDesc>() - 104usize];
    ["Alignment of cudaExternalMemoryHandleDesc"]
        [::core::mem::align_of::<cudaExternalMemoryHandleDesc>() - 8usize];
    ["Offset of field: cudaExternalMemoryHandleDesc::type_"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc, type_) - 0usize];
    ["Offset of field: cudaExternalMemoryHandleDesc::handle"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc, handle) - 8usize];
    ["Offset of field: cudaExternalMemoryHandleDesc::size"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc, size) - 24usize];
    ["Offset of field: cudaExternalMemoryHandleDesc::flags"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc, flags) - 32usize];
    ["Offset of field: cudaExternalMemoryHandleDesc::reserved"]
        [::core::mem::offset_of!(cudaExternalMemoryHandleDesc, reserved) - 36usize];
};
#[doc = " External memory buffer descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalMemoryBufferDesc {
    #[doc = " Offset into the memory object where the buffer's base is"]
    pub offset: ::core::ffi::c_ulonglong,
    #[doc = " Size of the buffer"]
    pub size: ::core::ffi::c_ulonglong,
    #[doc = " Flags reserved for future use. Must be zero."]
    pub flags: ::core::ffi::c_uint,
    #[doc = " Must be zero"]
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalMemoryBufferDesc"]
        [::core::mem::size_of::<cudaExternalMemoryBufferDesc>() - 88usize];
    ["Alignment of cudaExternalMemoryBufferDesc"]
        [::core::mem::align_of::<cudaExternalMemoryBufferDesc>() - 8usize];
    ["Offset of field: cudaExternalMemoryBufferDesc::offset"]
        [::core::mem::offset_of!(cudaExternalMemoryBufferDesc, offset) - 0usize];
    ["Offset of field: cudaExternalMemoryBufferDesc::size"]
        [::core::mem::offset_of!(cudaExternalMemoryBufferDesc, size) - 8usize];
    ["Offset of field: cudaExternalMemoryBufferDesc::flags"]
        [::core::mem::offset_of!(cudaExternalMemoryBufferDesc, flags) - 16usize];
    ["Offset of field: cudaExternalMemoryBufferDesc::reserved"]
        [::core::mem::offset_of!(cudaExternalMemoryBufferDesc, reserved) - 20usize];
};
#[doc = " External memory mipmap descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalMemoryMipmappedArrayDesc {
    #[doc = " Offset into the memory object where the base level of the\n mipmap chain is."]
    pub offset: ::core::ffi::c_ulonglong,
    #[doc = " Format of base level of the mipmap chain"]
    pub formatDesc: cudaChannelFormatDesc,
    #[doc = " Dimensions of base level of the mipmap chain"]
    pub extent: cudaExtent,
    #[doc = " Flags associated with CUDA mipmapped arrays.\n See ::cudaMallocMipmappedArray"]
    pub flags: ::core::ffi::c_uint,
    #[doc = " Total number of levels in the mipmap chain"]
    pub numLevels: ::core::ffi::c_uint,
    #[doc = " Must be zero"]
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalMemoryMipmappedArrayDesc"]
        [::core::mem::size_of::<cudaExternalMemoryMipmappedArrayDesc>() - 128usize];
    ["Alignment of cudaExternalMemoryMipmappedArrayDesc"]
        [::core::mem::align_of::<cudaExternalMemoryMipmappedArrayDesc>() - 8usize];
    ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::offset"]
        [::core::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, offset) - 0usize];
    ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::formatDesc"]
        [::core::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, formatDesc) - 8usize];
    ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::extent"]
        [::core::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, extent) - 32usize];
    ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::flags"]
        [::core::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, flags) - 56usize];
    ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::numLevels"]
        [::core::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, numLevels) - 60usize];
    ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::reserved"]
        [::core::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, reserved) - 64usize];
};
#[repr(u32)]
#[doc = " External semaphore handle types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaExternalSemaphoreHandleType {
    #[doc = " Handle is an opaque file descriptor"]
    cudaExternalSemaphoreHandleTypeOpaqueFd = 1,
    #[doc = " Handle is an opaque shared NT handle"]
    cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2,
    #[doc = " Handle is an opaque, globally shared handle"]
    cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,
    #[doc = " Handle is a shared NT handle referencing a D3D12 fence object"]
    cudaExternalSemaphoreHandleTypeD3D12Fence = 4,
    #[doc = " Handle is a shared NT handle referencing a D3D11 fence object"]
    cudaExternalSemaphoreHandleTypeD3D11Fence = 5,
    #[doc = " Opaque handle to NvSciSync Object"]
    cudaExternalSemaphoreHandleTypeNvSciSync = 6,
    #[doc = " Handle is a shared NT handle referencing a D3D11 keyed mutex object"]
    cudaExternalSemaphoreHandleTypeKeyedMutex = 7,
    #[doc = " Handle is a shared KMT handle referencing a D3D11 keyed mutex object"]
    cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8,
    #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"]
    cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9,
    #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"]
    cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10,
}
#[doc = " External semaphore handle descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaExternalSemaphoreHandleDesc {
    #[doc = " Type of the handle"]
    pub type_: cudaExternalSemaphoreHandleType,
    pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1,
    #[doc = " Flags reserved for the future. Must be zero."]
    pub flags: ::core::ffi::c_uint,
    #[doc = " Must be zero"]
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 {
    #[doc = " File descriptor referencing the semaphore object. Valid when\n type is one of the following:\n - ::cudaExternalSemaphoreHandleTypeOpaqueFd\n - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd"]
    pub fd: ::core::ffi::c_int,
    pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
    #[doc = " Valid NvSciSyncObj. Must be non NULL"]
    pub nvSciSyncObj: *const ::core::ffi::c_void,
}
#[doc = " Win32 handle referencing the semaphore object. Valid when\n type is one of the following:\n - ::cudaExternalSemaphoreHandleTypeOpaqueWin32\n - ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\n - ::cudaExternalSemaphoreHandleTypeD3D12Fence\n - ::cudaExternalSemaphoreHandleTypeD3D11Fence\n - ::cudaExternalSemaphoreHandleTypeKeyedMutex\n - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32\n Exactly one of 'handle' and 'name' must be non-NULL. If\n type is one of the following:\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt\n then 'name' must be NULL."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
    pub handle: *mut ::core::ffi::c_void,
    #[doc = " Name of a valid synchronization primitive.\n Must be NULL if 'handle' is non-NULL."]
    pub name: *const ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1"][::core::mem::size_of::<
        cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
    >() - 16usize];
    ["Alignment of cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1::handle"][::core::mem::offset_of!(
        cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
        handle
    )
        - 0usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1::name"][::core::mem::offset_of!(
        cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
        name
    )
        - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreHandleDesc__bindgen_ty_1"]
        [::core::mem::size_of::<cudaExternalSemaphoreHandleDesc__bindgen_ty_1>() - 16usize];
    ["Alignment of cudaExternalSemaphoreHandleDesc__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalSemaphoreHandleDesc__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1::fd"]
        [::core::mem::offset_of!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1, fd) - 0usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1::win32"]
        [::core::mem::offset_of!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1, win32) - 0usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1::nvSciSyncObj"][::core::mem::offset_of!(
        cudaExternalSemaphoreHandleDesc__bindgen_ty_1,
        nvSciSyncObj
    ) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreHandleDesc"]
        [::core::mem::size_of::<cudaExternalSemaphoreHandleDesc>() - 96usize];
    ["Alignment of cudaExternalSemaphoreHandleDesc"]
        [::core::mem::align_of::<cudaExternalSemaphoreHandleDesc>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc::type_"]
        [::core::mem::offset_of!(cudaExternalSemaphoreHandleDesc, type_) - 0usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc::handle"]
        [::core::mem::offset_of!(cudaExternalSemaphoreHandleDesc, handle) - 8usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc::flags"]
        [::core::mem::offset_of!(cudaExternalSemaphoreHandleDesc, flags) - 24usize];
    ["Offset of field: cudaExternalSemaphoreHandleDesc::reserved"]
        [::core::mem::offset_of!(cudaExternalSemaphoreHandleDesc, reserved) - 28usize];
};
#[doc = " External semaphore signal parameters, compatible with driver type"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaExternalSemaphoreSignalParams {
    pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1,
    #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to\n signal a ::cudaExternalSemaphore_t of type\n ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates\n that while signaling the ::cudaExternalSemaphore_t, no memory\n synchronization operations should be performed for any external memory\n object imported as ::cudaExternalMemoryHandleTypeNvSciBuf.\n For all other types of ::cudaExternalSemaphore_t, flags must be zero."]
    pub flags: ::core::ffi::c_uint,
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 {
    pub fence: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1,
    pub nvSciSync: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
    pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3,
    pub reserved: [::core::ffi::c_uint; 12usize],
}
#[doc = " Parameters for fence objects"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Value of fence to be signaled"]
    pub value: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1"][::core::mem::size_of::<
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1,
    >() - 8usize];
    ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1::value"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1,
        value
    )
        - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 {
    #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType\n is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."]
    pub fence: *mut ::core::ffi::c_void,
    pub reserved: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2"][::core::mem::size_of::<
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
    >() - 8usize];
    ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2::fence"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
        fence
    )
        - 0usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2::reserved"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
        reserved
    )
        - 0usize];
};
#[doc = " Parameters for keyed mutex objects"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 {
    pub key: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3"][::core::mem::size_of::<
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3,
    >() - 8usize];
    ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3::key"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3,
        key
    )
        - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1"]
        [::core::mem::size_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1>() - 72usize];
    ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::fence"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalParams__bindgen_ty_1, fence) - 0usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::nvSciSync"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1,
        nvSciSync
    ) - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::keyedMutex"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1,
        keyedMutex
    ) - 16usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::reserved"][::core::mem::offset_of!(
        cudaExternalSemaphoreSignalParams__bindgen_ty_1,
        reserved
    ) - 24usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalParams"]
        [::core::mem::size_of::<cudaExternalSemaphoreSignalParams>() - 144usize];
    ["Alignment of cudaExternalSemaphoreSignalParams"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalParams>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams::params"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalParams, params) - 0usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams::flags"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalParams, flags) - 72usize];
    ["Offset of field: cudaExternalSemaphoreSignalParams::reserved"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalParams, reserved) - 76usize];
};
#[doc = " External semaphore wait parameters, compatible with driver type"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaExternalSemaphoreWaitParams {
    pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1,
    #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to\n signal a ::cudaExternalSemaphore_t of type\n ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates\n that while waiting for the ::cudaExternalSemaphore_t, no memory\n synchronization operations should be performed for any external memory\n object imported as ::cudaExternalMemoryHandleTypeNvSciBuf.\n For all other types of ::cudaExternalSemaphore_t, flags must be zero."]
    pub flags: ::core::ffi::c_uint,
    pub reserved: [::core::ffi::c_uint; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 {
    pub fence: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1,
    pub nvSciSync: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
    pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
    pub reserved: [::core::ffi::c_uint; 10usize],
}
#[doc = " Parameters for fence objects"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Value of fence to be waited on"]
    pub value: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1"][::core::mem::size_of::<
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1,
    >() - 8usize];
    ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1::value"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1,
        value
    )
        - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 {
    #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType\n is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."]
    pub fence: *mut ::core::ffi::c_void,
    pub reserved: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2"][::core::mem::size_of::<
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
    >() - 8usize];
    ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2::fence"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
        fence
    )
        - 0usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2::reserved"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
        reserved
    )
        - 0usize];
};
#[doc = " Parameters for keyed mutex objects"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 {
    #[doc = " Value of key to acquire the mutex with"]
    pub key: ::core::ffi::c_ulonglong,
    #[doc = " Timeout in milliseconds to wait to acquire the mutex"]
    pub timeoutMs: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3"][::core::mem::size_of::<
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
    >() - 16usize];
    ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3>()
            - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3::key"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
        key
    )
        - 0usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3::timeoutMs"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
        timeoutMs
    )
        - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1"]
        [::core::mem::size_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1>() - 72usize];
    ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::fence"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitParams__bindgen_ty_1, fence) - 0usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::nvSciSync"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1,
        nvSciSync
    ) - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::keyedMutex"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1,
        keyedMutex
    ) - 16usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::reserved"][::core::mem::offset_of!(
        cudaExternalSemaphoreWaitParams__bindgen_ty_1,
        reserved
    ) - 32usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitParams"]
        [::core::mem::size_of::<cudaExternalSemaphoreWaitParams>() - 144usize];
    ["Alignment of cudaExternalSemaphoreWaitParams"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitParams>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams::params"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitParams, params) - 0usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams::flags"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitParams, flags) - 72usize];
    ["Offset of field: cudaExternalSemaphoreWaitParams::reserved"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitParams, reserved) - 76usize];
};
#[doc = " CUDA Error types"]
pub use self::cudaError as cudaError_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUstream_st {
    _unused: [u8; 0],
}
#[doc = " CUDA stream"]
pub type cudaStream_t = *mut CUstream_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUevent_st {
    _unused: [u8; 0],
}
#[doc = " CUDA event types"]
pub type cudaEvent_t = *mut CUevent_st;
#[doc = " CUDA graphics resource types"]
pub type cudaGraphicsResource_t = *mut cudaGraphicsResource;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUexternalMemory_st {
    _unused: [u8; 0],
}
#[doc = " CUDA external memory"]
pub type cudaExternalMemory_t = *mut CUexternalMemory_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUexternalSemaphore_st {
    _unused: [u8; 0],
}
#[doc = " CUDA external semaphore"]
pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraph_st {
    _unused: [u8; 0],
}
#[doc = " CUDA graph"]
pub type cudaGraph_t = *mut CUgraph_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphNode_st {
    _unused: [u8; 0],
}
#[doc = " CUDA graph node."]
pub type cudaGraphNode_t = *mut CUgraphNode_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUuserObject_st {
    _unused: [u8; 0],
}
#[doc = " CUDA user object for graphs"]
pub type cudaUserObject_t = *mut CUuserObject_st;
#[doc = " CUDA handle for conditional graph nodes"]
pub type cudaGraphConditionalHandle = ::core::ffi::c_ulonglong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUfunc_st {
    _unused: [u8; 0],
}
#[doc = " CUDA function"]
pub type cudaFunction_t = *mut CUfunc_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUkern_st {
    _unused: [u8; 0],
}
#[doc = " CUDA kernel"]
pub type cudaKernel_t = *mut CUkern_st;
#[repr(u32)]
#[doc = " Online compiler and linker options"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaJitOption {
    #[doc = " Max number of registers that a thread may use.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
    cudaJitMaxRegisters = 0,
    #[doc = " IN: Specifies minimum number of threads per block to target compilation\n for\\n\n OUT: Returns the number of threads the compiler actually targeted.\n This restricts the resource utilization of the compiler (e.g. max\n registers) such that a block with the given number of threads should be\n able to launch based on register limitations. Note, this option does not\n currently take into account any other resource limitations, such as\n shared memory utilization.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
    cudaJitThreadsPerBlock = 1,
    #[doc = " Overwrites the option value with the total wall clock time, in\n milliseconds, spent in the compiler and linker\\n\n Option type: float\\n\n Applies to: compiler and linker"]
    cudaJitWallTime = 2,
    #[doc = " Pointer to a buffer in which to print any log messages\n that are informational in nature (the buffer size is specified via\n option ::cudaJitInfoLogBufferSizeBytes)\\n\n Option type: char *\\n\n Applies to: compiler and linker"]
    cudaJitInfoLogBuffer = 3,
    #[doc = " IN: Log buffer size in bytes.  Log messages will be capped at this size\n (including null terminator)\\n\n OUT: Amount of log buffer filled with messages\\n\n Option type: unsigned int\\n\n Applies to: compiler and linker"]
    cudaJitInfoLogBufferSizeBytes = 4,
    #[doc = " Pointer to a buffer in which to print any log messages that\n reflect errors (the buffer size is specified via option\n ::cudaJitErrorLogBufferSizeBytes)\\n\n Option type: char *\\n\n Applies to: compiler and linker"]
    cudaJitErrorLogBuffer = 5,
    #[doc = " IN: Log buffer size in bytes.  Log messages will be capped at this size\n (including null terminator)\\n\n OUT: Amount of log buffer filled with messages\\n\n Option type: unsigned int\\n\n Applies to: compiler and linker"]
    cudaJitErrorLogBufferSizeBytes = 6,
    #[doc = " Level of optimizations to apply to generated code (0 - 4), with 4\n being the default and highest level of optimizations.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
    cudaJitOptimizationLevel = 7,
    #[doc = " Specifies choice of fallback strategy if matching cubin is not found.\n Choice is based on supplied ::cudaJit_Fallback.\n Option type: unsigned int for enumerated type ::cudaJit_Fallback\\n\n Applies to: compiler only"]
    cudaJitFallbackStrategy = 10,
    #[doc = " Specifies whether to create debug information in output (-g)\n (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler and linker"]
    cudaJitGenerateDebugInfo = 11,
    #[doc = " Generate verbose log messages (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler and linker"]
    cudaJitLogVerbose = 12,
    #[doc = " Generate line number information (-lineinfo) (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler only"]
    cudaJitGenerateLineInfo = 13,
    #[doc = " Specifies whether to enable caching explicitly (-dlcm) \\n\n Choice is based on supplied ::cudaJit_CacheMode.\\n\n Option type: unsigned int for enumerated type ::cudaJit_CacheMode\\n\n Applies to: compiler only"]
    cudaJitCacheMode = 14,
    #[doc = " Generate position independent code (0: false)\\n\n Option type: int\\n\n Applies to: compiler only"]
    cudaJitPositionIndependentCode = 30,
    #[doc = " This option hints to the JIT compiler the minimum number of CTAs from the\n kernel’s grid to be mapped to a SM. This option is ignored when used together\n with ::cudaJitMaxRegisters or ::cudaJitThreadsPerBlock.\n Optimizations based on this option need ::cudaJitMaxThreadsPerBlock to\n be specified as well. For kernels already using PTX directive .minnctapersm,\n this option will be ignored by default. Use ::cudaJitOverrideDirectiveValues\n to let this option take precedence over the PTX directive.\n Option type: unsigned int\\n\n Applies to: compiler only"]
    cudaJitMinCtaPerSm = 31,
    #[doc = " Maximum number threads in a thread block, computed as the product of\n the maximum extent specifed for each dimension of the block. This limit\n is guaranteed not to be exeeded in any invocation of the kernel. Exceeding\n the the maximum number of threads results in runtime error or kernel launch\n failure. For kernels already using PTX directive .maxntid, this option will\n be ignored by default. Use ::cudaJitOverrideDirectiveValues to let this\n option take precedence over the PTX directive.\n Option type: int\\n\n Applies to: compiler only"]
    cudaJitMaxThreadsPerBlock = 32,
    #[doc = " This option lets the values specified using ::cudaJitMaxRegisters,\n ::cudaJitThreadsPerBlock, ::cudaJitMaxThreadsPerBlock and\n ::cudaJitMinCtaPerSm take precedence over any PTX directives.\n (0: Disable, default; 1: Enable)\n Option type: int\\n\n Applies to: compiler only"]
    cudaJitOverrideDirectiveValues = 33,
}
#[repr(u32)]
#[doc = " Library options to be specified with ::cudaLibraryLoadData() or ::cudaLibraryLoadFromFile()"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaLibraryOption {
    cudaLibraryHostUniversalFunctionAndDataTable = 0,
    #[doc = " Specifes that the argument \\p code passed to ::cudaLibraryLoadData() will be preserved.\n Specifying this option will let the driver know that \\p code can be accessed at any point\n until ::cudaLibraryUnload(). The default behavior is for the driver to allocate and\n maintain its own copy of \\p code. Note that this is only a memory usage optimization\n hint and the driver can choose to ignore it if required.\n Specifying this option with ::cudaLibraryLoadFromFile() is invalid and\n will return ::cudaErrorInvalidValue."]
    cudaLibraryBinaryIsPreserved = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudalibraryHostUniversalFunctionAndDataTable {
    pub functionTable: *mut ::core::ffi::c_void,
    pub functionWindowSize: usize,
    pub dataTable: *mut ::core::ffi::c_void,
    pub dataWindowSize: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudalibraryHostUniversalFunctionAndDataTable"]
        [::core::mem::size_of::<cudalibraryHostUniversalFunctionAndDataTable>() - 32usize];
    ["Alignment of cudalibraryHostUniversalFunctionAndDataTable"]
        [::core::mem::align_of::<cudalibraryHostUniversalFunctionAndDataTable>() - 8usize];
    ["Offset of field: cudalibraryHostUniversalFunctionAndDataTable::functionTable"][::core::mem::offset_of!(
        cudalibraryHostUniversalFunctionAndDataTable,
        functionTable
    ) - 0usize];
    ["Offset of field: cudalibraryHostUniversalFunctionAndDataTable::functionWindowSize"][::core::mem::offset_of!(
        cudalibraryHostUniversalFunctionAndDataTable,
        functionWindowSize
    )
        - 8usize];
    ["Offset of field: cudalibraryHostUniversalFunctionAndDataTable::dataTable"][::core::mem::offset_of!(
        cudalibraryHostUniversalFunctionAndDataTable,
        dataTable
    ) - 16usize];
    ["Offset of field: cudalibraryHostUniversalFunctionAndDataTable::dataWindowSize"][::core::mem::offset_of!(
        cudalibraryHostUniversalFunctionAndDataTable,
        dataWindowSize
    ) - 24usize];
};
#[repr(u32)]
#[doc = " Caching modes for dlcm"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaJit_CacheMode {
    #[doc = "< Compile with no -dlcm flag specified"]
    cudaJitCacheOptionNone = 0,
    #[doc = "< Compile with L1 cache disabled"]
    cudaJitCacheOptionCG = 1,
    #[doc = "< Compile with L1 cache enabled"]
    cudaJitCacheOptionCA = 2,
}
#[repr(u32)]
#[doc = " Cubin matching fallback strategies"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaJit_Fallback {
    #[doc = "< Prefer to compile ptx if exact binary match not found"]
    cudaPreferPtx = 0,
    #[doc = "< Prefer to fall back to compatible binary code if exact match not found"]
    cudaPreferBinary = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUlib_st {
    _unused: [u8; 0],
}
#[doc = " CUDA library"]
pub type cudaLibrary_t = *mut CUlib_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUmemPoolHandle_st {
    _unused: [u8; 0],
}
#[doc = " CUDA memory pool"]
pub type cudaMemPool_t = *mut CUmemPoolHandle_st;
#[repr(u32)]
#[doc = " CUDA cooperative group scope"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaCGScope {
    #[doc = "< Invalid cooperative group scope"]
    cudaCGScopeInvalid = 0,
    #[doc = "< Scope represented by a grid_group"]
    cudaCGScopeGrid = 1,
    #[doc = "< Reserved"]
    cudaCGScopeReserved = 2,
}
#[doc = " CUDA GPU kernel node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaKernelNodeParams {
    #[doc = "< Kernel to launch"]
    pub func: *mut ::core::ffi::c_void,
    #[doc = "< Grid dimensions"]
    pub gridDim: dim3,
    #[doc = "< Block dimensions"]
    pub blockDim: dim3,
    #[doc = "< Dynamic shared-memory size per thread block in bytes"]
    pub sharedMemBytes: ::core::ffi::c_uint,
    #[doc = "< Array of pointers to individual kernel arguments"]
    pub kernelParams: *mut *mut ::core::ffi::c_void,
    #[doc = "< Pointer to kernel arguments in the \"extra\" format"]
    pub extra: *mut *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaKernelNodeParams"][::core::mem::size_of::<cudaKernelNodeParams>() - 56usize];
    ["Alignment of cudaKernelNodeParams"][::core::mem::align_of::<cudaKernelNodeParams>() - 8usize];
    ["Offset of field: cudaKernelNodeParams::func"]
        [::core::mem::offset_of!(cudaKernelNodeParams, func) - 0usize];
    ["Offset of field: cudaKernelNodeParams::gridDim"]
        [::core::mem::offset_of!(cudaKernelNodeParams, gridDim) - 8usize];
    ["Offset of field: cudaKernelNodeParams::blockDim"]
        [::core::mem::offset_of!(cudaKernelNodeParams, blockDim) - 20usize];
    ["Offset of field: cudaKernelNodeParams::sharedMemBytes"]
        [::core::mem::offset_of!(cudaKernelNodeParams, sharedMemBytes) - 32usize];
    ["Offset of field: cudaKernelNodeParams::kernelParams"]
        [::core::mem::offset_of!(cudaKernelNodeParams, kernelParams) - 40usize];
    ["Offset of field: cudaKernelNodeParams::extra"]
        [::core::mem::offset_of!(cudaKernelNodeParams, extra) - 48usize];
};
#[doc = " CUDA GPU kernel node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaKernelNodeParamsV2 {
    #[doc = "< Kernel to launch"]
    pub func: *mut ::core::ffi::c_void,
    #[doc = "< Grid dimensions"]
    pub gridDim: dim3,
    #[doc = "< Block dimensions"]
    pub blockDim: dim3,
    #[doc = "< Dynamic shared-memory size per thread block in bytes"]
    pub sharedMemBytes: ::core::ffi::c_uint,
    #[doc = "< Array of pointers to individual kernel arguments"]
    pub kernelParams: *mut *mut ::core::ffi::c_void,
    #[doc = "< Pointer to kernel arguments in the \"extra\" format"]
    pub extra: *mut *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaKernelNodeParamsV2"][::core::mem::size_of::<cudaKernelNodeParamsV2>() - 56usize];
    ["Alignment of cudaKernelNodeParamsV2"]
        [::core::mem::align_of::<cudaKernelNodeParamsV2>() - 8usize];
    ["Offset of field: cudaKernelNodeParamsV2::func"]
        [::core::mem::offset_of!(cudaKernelNodeParamsV2, func) - 0usize];
    ["Offset of field: cudaKernelNodeParamsV2::gridDim"]
        [::core::mem::offset_of!(cudaKernelNodeParamsV2, gridDim) - 8usize];
    ["Offset of field: cudaKernelNodeParamsV2::blockDim"]
        [::core::mem::offset_of!(cudaKernelNodeParamsV2, blockDim) - 20usize];
    ["Offset of field: cudaKernelNodeParamsV2::sharedMemBytes"]
        [::core::mem::offset_of!(cudaKernelNodeParamsV2, sharedMemBytes) - 32usize];
    ["Offset of field: cudaKernelNodeParamsV2::kernelParams"]
        [::core::mem::offset_of!(cudaKernelNodeParamsV2, kernelParams) - 40usize];
    ["Offset of field: cudaKernelNodeParamsV2::extra"]
        [::core::mem::offset_of!(cudaKernelNodeParamsV2, extra) - 48usize];
};
#[doc = " External semaphore signal node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreSignalNodeParams {
    #[doc = "< Array of external semaphore handles."]
    pub extSemArray: *mut cudaExternalSemaphore_t,
    #[doc = "< Array of external semaphore signal parameters."]
    pub paramsArray: *const cudaExternalSemaphoreSignalParams,
    #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
    pub numExtSems: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalNodeParams"]
        [::core::mem::size_of::<cudaExternalSemaphoreSignalNodeParams>() - 24usize];
    ["Alignment of cudaExternalSemaphoreSignalNodeParams"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalNodeParams>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalNodeParams::extSemArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalNodeParams, extSemArray) - 0usize];
    ["Offset of field: cudaExternalSemaphoreSignalNodeParams::paramsArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalNodeParams, paramsArray) - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalNodeParams::numExtSems"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalNodeParams, numExtSems) - 16usize];
};
#[doc = " External semaphore signal node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreSignalNodeParamsV2 {
    #[doc = "< Array of external semaphore handles."]
    pub extSemArray: *mut cudaExternalSemaphore_t,
    #[doc = "< Array of external semaphore signal parameters."]
    pub paramsArray: *const cudaExternalSemaphoreSignalParams,
    #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
    pub numExtSems: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreSignalNodeParamsV2"]
        [::core::mem::size_of::<cudaExternalSemaphoreSignalNodeParamsV2>() - 24usize];
    ["Alignment of cudaExternalSemaphoreSignalNodeParamsV2"]
        [::core::mem::align_of::<cudaExternalSemaphoreSignalNodeParamsV2>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalNodeParamsV2::extSemArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalNodeParamsV2, extSemArray) - 0usize];
    ["Offset of field: cudaExternalSemaphoreSignalNodeParamsV2::paramsArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalNodeParamsV2, paramsArray) - 8usize];
    ["Offset of field: cudaExternalSemaphoreSignalNodeParamsV2::numExtSems"]
        [::core::mem::offset_of!(cudaExternalSemaphoreSignalNodeParamsV2, numExtSems) - 16usize];
};
#[doc = " External semaphore wait node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreWaitNodeParams {
    #[doc = "< Array of external semaphore handles."]
    pub extSemArray: *mut cudaExternalSemaphore_t,
    #[doc = "< Array of external semaphore wait parameters."]
    pub paramsArray: *const cudaExternalSemaphoreWaitParams,
    #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
    pub numExtSems: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitNodeParams"]
        [::core::mem::size_of::<cudaExternalSemaphoreWaitNodeParams>() - 24usize];
    ["Alignment of cudaExternalSemaphoreWaitNodeParams"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitNodeParams>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitNodeParams::extSemArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitNodeParams, extSemArray) - 0usize];
    ["Offset of field: cudaExternalSemaphoreWaitNodeParams::paramsArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitNodeParams, paramsArray) - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitNodeParams::numExtSems"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitNodeParams, numExtSems) - 16usize];
};
#[doc = " External semaphore wait node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaExternalSemaphoreWaitNodeParamsV2 {
    #[doc = "< Array of external semaphore handles."]
    pub extSemArray: *mut cudaExternalSemaphore_t,
    #[doc = "< Array of external semaphore wait parameters."]
    pub paramsArray: *const cudaExternalSemaphoreWaitParams,
    #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
    pub numExtSems: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaExternalSemaphoreWaitNodeParamsV2"]
        [::core::mem::size_of::<cudaExternalSemaphoreWaitNodeParamsV2>() - 24usize];
    ["Alignment of cudaExternalSemaphoreWaitNodeParamsV2"]
        [::core::mem::align_of::<cudaExternalSemaphoreWaitNodeParamsV2>() - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitNodeParamsV2::extSemArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitNodeParamsV2, extSemArray) - 0usize];
    ["Offset of field: cudaExternalSemaphoreWaitNodeParamsV2::paramsArray"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitNodeParamsV2, paramsArray) - 8usize];
    ["Offset of field: cudaExternalSemaphoreWaitNodeParamsV2::numExtSems"]
        [::core::mem::offset_of!(cudaExternalSemaphoreWaitNodeParamsV2, numExtSems) - 16usize];
};
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphConditionalHandleFlags {
    #[doc = "< Apply default handle value when graph is launched."]
    cudaGraphCondAssignDefault = 1,
}
#[repr(u32)]
#[doc = " CUDA conditional node types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphConditionalNodeType {
    #[doc = "< Conditional 'if/else' Node. Body[0] executed if condition is non-zero.  If \\p size == 2, an optional ELSE graph is created and this is executed if the condition is zero."]
    cudaGraphCondTypeIf = 0,
    #[doc = "< Conditional 'while' Node. Body executed repeatedly while condition value is non-zero."]
    cudaGraphCondTypeWhile = 1,
    #[doc = "< Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value of the condition. If the condition does not match a body index, no body is launched."]
    cudaGraphCondTypeSwitch = 2,
}
#[doc = " CUDA conditional node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaConditionalNodeParams {
    #[doc = "< Conditional node handle.\nHandles must be created in advance of creating the node\nusing ::cudaGraphConditionalHandleCreate."]
    pub handle: cudaGraphConditionalHandle,
    #[doc = "< Type of conditional node."]
    pub type_: cudaGraphConditionalNodeType,
    #[doc = "< Size of graph output array.  Allowed values are 1 for cudaGraphCondTypeWhile, 1 or 2\nfor cudaGraphCondTypeIf, or any value greater than zero for cudaGraphCondTypeSwitch."]
    pub size: ::core::ffi::c_uint,
    #[doc = "< CUDA-owned array populated with conditional node child graphs during creation of the node.\nValid for the lifetime of the conditional node.\nThe contents of the graph(s) are subject to the following constraints:\n\n- Allowed node types are kernel nodes, empty nodes, child graphs, memsets,\nmemcopies, and conditionals. This applies recursively to child graphs and conditional bodies.\n- All kernels, including kernels in nested conditionals or child graphs at any level,\nmust belong to the same CUDA context.\n\nThese graphs may be populated using graph node creation APIs or ::cudaStreamBeginCaptureToGraph.\ncudaGraphCondTypeIf:\nphGraph_out[0] is executed when the condition is non-zero.  If \\p size == 2, phGraph_out[1] will\nbe executed when the condition is zero.\ncudaGraphCondTypeWhile:\nphGraph_out[0] is executed as long as the condition is non-zero.\ncudaGraphCondTypeSwitch:\nphGraph_out[n] is executed when the condition is equal to n.  If the condition >= \\p size,\nno body graph is executed."]
    pub phGraph_out: *mut cudaGraph_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaConditionalNodeParams"]
        [::core::mem::size_of::<cudaConditionalNodeParams>() - 24usize];
    ["Alignment of cudaConditionalNodeParams"]
        [::core::mem::align_of::<cudaConditionalNodeParams>() - 8usize];
    ["Offset of field: cudaConditionalNodeParams::handle"]
        [::core::mem::offset_of!(cudaConditionalNodeParams, handle) - 0usize];
    ["Offset of field: cudaConditionalNodeParams::type_"]
        [::core::mem::offset_of!(cudaConditionalNodeParams, type_) - 8usize];
    ["Offset of field: cudaConditionalNodeParams::size"]
        [::core::mem::offset_of!(cudaConditionalNodeParams, size) - 12usize];
    ["Offset of field: cudaConditionalNodeParams::phGraph_out"]
        [::core::mem::offset_of!(cudaConditionalNodeParams, phGraph_out) - 16usize];
};
#[repr(u32)]
#[doc = " CUDA Graph node types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphNodeType {
    #[doc = "< GPU kernel node"]
    cudaGraphNodeTypeKernel = 0,
    #[doc = "< Memcpy node"]
    cudaGraphNodeTypeMemcpy = 1,
    #[doc = "< Memset node"]
    cudaGraphNodeTypeMemset = 2,
    #[doc = "< Host (executable) node"]
    cudaGraphNodeTypeHost = 3,
    #[doc = "< Node which executes an embedded graph"]
    cudaGraphNodeTypeGraph = 4,
    #[doc = "< Empty (no-op) node"]
    cudaGraphNodeTypeEmpty = 5,
    #[doc = "< External event wait node"]
    cudaGraphNodeTypeWaitEvent = 6,
    #[doc = "< External event record node"]
    cudaGraphNodeTypeEventRecord = 7,
    #[doc = "< External semaphore signal node"]
    cudaGraphNodeTypeExtSemaphoreSignal = 8,
    #[doc = "< External semaphore wait node"]
    cudaGraphNodeTypeExtSemaphoreWait = 9,
    #[doc = "< Memory allocation node"]
    cudaGraphNodeTypeMemAlloc = 10,
    #[doc = "< Memory free node"]
    cudaGraphNodeTypeMemFree = 11,
    #[doc = "< Conditional node\n\nMay be used to implement a conditional execution path or loop\ninside of a graph. The graph(s) contained within the body of the conditional node\ncan be selectively executed or iterated upon based on the value of a conditional\nvariable.\n\nHandles must be created in advance of creating the node\nusing ::cudaGraphConditionalHandleCreate.\n\nThe following restrictions apply to graphs which contain conditional nodes:\nThe graph cannot be used in a child node.\nOnly one instantiation of the graph may exist at any point in time.\nThe graph cannot be cloned.\n\nTo set the control value, supply a default value when creating the handle and/or\ncall ::cudaGraphSetConditional from device code."]
    cudaGraphNodeTypeConditional = 13,
    cudaGraphNodeTypeCount = 14,
}
#[repr(u32)]
#[doc = " Child graph node ownership"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphChildGraphNodeOwnership {
    #[doc = "< Default behavior for a child graph node. Child graph is cloned\ninto the parent and memory allocation/free nodes can't be present\nin the child graph."]
    cudaGraphChildGraphOwnershipClone = 0,
    #[doc = "< The child graph is moved to the parent. The handle to the child graph\nis owned by the parent and will be destroyed when the parent is\ndestroyed.\n\nThe following restrictions apply to child graphs after they have been moved:\nCannot be independently instantiated or destroyed;\nCannot be added as a child graph of a separate parent graph;\nCannot be used as an argument to cudaGraphExecUpdate;\nCannot have additional memory allocation or free nodes added."]
    cudaGraphChildGraphOwnershipMove = 1,
}
#[doc = " Child graph node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaChildGraphNodeParams {
    #[doc = "< The child graph to clone into the node for node creation, or\n   a handle to the graph owned by the node for node query.\n   The graph must not contain conditional nodes. Graphs\n   containing memory allocation or memory free nodes must\n   set the ownership to be moved to the parent."]
    pub graph: cudaGraph_t,
    #[doc = "< The ownership relationship of the child graph node."]
    pub ownership: cudaGraphChildGraphNodeOwnership,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaChildGraphNodeParams"]
        [::core::mem::size_of::<cudaChildGraphNodeParams>() - 16usize];
    ["Alignment of cudaChildGraphNodeParams"]
        [::core::mem::align_of::<cudaChildGraphNodeParams>() - 8usize];
    ["Offset of field: cudaChildGraphNodeParams::graph"]
        [::core::mem::offset_of!(cudaChildGraphNodeParams, graph) - 0usize];
    ["Offset of field: cudaChildGraphNodeParams::ownership"]
        [::core::mem::offset_of!(cudaChildGraphNodeParams, ownership) - 8usize];
};
#[doc = " Event record node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaEventRecordNodeParams {
    #[doc = "< The event to record when the node executes"]
    pub event: cudaEvent_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaEventRecordNodeParams"]
        [::core::mem::size_of::<cudaEventRecordNodeParams>() - 8usize];
    ["Alignment of cudaEventRecordNodeParams"]
        [::core::mem::align_of::<cudaEventRecordNodeParams>() - 8usize];
    ["Offset of field: cudaEventRecordNodeParams::event"]
        [::core::mem::offset_of!(cudaEventRecordNodeParams, event) - 0usize];
};
#[doc = " Event wait node parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaEventWaitNodeParams {
    #[doc = "< The event to wait on from the node"]
    pub event: cudaEvent_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaEventWaitNodeParams"][::core::mem::size_of::<cudaEventWaitNodeParams>() - 8usize];
    ["Alignment of cudaEventWaitNodeParams"]
        [::core::mem::align_of::<cudaEventWaitNodeParams>() - 8usize];
    ["Offset of field: cudaEventWaitNodeParams::event"]
        [::core::mem::offset_of!(cudaEventWaitNodeParams, event) - 0usize];
};
#[doc = " Graph node parameters.  See ::cudaGraphAddNode."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaGraphNodeParams {
    #[doc = "< Type of the node"]
    pub type_: cudaGraphNodeType,
    #[doc = "< Reserved.  Must be zero."]
    pub reserved0: [::core::ffi::c_int; 3usize],
    pub __bindgen_anon_1: cudaGraphNodeParams__bindgen_ty_1,
    #[doc = "< Reserved bytes. Must be zero."]
    pub reserved2: ::core::ffi::c_longlong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaGraphNodeParams__bindgen_ty_1 {
    #[doc = "< Padding. Unused bytes must be zero."]
    pub reserved1: [::core::ffi::c_longlong; 29usize],
    #[doc = "< Kernel node parameters."]
    pub kernel: cudaKernelNodeParamsV2,
    #[doc = "< Memcpy node parameters."]
    pub memcpy: cudaMemcpyNodeParams,
    #[doc = "< Memset node parameters."]
    pub memset: cudaMemsetParamsV2,
    #[doc = "< Host node parameters."]
    pub host: cudaHostNodeParamsV2,
    #[doc = "< Child graph node parameters."]
    pub graph: cudaChildGraphNodeParams,
    #[doc = "< Event wait node parameters."]
    pub eventWait: cudaEventWaitNodeParams,
    #[doc = "< Event record node parameters."]
    pub eventRecord: cudaEventRecordNodeParams,
    #[doc = "< External semaphore signal node parameters."]
    pub extSemSignal: cudaExternalSemaphoreSignalNodeParamsV2,
    #[doc = "< External semaphore wait node parameters."]
    pub extSemWait: cudaExternalSemaphoreWaitNodeParamsV2,
    #[doc = "< Memory allocation node parameters."]
    pub alloc: cudaMemAllocNodeParamsV2,
    #[doc = "< Memory free node parameters."]
    pub free: cudaMemFreeNodeParams,
    #[doc = "< Conditional node parameters."]
    pub conditional: cudaConditionalNodeParams,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphNodeParams__bindgen_ty_1"]
        [::core::mem::size_of::<cudaGraphNodeParams__bindgen_ty_1>() - 232usize];
    ["Alignment of cudaGraphNodeParams__bindgen_ty_1"]
        [::core::mem::align_of::<cudaGraphNodeParams__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::reserved1"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, reserved1) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::kernel"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, kernel) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::memcpy"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, memcpy) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::memset"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, memset) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::host"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, host) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::graph"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, graph) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::eventWait"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, eventWait) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::eventRecord"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, eventRecord) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::extSemSignal"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, extSemSignal) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::extSemWait"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, extSemWait) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::alloc"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, alloc) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::free"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, free) - 0usize];
    ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::conditional"]
        [::core::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, conditional) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphNodeParams"][::core::mem::size_of::<cudaGraphNodeParams>() - 256usize];
    ["Alignment of cudaGraphNodeParams"][::core::mem::align_of::<cudaGraphNodeParams>() - 8usize];
    ["Offset of field: cudaGraphNodeParams::type_"]
        [::core::mem::offset_of!(cudaGraphNodeParams, type_) - 0usize];
    ["Offset of field: cudaGraphNodeParams::reserved0"]
        [::core::mem::offset_of!(cudaGraphNodeParams, reserved0) - 4usize];
    ["Offset of field: cudaGraphNodeParams::reserved2"]
        [::core::mem::offset_of!(cudaGraphNodeParams, reserved2) - 248usize];
};
#[repr(u32)]
#[doc = " Type annotations that can be applied to graph edges as part of ::cudaGraphEdgeData."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphDependencyType_enum {
    #[doc = "< This is an ordinary dependency."]
    cudaGraphDependencyTypeDefault = 0,
    #[doc = "< This dependency type allows the downstream node to\nuse \\c cudaGridDependencySynchronize(). It may only be used\nbetween kernel nodes, and must be used with either the\n::cudaGraphKernelNodePortProgrammatic or\n::cudaGraphKernelNodePortLaunchCompletion outgoing port."]
    cudaGraphDependencyTypeProgrammatic = 1,
}
#[doc = " Type annotations that can be applied to graph edges as part of ::cudaGraphEdgeData."]
pub use self::cudaGraphDependencyType_enum as cudaGraphDependencyType;
#[doc = " Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and\n default to a zero-initialized value if not specified. A zero-initialized struct indicates a\n standard full serialization of two nodes with memory visibility."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaGraphEdgeData_st {
    #[doc = "< This indicates when the dependency is triggered from the upstream\nnode on the edge. The meaning is specfic to the node type. A value\nof 0 in all cases means full completion of the upstream node, with\nmemory visibility to the downstream node or portion thereof\n(indicated by \\c to_port).\n<br>\nOnly kernel nodes define non-zero ports. A kernel node\ncan use the following output port types:\n::cudaGraphKernelNodePortDefault, ::cudaGraphKernelNodePortProgrammatic,\nor ::cudaGraphKernelNodePortLaunchCompletion."]
    pub from_port: ::core::ffi::c_uchar,
    #[doc = "< This indicates what portion of the downstream node is dependent on\nthe upstream node or portion thereof (indicated by \\c from_port). The\nmeaning is specific to the node type. A value of 0 in all cases means\nthe entirety of the downstream node is dependent on the upstream work.\n<br>\nCurrently no node types define non-zero ports. Accordingly, this field\nmust be set to zero."]
    pub to_port: ::core::ffi::c_uchar,
    #[doc = "< This should be populated with a value from ::cudaGraphDependencyType. (It\nis typed as char due to compiler-specific layout of bitfields.) See\n::cudaGraphDependencyType."]
    pub type_: ::core::ffi::c_uchar,
    #[doc = "< These bytes are unused and must be zeroed. This ensures\ncompatibility if additional fields are added in the future."]
    pub reserved: [::core::ffi::c_uchar; 5usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphEdgeData_st"][::core::mem::size_of::<cudaGraphEdgeData_st>() - 8usize];
    ["Alignment of cudaGraphEdgeData_st"][::core::mem::align_of::<cudaGraphEdgeData_st>() - 1usize];
    ["Offset of field: cudaGraphEdgeData_st::from_port"]
        [::core::mem::offset_of!(cudaGraphEdgeData_st, from_port) - 0usize];
    ["Offset of field: cudaGraphEdgeData_st::to_port"]
        [::core::mem::offset_of!(cudaGraphEdgeData_st, to_port) - 1usize];
    ["Offset of field: cudaGraphEdgeData_st::type_"]
        [::core::mem::offset_of!(cudaGraphEdgeData_st, type_) - 2usize];
    ["Offset of field: cudaGraphEdgeData_st::reserved"]
        [::core::mem::offset_of!(cudaGraphEdgeData_st, reserved) - 3usize];
};
#[doc = " Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and\n default to a zero-initialized value if not specified. A zero-initialized struct indicates a\n standard full serialization of two nodes with memory visibility."]
pub type cudaGraphEdgeData = cudaGraphEdgeData_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphExec_st {
    _unused: [u8; 0],
}
#[doc = " CUDA executable (launchable) graph"]
pub type cudaGraphExec_t = *mut CUgraphExec_st;
#[repr(u32)]
#[doc = " CUDA Graph Update error types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphExecUpdateResult {
    #[doc = "< The update succeeded"]
    cudaGraphExecUpdateSuccess = 0,
    #[doc = "< The update failed for an unexpected reason which is described in the return value of the function"]
    cudaGraphExecUpdateError = 1,
    #[doc = "< The update failed because the topology changed"]
    cudaGraphExecUpdateErrorTopologyChanged = 2,
    #[doc = "< The update failed because a node type changed"]
    cudaGraphExecUpdateErrorNodeTypeChanged = 3,
    #[doc = "< The update failed because the function of a kernel node changed (CUDA driver < 11.2)"]
    cudaGraphExecUpdateErrorFunctionChanged = 4,
    #[doc = "< The update failed because the parameters changed in a way that is not supported"]
    cudaGraphExecUpdateErrorParametersChanged = 5,
    #[doc = "< The update failed because something about the node is not supported"]
    cudaGraphExecUpdateErrorNotSupported = 6,
    #[doc = "< The update failed because the function of a kernel node changed in an unsupported way"]
    cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7,
    #[doc = "< The update failed because the node attributes changed in a way that is not supported"]
    cudaGraphExecUpdateErrorAttributesChanged = 8,
}
#[repr(u32)]
#[doc = " Graph instantiation results"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphInstantiateResult {
    #[doc = "< Instantiation succeeded"]
    cudaGraphInstantiateSuccess = 0,
    #[doc = "< Instantiation failed for an unexpected reason which is described in the return value of the function"]
    cudaGraphInstantiateError = 1,
    #[doc = "< Instantiation failed due to invalid structure, such as cycles"]
    cudaGraphInstantiateInvalidStructure = 2,
    #[doc = "< Instantiation for device launch failed because the graph contained an unsupported operation"]
    cudaGraphInstantiateNodeOperationNotSupported = 3,
    #[doc = "< Instantiation for device launch failed due to the nodes belonging to different contexts"]
    cudaGraphInstantiateMultipleDevicesNotSupported = 4,
    #[doc = "< One or more conditional handles are not associated with conditional nodes"]
    cudaGraphInstantiateConditionalHandleUnused = 5,
}
#[doc = " Graph instantiation parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaGraphInstantiateParams_st {
    #[doc = "< Instantiation flags"]
    pub flags: ::core::ffi::c_ulonglong,
    #[doc = "< Upload stream"]
    pub uploadStream: cudaStream_t,
    #[doc = "< The node which caused instantiation to fail, if any"]
    pub errNode_out: cudaGraphNode_t,
    #[doc = "< Whether instantiation was successful.  If it failed, the reason why"]
    pub result_out: cudaGraphInstantiateResult,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphInstantiateParams_st"]
        [::core::mem::size_of::<cudaGraphInstantiateParams_st>() - 32usize];
    ["Alignment of cudaGraphInstantiateParams_st"]
        [::core::mem::align_of::<cudaGraphInstantiateParams_st>() - 8usize];
    ["Offset of field: cudaGraphInstantiateParams_st::flags"]
        [::core::mem::offset_of!(cudaGraphInstantiateParams_st, flags) - 0usize];
    ["Offset of field: cudaGraphInstantiateParams_st::uploadStream"]
        [::core::mem::offset_of!(cudaGraphInstantiateParams_st, uploadStream) - 8usize];
    ["Offset of field: cudaGraphInstantiateParams_st::errNode_out"]
        [::core::mem::offset_of!(cudaGraphInstantiateParams_st, errNode_out) - 16usize];
    ["Offset of field: cudaGraphInstantiateParams_st::result_out"]
        [::core::mem::offset_of!(cudaGraphInstantiateParams_st, result_out) - 24usize];
};
#[doc = " Graph instantiation parameters"]
pub type cudaGraphInstantiateParams = cudaGraphInstantiateParams_st;
#[doc = " Result information returned by cudaGraphExecUpdate"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaGraphExecUpdateResultInfo_st {
    #[doc = " Gives more specific detail when a cuda graph update fails."]
    pub result: cudaGraphExecUpdateResult,
    #[doc = " The \"to node\" of the error edge when the topologies do not match.\n The error node when the error is associated with a specific node.\n NULL when the error is generic."]
    pub errorNode: cudaGraphNode_t,
    #[doc = " The from node of error edge when the topologies do not match. Otherwise NULL."]
    pub errorFromNode: cudaGraphNode_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphExecUpdateResultInfo_st"]
        [::core::mem::size_of::<cudaGraphExecUpdateResultInfo_st>() - 24usize];
    ["Alignment of cudaGraphExecUpdateResultInfo_st"]
        [::core::mem::align_of::<cudaGraphExecUpdateResultInfo_st>() - 8usize];
    ["Offset of field: cudaGraphExecUpdateResultInfo_st::result"]
        [::core::mem::offset_of!(cudaGraphExecUpdateResultInfo_st, result) - 0usize];
    ["Offset of field: cudaGraphExecUpdateResultInfo_st::errorNode"]
        [::core::mem::offset_of!(cudaGraphExecUpdateResultInfo_st, errorNode) - 8usize];
    ["Offset of field: cudaGraphExecUpdateResultInfo_st::errorFromNode"]
        [::core::mem::offset_of!(cudaGraphExecUpdateResultInfo_st, errorFromNode) - 16usize];
};
#[doc = " Result information returned by cudaGraphExecUpdate"]
pub type cudaGraphExecUpdateResultInfo = cudaGraphExecUpdateResultInfo_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphDeviceUpdatableNode_st {
    _unused: [u8; 0],
}
#[doc = " CUDA device node handle for device-side node update"]
pub type cudaGraphDeviceNode_t = *mut CUgraphDeviceUpdatableNode_st;
#[repr(u32)]
#[doc = " Specifies the field to update when performing multiple node updates from the device"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphKernelNodeField {
    #[doc = "< Invalid field"]
    cudaGraphKernelNodeFieldInvalid = 0,
    #[doc = "< Grid dimension update"]
    cudaGraphKernelNodeFieldGridDim = 1,
    #[doc = "< Kernel parameter update"]
    cudaGraphKernelNodeFieldParam = 2,
    #[doc = "< Node enable/disable"]
    cudaGraphKernelNodeFieldEnabled = 3,
}
#[doc = " Struct to specify a single node update to pass as part of a larger array to ::cudaGraphKernelNodeUpdatesApply"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaGraphKernelNodeUpdate {
    #[doc = "< Node to update"]
    pub node: cudaGraphDeviceNode_t,
    #[doc = "< Which type of update to apply. Determines how updateData is interpreted"]
    pub field: cudaGraphKernelNodeField,
    #[doc = "< Update data to apply. Which field is used depends on field's value"]
    pub updateData: cudaGraphKernelNodeUpdate__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaGraphKernelNodeUpdate__bindgen_ty_1 {
    #[doc = "< Grid dimensions"]
    pub gridDim: dim3,
    #[doc = "< Kernel parameter data"]
    pub param: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
    #[doc = "< Node enable/disable data. Nonzero if the node should be enabled, 0 if it should be disabled"]
    pub isEnabled: ::core::ffi::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< Kernel parameter data to write in"]
    pub pValue: *const ::core::ffi::c_void,
    #[doc = "< Offset into the parameter buffer at which to apply the update"]
    pub offset: usize,
    #[doc = "< Number of bytes to update"]
    pub size: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::size_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1>() - 24usize];
    ["Alignment of cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1::pValue"][::core::mem::offset_of!(
        cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
        pValue
    ) - 0usize];
    ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1::offset"][::core::mem::offset_of!(
        cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
        offset
    ) - 8usize];
    ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1::size"][::core::mem::offset_of!(
        cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
        size
    ) - 16usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphKernelNodeUpdate__bindgen_ty_1"]
        [::core::mem::size_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1>() - 24usize];
    ["Alignment of cudaGraphKernelNodeUpdate__bindgen_ty_1"]
        [::core::mem::align_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1::gridDim"]
        [::core::mem::offset_of!(cudaGraphKernelNodeUpdate__bindgen_ty_1, gridDim) - 0usize];
    ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1::param"]
        [::core::mem::offset_of!(cudaGraphKernelNodeUpdate__bindgen_ty_1, param) - 0usize];
    ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1::isEnabled"]
        [::core::mem::offset_of!(cudaGraphKernelNodeUpdate__bindgen_ty_1, isEnabled) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaGraphKernelNodeUpdate"]
        [::core::mem::size_of::<cudaGraphKernelNodeUpdate>() - 40usize];
    ["Alignment of cudaGraphKernelNodeUpdate"]
        [::core::mem::align_of::<cudaGraphKernelNodeUpdate>() - 8usize];
    ["Offset of field: cudaGraphKernelNodeUpdate::node"]
        [::core::mem::offset_of!(cudaGraphKernelNodeUpdate, node) - 0usize];
    ["Offset of field: cudaGraphKernelNodeUpdate::field"]
        [::core::mem::offset_of!(cudaGraphKernelNodeUpdate, field) - 8usize];
    ["Offset of field: cudaGraphKernelNodeUpdate::updateData"]
        [::core::mem::offset_of!(cudaGraphKernelNodeUpdate, updateData) - 16usize];
};
#[repr(u32)]
#[doc = " Flags to specify search options to be used with ::cudaGetDriverEntryPoint\n For more details see ::cuGetProcAddress"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGetDriverEntryPointFlags {
    #[doc = "< Default search mode for driver symbols."]
    cudaEnableDefault = 0,
    #[doc = "< Search for legacy versions of driver symbols."]
    cudaEnableLegacyStream = 1,
    #[doc = "< Search for per-thread versions of driver symbols."]
    cudaEnablePerThreadDefaultStream = 2,
}
#[repr(u32)]
#[doc = " Enum for status from obtaining driver entry points, used with ::cudaApiGetDriverEntryPoint"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaDriverEntryPointQueryResult {
    #[doc = "< Search for symbol found a match"]
    cudaDriverEntryPointSuccess = 0,
    #[doc = "< Search for symbol was not found"]
    cudaDriverEntryPointSymbolNotFound = 1,
    #[doc = "< Search for symbol was found but version wasn't great enough"]
    cudaDriverEntryPointVersionNotSufficent = 2,
}
#[repr(u32)]
#[doc = " CUDA Graph debug write options"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphDebugDotFlags {
    #[doc = "< Output all debug data as if every debug flag is enabled"]
    cudaGraphDebugDotFlagsVerbose = 1,
    #[doc = "< Adds cudaKernelNodeParams to output"]
    cudaGraphDebugDotFlagsKernelNodeParams = 4,
    #[doc = "< Adds cudaMemcpy3DParms to output"]
    cudaGraphDebugDotFlagsMemcpyNodeParams = 8,
    #[doc = "< Adds cudaMemsetParams to output"]
    cudaGraphDebugDotFlagsMemsetNodeParams = 16,
    #[doc = "< Adds cudaHostNodeParams to output"]
    cudaGraphDebugDotFlagsHostNodeParams = 32,
    #[doc = "< Adds cudaEvent_t handle from record and wait nodes to output"]
    cudaGraphDebugDotFlagsEventNodeParams = 64,
    #[doc = "< Adds cudaExternalSemaphoreSignalNodeParams values to output"]
    cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128,
    #[doc = "< Adds cudaExternalSemaphoreWaitNodeParams to output"]
    cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256,
    #[doc = "< Adds cudaKernelNodeAttrID values to output"]
    cudaGraphDebugDotFlagsKernelNodeAttributes = 512,
    #[doc = "< Adds node handles and every kernel function handle to output"]
    cudaGraphDebugDotFlagsHandles = 1024,
    #[doc = "< Adds cudaConditionalNodeParams to output"]
    cudaGraphDebugDotFlagsConditionalNodeParams = 32768,
}
#[repr(u32)]
#[doc = " Flags for instantiating a graph"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaGraphInstantiateFlags {
    #[doc = "< Automatically free memory allocated in a graph before relaunching."]
    cudaGraphInstantiateFlagAutoFreeOnLaunch = 1,
    #[doc = "< Automatically upload the graph after instantiation. Only supported by\n::cudaGraphInstantiateWithParams.  The upload will be performed using the\nstream provided in \\p instantiateParams."]
    cudaGraphInstantiateFlagUpload = 2,
    #[doc = "< Instantiate the graph to be launchable from the device. This flag can only\nbe used on platforms which support unified addressing. This flag cannot be\nused in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch."]
    cudaGraphInstantiateFlagDeviceLaunch = 4,
    #[doc = "< Run the graph using the per-node priority attributes rather than the\npriority of the stream it is launched into."]
    cudaGraphInstantiateFlagUseNodePriority = 8,
}
#[repr(u32)]
#[doc = " Memory Synchronization Domain\n\n A kernel can be launched in a specified memory synchronization domain that affects all memory operations issued by\n that kernel. A memory barrier issued in one domain will only order memory operations in that domain, thus eliminating\n latency increase from memory barriers ordering unrelated traffic.\n\n By default, kernels are launched in domain 0. Kernel launched with ::cudaLaunchMemSyncDomainRemote will have a\n different domain ID. User may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::cudaLaunchAttributeMemSyncDomain, ::cudaStreamSetAttribute, ::cudaLaunchKernelEx,\n ::cudaGraphKernelNodeSetAttribute.\n\n Memory operations done in kernels launched in different domains are considered system-scope distanced. In other\n words, a GPU scoped memory synchronization is not sufficient for memory order to be observed by kernels in another\n memory synchronization domain even if they are on the same GPU."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaLaunchMemSyncDomain {
    #[doc = "< Launch kernels in the default domain"]
    cudaLaunchMemSyncDomainDefault = 0,
    #[doc = "< Launch kernels in the remote domain"]
    cudaLaunchMemSyncDomainRemote = 1,
}
#[doc = " Memory Synchronization Domain map\n\n See ::cudaLaunchMemSyncDomain.\n\n By default, kernels are launched in domain 0. Kernel launched with ::cudaLaunchMemSyncDomainRemote will have a\n different domain ID. User may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::cudaLaunchAttributeMemSyncDomainMap.\n\n Domain ID range is available through ::cudaDevAttrMemSyncDomainCount."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchMemSyncDomainMap_st {
    #[doc = "< The default domain ID to use for designated kernels"]
    pub default_: ::core::ffi::c_uchar,
    #[doc = "< The remote domain ID to use for designated kernels"]
    pub remote: ::core::ffi::c_uchar,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchMemSyncDomainMap_st"]
        [::core::mem::size_of::<cudaLaunchMemSyncDomainMap_st>() - 2usize];
    ["Alignment of cudaLaunchMemSyncDomainMap_st"]
        [::core::mem::align_of::<cudaLaunchMemSyncDomainMap_st>() - 1usize];
    ["Offset of field: cudaLaunchMemSyncDomainMap_st::default_"]
        [::core::mem::offset_of!(cudaLaunchMemSyncDomainMap_st, default_) - 0usize];
    ["Offset of field: cudaLaunchMemSyncDomainMap_st::remote"]
        [::core::mem::offset_of!(cudaLaunchMemSyncDomainMap_st, remote) - 1usize];
};
#[doc = " Memory Synchronization Domain map\n\n See ::cudaLaunchMemSyncDomain.\n\n By default, kernels are launched in domain 0. Kernel launched with ::cudaLaunchMemSyncDomainRemote will have a\n different domain ID. User may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::cudaLaunchAttributeMemSyncDomainMap.\n\n Domain ID range is available through ::cudaDevAttrMemSyncDomainCount."]
pub type cudaLaunchMemSyncDomainMap = cudaLaunchMemSyncDomainMap_st;
#[repr(u32)]
#[doc = " Launch attributes enum; used as id field of ::cudaLaunchAttribute"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaLaunchAttributeID {
    #[doc = "< Ignored entry, for convenient composition"]
    cudaLaunchAttributeIgnore = 0,
    #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::accessPolicyWindow."]
    cudaLaunchAttributeAccessPolicyWindow = 1,
    #[doc = "< Valid for graph nodes, launches. See\n::cudaLaunchAttributeValue::cooperative."]
    cudaLaunchAttributeCooperative = 2,
    #[doc = "< Valid for streams. See ::cudaLaunchAttributeValue::syncPolicy."]
    cudaLaunchAttributeSynchronizationPolicy = 3,
    #[doc = "< Valid for graph nodes, launches. See\n::cudaLaunchAttributeValue::clusterDim."]
    cudaLaunchAttributeClusterDimension = 4,
    #[doc = "< Valid for graph nodes, launches. See\n::cudaLaunchAttributeValue::clusterSchedulingPolicyPreference."]
    cudaLaunchAttributeClusterSchedulingPolicyPreference = 5,
    #[doc = "< Valid for launches. Setting\n::cudaLaunchAttributeValue::programmaticStreamSerializationAllowed\nto non-0 signals that the kernel will use programmatic\nmeans to resolve its stream dependency, so that the\nCUDA runtime should opportunistically allow the grid's\nexecution to overlap with the previous kernel in the\nstream, if that kernel requests the overlap. The\ndependent launches can choose to wait on the\ndependency using the programmatic sync\n(cudaGridDependencySynchronize() or equivalent PTX\ninstructions)."]
    cudaLaunchAttributeProgrammaticStreamSerialization = 6,
    #[doc = "< Valid for launches. Set\n::cudaLaunchAttributeValue::programmaticEvent to\nrecord the event. Event recorded through this launch\nattribute is guaranteed to only trigger after all\nblock in the associated kernel trigger the event.  A\nblock can trigger the event programmatically in a\nfuture CUDA release. A trigger can also be inserted at\nthe beginning of each block's execution if\ntriggerAtBlockStart is set to non-0. The dependent\nlaunches can choose to wait on the dependency using\nthe programmatic sync (cudaGridDependencySynchronize()\nor equivalent PTX instructions). Note that dependents\n(including the CPU thread calling\ncudaEventSynchronize()) are not guaranteed to observe\nthe release precisely when it is released. For\nexample, cudaEventSynchronize() may only observe the\nevent trigger long after the associated kernel has\ncompleted. This recording type is primarily meant for\nestablishing programmatic dependency between device\ntasks. Note also this type of dependency allows, but\ndoes not guarantee, concurrent execution of tasks.\n<br>\nThe event supplied must not be an interprocess or\ninterop event. The event must disable timing (i.e.\nmust be created with the ::cudaEventDisableTiming flag\nset)."]
    cudaLaunchAttributeProgrammaticEvent = 7,
    #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::priority."]
    cudaLaunchAttributePriority = 8,
    #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::memSyncDomainMap."]
    cudaLaunchAttributeMemSyncDomainMap = 9,
    #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::memSyncDomain."]
    cudaLaunchAttributeMemSyncDomain = 10,
    #[doc = "< Valid for graph nodes and launches. Set\n::cudaLaunchAttributeValue::preferredClusterDim\nto allow the kernel launch to specify a preferred substitute\ncluster dimension. Blocks may be grouped according to either\nthe dimensions specified with this attribute (grouped into a\n\"preferred substitute cluster\"), or the one specified with\n::cudaLaunchAttributeClusterDimension attribute (grouped\ninto a \"regular cluster\"). The cluster dimensions of a\n\"preferred substitute cluster\" shall be an integer multiple\ngreater than zero of the regular cluster dimensions. The\ndevice will attempt - on a best-effort basis - to group\nthread blocks into preferred clusters over grouping them\ninto regular clusters. When it deems necessary (primarily\nwhen the device temporarily runs out of physical resources\nto launch the larger preferred clusters), the device may\nswitch to launch the regular clusters instead to attempt to\nutilize as much of the physical device resources as possible.\n<br>\nEach type of cluster will have its enumeration / coordinate\nsetup as if the grid consists solely of its type of cluster.\nFor example, if the preferred substitute cluster dimensions\ndouble the regular cluster dimensions, there might be\nsimultaneously a regular cluster indexed at (1,0,0), and a\npreferred cluster indexed at (1,0,0). In this example, the\npreferred substitute cluster (1,0,0) replaces regular\nclusters (2,0,0) and (3,0,0) and groups their blocks.\n<br>\nThis attribute will only take effect when a regular cluster\ndimension has been specified. The preferred substitute cluster\ndimension must be an integer multiple greater than zero of the\nregular cluster dimension and must divide the grid. It must\nalso be no more than `maxBlocksPerCluster`, if it is set in\nthe kernel's `__launch_bounds__`. Otherwise it must be less\nthan the maximum value the driver can support. Otherwise,\nsetting this attribute to a value physically unable to fit on\nany particular device is permitted."]
    cudaLaunchAttributePreferredClusterDimension = 11,
    #[doc = "< Valid for launches. Set\n::cudaLaunchAttributeValue::launchCompletionEvent to record the\nevent.\n<br>\nNominally, the event is triggered once all blocks of the kernel\nhave begun execution. Currently this is a best effort. If a kernel\nB has a launch completion dependency on a kernel A, B may wait\nuntil A is complete. Alternatively, blocks of B may begin before\nall blocks of A have begun, for example if B can claim execution\nresources unavailable to A (e.g. they run on different GPUs) or\nif B is a higher priority than A.\nExercise caution if such an ordering inversion could lead\nto deadlock.\n<br>\nA launch completion event is nominally similar to a programmatic\nevent with \\c triggerAtBlockStart set except that it is not\nvisible to \\c cudaGridDependencySynchronize() and can be used with\ncompute capability less than 9.0.\n<br>\nThe event supplied must not be an interprocess or interop event.\nThe event must disable timing (i.e. must be created with the\n::cudaEventDisableTiming flag set)."]
    cudaLaunchAttributeLaunchCompletionEvent = 12,
    #[doc = "< Valid for graph nodes, launches. This attribute is graphs-only,\nand passing it to a launch in a non-capturing stream will result\nin an error.\n<br>\n:cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can\nonly be set to 0 or 1. Setting the field to 1 indicates that the\ncorresponding kernel node should be device-updatable. On success, a handle\nwill be returned via\n::cudaLaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be\npassed to the various device-side update functions to update the node's\nkernel parameters from within another kernel. For more information on the\ntypes of device updates that can be made, as well as the relevant limitations\nthereof, see ::cudaGraphKernelNodeUpdatesApply.\n<br>\nNodes which are device-updatable have additional restrictions compared to\nregular kernel nodes. Firstly, device-updatable nodes cannot be removed\nfrom their graph via ::cudaGraphDestroyNode. Additionally, once opted-in\nto this functionality, a node cannot opt out, and any attempt to set the\ndeviceUpdatable attribute to 0 will result in an error. Device-updatable\nkernel nodes also cannot have their attributes copied to/from another kernel\nnode via ::cudaGraphKernelNodeCopyAttributes. Graphs containing one or more\ndevice-updatable nodes also do not allow multiple instantiation, and neither\nthe graph nor its instantiated version can be passed to ::cudaGraphExecUpdate.\n<br>\nIf a graph contains device-updatable nodes and updates those nodes from the device\nfrom within the graph, the graph must be uploaded with ::cuGraphUpload before it\nis launched. For such a graph, if host-side executable graph updates are made to the\ndevice-updatable nodes, the graph must be uploaded before it is launched again."]
    cudaLaunchAttributeDeviceUpdatableKernelNode = 13,
    #[doc = "< Valid for launches. On devices where the L1 cache and shared memory use the\nsame hardware resources, setting ::cudaLaunchAttributeValue::sharedMemCarveout\nto a percentage between 0-100 signals sets the shared memory carveout\npreference in percent of the total shared memory for that kernel launch.\nThis attribute takes precedence over ::cudaFuncAttributePreferredSharedMemoryCarveout.\nThis is only a hint, and the driver can choose a different configuration if\nrequired for the launch."]
    cudaLaunchAttributePreferredSharedMemoryCarveout = 14,
    #[doc = "< Valid for streams, graph nodes, launches. This attribute is a hint to the CUDA runtime that the\nlaunch should attempt to make the kernel maximize its NVLINK utilization.\n<br>\nWhen possible to honor this hint, CUDA will assume each block in the grid launch will carry out an even amount\nof NVLINK traffic, and make a best-effort attempt to adjust the kernel launch based on that assumption.\n<br>\nThis attribute is a hint only. CUDA makes no functional or performance guarantee. Its applicability can be\naffected by many different factors, including driver version (i.e. CUDA doesn't guarantee the performance\ncharacteristics will be maintained between driver versions or a driver update could alter or regress\npreviously observed perf characteristics.) It also doesn't guarantee a successful result, i.e. applying\nthe attribute may not improve the performance of either the targeted kernel or the encapsulating application.\n<br>\nValid values for ::cudaLaunchAttributeValue::nvlinkUtilCentricScheduling are 0 (disabled) and 1 (enabled)."]
    cudaLaunchAttributeNvlinkUtilCentricScheduling = 16,
}
#[doc = " Launch attributes union; used as value field of ::cudaLaunchAttribute"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaLaunchAttributeValue {
    pub pad: [::core::ffi::c_char; 64usize],
    #[doc = "< Value of launch attribute ::cudaLaunchAttributeAccessPolicyWindow."]
    pub accessPolicyWindow: cudaAccessPolicyWindow,
    #[doc = "< Value of launch attribute ::cudaLaunchAttributeCooperative. Nonzero indicates a cooperative\nkernel (see ::cudaLaunchCooperativeKernel)."]
    pub cooperative: ::core::ffi::c_int,
    #[doc = "< Value of launch attribute\n::cudaLaunchAttributeSynchronizationPolicy. ::cudaSynchronizationPolicy\nfor work queued up in this stream."]
    pub syncPolicy: cudaSynchronizationPolicy,
    pub clusterDim: cudaLaunchAttributeValue__bindgen_ty_1,
    #[doc = "< Value of launch attribute\n::cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster\nscheduling policy preference for the kernel."]
    pub clusterSchedulingPolicyPreference: cudaClusterSchedulingPolicy,
    #[doc = "< Value of launch attribute\n::cudaLaunchAttributeProgrammaticStreamSerialization."]
    pub programmaticStreamSerializationAllowed: ::core::ffi::c_int,
    pub programmaticEvent: cudaLaunchAttributeValue__bindgen_ty_2,
    #[doc = "< Value of launch attribute ::cudaLaunchAttributePriority. Execution priority of the kernel."]
    pub priority: ::core::ffi::c_int,
    #[doc = "< Value of launch attribute\n::cudaLaunchAttributeMemSyncDomainMap. See\n::cudaLaunchMemSyncDomainMap."]
    pub memSyncDomainMap: cudaLaunchMemSyncDomainMap,
    #[doc = "< Value of launch attribute ::cudaLaunchAttributeMemSyncDomain. See\n::cudaLaunchMemSyncDomain."]
    pub memSyncDomain: cudaLaunchMemSyncDomain,
    pub preferredClusterDim: cudaLaunchAttributeValue__bindgen_ty_3,
    pub launchCompletionEvent: cudaLaunchAttributeValue__bindgen_ty_4,
    pub deviceUpdatableKernelNode: cudaLaunchAttributeValue__bindgen_ty_5,
    #[doc = "< Value of launch attribute ::cudaLaunchAttributePreferredSharedMemoryCarveout."]
    pub sharedMemCarveout: ::core::ffi::c_uint,
    #[doc = "< Value of launch attribute ::cudaLaunchAttributeNvlinkUtilCentricScheduling."]
    pub nvlinkUtilCentricScheduling: ::core::ffi::c_uint,
}
#[doc = " Value of launch attribute ::cudaLaunchAttributeClusterDimension that\n represents the desired cluster dimensions for the kernel. Opaque type\n with the following fields:\n     - \\p x - The X dimension of the cluster, in blocks. Must be a divisor\n              of the grid X dimension.\n     - \\p y - The Y dimension of the cluster, in blocks. Must be a divisor\n              of the grid Y dimension.\n     - \\p z - The Z dimension of the cluster, in blocks. Must be a divisor\n              of the grid Z dimension."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchAttributeValue__bindgen_ty_1 {
    pub x: ::core::ffi::c_uint,
    pub y: ::core::ffi::c_uint,
    pub z: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttributeValue__bindgen_ty_1"]
        [::core::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_1>() - 12usize];
    ["Alignment of cudaLaunchAttributeValue__bindgen_ty_1"]
        [::core::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_1>() - 4usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_1::x"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_1, x) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_1::y"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_1, y) - 4usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_1::z"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_1, z) - 8usize];
};
#[doc = " Value of launch attribute ::cudaLaunchAttributeProgrammaticEvent\n with the following fields:\n     - \\p cudaEvent_t event - Event to fire when all blocks trigger it.\n     - \\p int flags;        - Event record flags, see ::cudaEventRecordWithFlags. Does not accept\n                               ::cudaEventRecordExternal.\n     - \\p int triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchAttributeValue__bindgen_ty_2 {
    pub event: cudaEvent_t,
    pub flags: ::core::ffi::c_int,
    pub triggerAtBlockStart: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttributeValue__bindgen_ty_2"]
        [::core::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_2>() - 16usize];
    ["Alignment of cudaLaunchAttributeValue__bindgen_ty_2"]
        [::core::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_2>() - 8usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_2::event"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_2, event) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_2::flags"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_2, flags) - 8usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_2::triggerAtBlockStart"][::core::mem::offset_of!(
        cudaLaunchAttributeValue__bindgen_ty_2,
        triggerAtBlockStart
    ) - 12usize];
};
#[doc = " Value of launch attribute ::cudaLaunchAttributePreferredClusterDimension\n that represents the desired preferred cluster dimensions for the kernel.\n Opaque type with the following fields:\n     - \\p x - The X dimension of the preferred cluster, in blocks. Must be\n              a divisor of the grid X dimension, and must be a multiple of\n              the \\p x field of ::cudaLaunchAttributeValue::clusterDim.\n     - \\p y - The Y dimension of the preferred cluster, in blocks. Must be\n              a divisor of the grid Y dimension, and must be a multiple of\n              the \\p y field of ::cudaLaunchAttributeValue::clusterDim.\n     - \\p z - The Z dimension of the preferred cluster, in blocks. Must be\n              equal to the \\p z field of ::cudaLaunchAttributeValue::clusterDim."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchAttributeValue__bindgen_ty_3 {
    pub x: ::core::ffi::c_uint,
    pub y: ::core::ffi::c_uint,
    pub z: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttributeValue__bindgen_ty_3"]
        [::core::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_3>() - 12usize];
    ["Alignment of cudaLaunchAttributeValue__bindgen_ty_3"]
        [::core::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_3>() - 4usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_3::x"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_3, x) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_3::y"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_3, y) - 4usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_3::z"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_3, z) - 8usize];
};
#[doc = " Value of launch attribute ::cudaLaunchAttributeLaunchCompletionEvent\n with the following fields:\n     - \\p cudaEvent_t event - Event to fire when the last block launches.\n     - \\p int flags - Event record flags, see ::cudaEventRecordWithFlags. Does not accept\n                   ::cudaEventRecordExternal."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchAttributeValue__bindgen_ty_4 {
    pub event: cudaEvent_t,
    pub flags: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttributeValue__bindgen_ty_4"]
        [::core::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_4>() - 16usize];
    ["Alignment of cudaLaunchAttributeValue__bindgen_ty_4"]
        [::core::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_4>() - 8usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_4::event"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_4, event) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_4::flags"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_4, flags) - 8usize];
};
#[doc = " Value of launch attribute ::cudaLaunchAttributeDeviceUpdatableKernelNode\n with the following fields:\n    - \\p int deviceUpdatable - Whether or not the resulting kernel node should be device-updatable.\n    - \\p cudaGraphDeviceNode_t devNode - Returns a handle to pass to the various device-side update functions."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchAttributeValue__bindgen_ty_5 {
    pub deviceUpdatable: ::core::ffi::c_int,
    pub devNode: cudaGraphDeviceNode_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttributeValue__bindgen_ty_5"]
        [::core::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_5>() - 16usize];
    ["Alignment of cudaLaunchAttributeValue__bindgen_ty_5"]
        [::core::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_5>() - 8usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_5::deviceUpdatable"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_5, deviceUpdatable) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_5::devNode"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_5, devNode) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttributeValue"]
        [::core::mem::size_of::<cudaLaunchAttributeValue>() - 64usize];
    ["Alignment of cudaLaunchAttributeValue"]
        [::core::mem::align_of::<cudaLaunchAttributeValue>() - 8usize];
    ["Offset of field: cudaLaunchAttributeValue::pad"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, pad) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::accessPolicyWindow"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, accessPolicyWindow) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::cooperative"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, cooperative) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::syncPolicy"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, syncPolicy) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::clusterDim"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, clusterDim) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::clusterSchedulingPolicyPreference"][::core::mem::offset_of!(
        cudaLaunchAttributeValue,
        clusterSchedulingPolicyPreference
    ) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::programmaticStreamSerializationAllowed"][::core::mem::offset_of!(
        cudaLaunchAttributeValue,
        programmaticStreamSerializationAllowed
    )
        - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::programmaticEvent"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, programmaticEvent) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::priority"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, priority) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::memSyncDomainMap"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, memSyncDomainMap) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::memSyncDomain"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, memSyncDomain) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::preferredClusterDim"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, preferredClusterDim) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::launchCompletionEvent"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, launchCompletionEvent) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::deviceUpdatableKernelNode"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, deviceUpdatableKernelNode) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::sharedMemCarveout"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, sharedMemCarveout) - 0usize];
    ["Offset of field: cudaLaunchAttributeValue::nvlinkUtilCentricScheduling"]
        [::core::mem::offset_of!(cudaLaunchAttributeValue, nvlinkUtilCentricScheduling) - 0usize];
};
#[doc = " Launch attribute"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaLaunchAttribute_st {
    #[doc = "< Attribute to set"]
    pub id: cudaLaunchAttributeID,
    pub pad: [::core::ffi::c_char; 4usize],
    #[doc = "< Value of the attribute"]
    pub val: cudaLaunchAttributeValue,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchAttribute_st"][::core::mem::size_of::<cudaLaunchAttribute_st>() - 72usize];
    ["Alignment of cudaLaunchAttribute_st"]
        [::core::mem::align_of::<cudaLaunchAttribute_st>() - 8usize];
    ["Offset of field: cudaLaunchAttribute_st::id"]
        [::core::mem::offset_of!(cudaLaunchAttribute_st, id) - 0usize];
    ["Offset of field: cudaLaunchAttribute_st::pad"]
        [::core::mem::offset_of!(cudaLaunchAttribute_st, pad) - 4usize];
    ["Offset of field: cudaLaunchAttribute_st::val"]
        [::core::mem::offset_of!(cudaLaunchAttribute_st, val) - 8usize];
};
#[doc = " Launch attribute"]
pub type cudaLaunchAttribute = cudaLaunchAttribute_st;
#[doc = " CUDA extensible launch configuration"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaLaunchConfig_st {
    #[doc = "< Grid dimensions"]
    pub gridDim: dim3,
    #[doc = "< Block dimensions"]
    pub blockDim: dim3,
    #[doc = "< Dynamic shared-memory size per thread block in bytes"]
    pub dynamicSmemBytes: usize,
    #[doc = "< Stream identifier"]
    pub stream: cudaStream_t,
    #[doc = "< List of attributes; nullable if ::cudaLaunchConfig_t::numAttrs == 0"]
    pub attrs: *mut cudaLaunchAttribute,
    #[doc = "< Number of attributes populated in ::cudaLaunchConfig_t::attrs"]
    pub numAttrs: ::core::ffi::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaLaunchConfig_st"][::core::mem::size_of::<cudaLaunchConfig_st>() - 56usize];
    ["Alignment of cudaLaunchConfig_st"][::core::mem::align_of::<cudaLaunchConfig_st>() - 8usize];
    ["Offset of field: cudaLaunchConfig_st::gridDim"]
        [::core::mem::offset_of!(cudaLaunchConfig_st, gridDim) - 0usize];
    ["Offset of field: cudaLaunchConfig_st::blockDim"]
        [::core::mem::offset_of!(cudaLaunchConfig_st, blockDim) - 12usize];
    ["Offset of field: cudaLaunchConfig_st::dynamicSmemBytes"]
        [::core::mem::offset_of!(cudaLaunchConfig_st, dynamicSmemBytes) - 24usize];
    ["Offset of field: cudaLaunchConfig_st::stream"]
        [::core::mem::offset_of!(cudaLaunchConfig_st, stream) - 32usize];
    ["Offset of field: cudaLaunchConfig_st::attrs"]
        [::core::mem::offset_of!(cudaLaunchConfig_st, attrs) - 40usize];
    ["Offset of field: cudaLaunchConfig_st::numAttrs"]
        [::core::mem::offset_of!(cudaLaunchConfig_st, numAttrs) - 48usize];
};
#[doc = " CUDA extensible launch configuration"]
pub type cudaLaunchConfig_t = cudaLaunchConfig_st;
#[repr(u32)]
#[doc = " CUDA device NUMA config"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaDeviceNumaConfig {
    #[doc = "< The GPU is not a NUMA node"]
    cudaDeviceNumaConfigNone = 0,
    #[doc = "< The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID"]
    cudaDeviceNumaConfigNumaNode = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaAsyncCallbackEntry {
    _unused: [u8; 0],
}
#[doc = " CUDA async callback handle"]
pub type cudaAsyncCallbackHandle_t = *mut cudaAsyncCallbackEntry;
#[repr(u32)]
#[doc = " Types of async notification that can occur"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaAsyncNotificationType_enum {
    #[doc = "< Sent when the process has exceeded its device memory budget"]
    cudaAsyncNotificationTypeOverBudget = 1,
}
#[doc = " Types of async notification that can occur"]
pub use self::cudaAsyncNotificationType_enum as cudaAsyncNotificationType;
#[doc = " Information describing an async notification event"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct cudaAsyncNotificationInfo {
    #[doc = "< The type of notification being sent"]
    pub type_: cudaAsyncNotificationType,
    #[doc = "< Information about the notification. \\p type must be checked in order to interpret this field."]
    pub info: cudaAsyncNotificationInfo__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union cudaAsyncNotificationInfo__bindgen_ty_1 {
    #[doc = "< Information about notifications of type \\p cudaAsyncNotificationTypeOverBudget"]
    pub overBudget: cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< The number of bytes that the process has allocated above its device memory budget"]
    pub bytesOverBudget: ::core::ffi::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::size_of::<cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Alignment of cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1::bytesOverBudget"][::core::mem::offset_of!(
        cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1,
        bytesOverBudget
    )
        - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaAsyncNotificationInfo__bindgen_ty_1"]
        [::core::mem::size_of::<cudaAsyncNotificationInfo__bindgen_ty_1>() - 8usize];
    ["Alignment of cudaAsyncNotificationInfo__bindgen_ty_1"]
        [::core::mem::align_of::<cudaAsyncNotificationInfo__bindgen_ty_1>() - 8usize];
    ["Offset of field: cudaAsyncNotificationInfo__bindgen_ty_1::overBudget"]
        [::core::mem::offset_of!(cudaAsyncNotificationInfo__bindgen_ty_1, overBudget) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaAsyncNotificationInfo"]
        [::core::mem::size_of::<cudaAsyncNotificationInfo>() - 16usize];
    ["Alignment of cudaAsyncNotificationInfo"]
        [::core::mem::align_of::<cudaAsyncNotificationInfo>() - 8usize];
    ["Offset of field: cudaAsyncNotificationInfo::type_"]
        [::core::mem::offset_of!(cudaAsyncNotificationInfo, type_) - 0usize];
    ["Offset of field: cudaAsyncNotificationInfo::info"]
        [::core::mem::offset_of!(cudaAsyncNotificationInfo, info) - 8usize];
};
#[doc = " Information describing an async notification event"]
pub type cudaAsyncNotificationInfo_t = cudaAsyncNotificationInfo;
pub type cudaAsyncCallback = ::core::option::Option<
    unsafe extern "C" fn(
        arg1: *mut cudaAsyncNotificationInfo_t,
        arg2: *mut ::core::ffi::c_void,
        arg3: cudaAsyncCallbackHandle_t,
    ),
>;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CUDAlogLevel_enum {
    cudaLogLevelError = 0,
    cudaLogLevelWarning = 1,
}
pub use self::CUDAlogLevel_enum as cudaLogLevel;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUlogsCallbackEntry_st {
    _unused: [u8; 0],
}
pub type cudaLogsCallbackHandle = *mut CUlogsCallbackEntry_st;
pub type cudaLogIterator = ::core::ffi::c_uint;
#[repr(u32)]
#[doc = " CUDA Surface boundary modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaSurfaceBoundaryMode {
    #[doc = "< Zero boundary mode"]
    cudaBoundaryModeZero = 0,
    #[doc = "< Clamp boundary mode"]
    cudaBoundaryModeClamp = 1,
    #[doc = "< Trap boundary mode"]
    cudaBoundaryModeTrap = 2,
}
#[repr(u32)]
#[doc = " CUDA Surface format modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaSurfaceFormatMode {
    #[doc = "< Forced format mode"]
    cudaFormatModeForced = 0,
    #[doc = "< Auto format mode"]
    cudaFormatModeAuto = 1,
}
#[doc = " An opaque value that represents a CUDA Surface object"]
pub type cudaSurfaceObject_t = ::core::ffi::c_ulonglong;
#[repr(u32)]
#[doc = " CUDA texture address modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaTextureAddressMode {
    #[doc = "< Wrapping address mode"]
    cudaAddressModeWrap = 0,
    #[doc = "< Clamp to edge address mode"]
    cudaAddressModeClamp = 1,
    #[doc = "< Mirror address mode"]
    cudaAddressModeMirror = 2,
    #[doc = "< Border address mode"]
    cudaAddressModeBorder = 3,
}
#[repr(u32)]
#[doc = " CUDA texture filter modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaTextureFilterMode {
    #[doc = "< Point filter mode"]
    cudaFilterModePoint = 0,
    #[doc = "< Linear filter mode"]
    cudaFilterModeLinear = 1,
}
#[repr(u32)]
#[doc = " CUDA texture read modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaTextureReadMode {
    #[doc = "< Read texture as specified element type"]
    cudaReadModeElementType = 0,
    #[doc = "< Read texture as normalized float"]
    cudaReadModeNormalizedFloat = 1,
}
#[doc = " CUDA texture descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cudaTextureDesc {
    #[doc = " Texture address mode for up to 3 dimensions"]
    pub addressMode: [cudaTextureAddressMode; 3usize],
    #[doc = " Texture filter mode"]
    pub filterMode: cudaTextureFilterMode,
    #[doc = " Texture read mode"]
    pub readMode: cudaTextureReadMode,
    #[doc = " Perform sRGB->linear conversion during texture read"]
    pub sRGB: ::core::ffi::c_int,
    #[doc = " Texture Border Color"]
    pub borderColor: [f32; 4usize],
    #[doc = " Indicates whether texture reads are normalized or not"]
    pub normalizedCoords: ::core::ffi::c_int,
    #[doc = " Limit to the anisotropy ratio"]
    pub maxAnisotropy: ::core::ffi::c_uint,
    #[doc = " Mipmap filter mode"]
    pub mipmapFilterMode: cudaTextureFilterMode,
    #[doc = " Offset applied to the supplied mipmap level"]
    pub mipmapLevelBias: f32,
    #[doc = " Lower end of the mipmap level range to clamp access to"]
    pub minMipmapLevelClamp: f32,
    #[doc = " Upper end of the mipmap level range to clamp access to"]
    pub maxMipmapLevelClamp: f32,
    #[doc = " Disable any trilinear filtering optimizations."]
    pub disableTrilinearOptimization: ::core::ffi::c_int,
    #[doc = " Enable seamless cube map filtering."]
    pub seamlessCubemap: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cudaTextureDesc"][::core::mem::size_of::<cudaTextureDesc>() - 72usize];
    ["Alignment of cudaTextureDesc"][::core::mem::align_of::<cudaTextureDesc>() - 4usize];
    ["Offset of field: cudaTextureDesc::addressMode"]
        [::core::mem::offset_of!(cudaTextureDesc, addressMode) - 0usize];
    ["Offset of field: cudaTextureDesc::filterMode"]
        [::core::mem::offset_of!(cudaTextureDesc, filterMode) - 12usize];
    ["Offset of field: cudaTextureDesc::readMode"]
        [::core::mem::offset_of!(cudaTextureDesc, readMode) - 16usize];
    ["Offset of field: cudaTextureDesc::sRGB"]
        [::core::mem::offset_of!(cudaTextureDesc, sRGB) - 20usize];
    ["Offset of field: cudaTextureDesc::borderColor"]
        [::core::mem::offset_of!(cudaTextureDesc, borderColor) - 24usize];
    ["Offset of field: cudaTextureDesc::normalizedCoords"]
        [::core::mem::offset_of!(cudaTextureDesc, normalizedCoords) - 40usize];
    ["Offset of field: cudaTextureDesc::maxAnisotropy"]
        [::core::mem::offset_of!(cudaTextureDesc, maxAnisotropy) - 44usize];
    ["Offset of field: cudaTextureDesc::mipmapFilterMode"]
        [::core::mem::offset_of!(cudaTextureDesc, mipmapFilterMode) - 48usize];
    ["Offset of field: cudaTextureDesc::mipmapLevelBias"]
        [::core::mem::offset_of!(cudaTextureDesc, mipmapLevelBias) - 52usize];
    ["Offset of field: cudaTextureDesc::minMipmapLevelClamp"]
        [::core::mem::offset_of!(cudaTextureDesc, minMipmapLevelClamp) - 56usize];
    ["Offset of field: cudaTextureDesc::maxMipmapLevelClamp"]
        [::core::mem::offset_of!(cudaTextureDesc, maxMipmapLevelClamp) - 60usize];
    ["Offset of field: cudaTextureDesc::disableTrilinearOptimization"]
        [::core::mem::offset_of!(cudaTextureDesc, disableTrilinearOptimization) - 64usize];
    ["Offset of field: cudaTextureDesc::seamlessCubemap"]
        [::core::mem::offset_of!(cudaTextureDesc, seamlessCubemap) - 68usize];
};
#[doc = " An opaque value that represents a CUDA texture object"]
pub type cudaTextureObject_t = ::core::ffi::c_ulonglong;
impl cudaDataType_t {
    pub const CUDA_R_8F_UE4M3: cudaDataType_t = cudaDataType_t::CUDA_R_8F_E4M3;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaDataType_t {
    CUDA_R_16F = 2,
    CUDA_C_16F = 6,
    CUDA_R_16BF = 14,
    CUDA_C_16BF = 15,
    CUDA_R_32F = 0,
    CUDA_C_32F = 4,
    CUDA_R_64F = 1,
    CUDA_C_64F = 5,
    CUDA_R_4I = 16,
    CUDA_C_4I = 17,
    CUDA_R_4U = 18,
    CUDA_C_4U = 19,
    CUDA_R_8I = 3,
    CUDA_C_8I = 7,
    CUDA_R_8U = 8,
    CUDA_C_8U = 9,
    CUDA_R_16I = 20,
    CUDA_C_16I = 21,
    CUDA_R_16U = 22,
    CUDA_C_16U = 23,
    CUDA_R_32I = 10,
    CUDA_C_32I = 11,
    CUDA_R_32U = 12,
    CUDA_C_32U = 13,
    CUDA_R_64I = 24,
    CUDA_C_64I = 25,
    CUDA_R_64U = 26,
    CUDA_C_64U = 27,
    CUDA_R_8F_E4M3 = 28,
    CUDA_R_8F_E5M2 = 29,
    CUDA_R_8F_UE8M0 = 30,
    CUDA_R_6F_E2M3 = 31,
    CUDA_R_6F_E3M2 = 32,
    CUDA_R_4F_E2M1 = 33,
}
pub use self::cudaDataType_t as cudaDataType;
#[repr(u32)]
#[doc = " Enum for specifying how to leverage floating-point emulation algorithms"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cudaEmulationStrategy_t {
    #[doc = " The default emulation strategy.  For emulated computations, this is\n  equivalent to CUDA_EMULATION_STRATEGY_PERFORMANT, unless a library\n  dependent environment variable is set"]
    CUDA_EMULATION_STRATEGY_DEFAULT = 0,
    #[doc = " An emulation strategy which configures libraries to use emulation\n  when it provides a performance benefit"]
    CUDA_EMULATION_STRATEGY_PERFORMANT = 1,
    #[doc = " An emulation strategy which configures libraries to use emulation\n  whenever possible"]
    CUDA_EMULATION_STRATEGY_EAGER = 2,
}
#[doc = " Enum for specifying how to leverage floating-point emulation algorithms"]
pub use self::cudaEmulationStrategy_t as cudaEmulationStrategy;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum libraryPropertyType_t {
    MAJOR_VERSION = 0,
    MINOR_VERSION = 1,
    PATCH_LEVEL = 2,
}
pub use self::libraryPropertyType_t as libraryPropertyType;
unsafe extern "C" {
    #[doc = " \\brief Destroy all allocations and reset all state on the current device\n in the current process.\n\n Explicitly destroys and cleans up all resources associated with the current\n device in the current process. It is the caller's responsibility to ensure\n that the resources are not accessed or passed in subsequent API calls and\n doing so will result in undefined behavior. These resources include CUDA types\n ::cudaStream_t, ::cudaEvent_t, ::cudaArray_t, ::cudaMipmappedArray_t, ::cudaPitchedPtr,\n ::cudaTextureObject_t, ::cudaSurfaceObject_t, ::textureReference, ::surfaceReference,\n ::cudaExternalMemory_t, ::cudaExternalSemaphore_t and ::cudaGraphicsResource_t.\n These resources also include memory allocations by ::cudaMalloc, ::cudaMallocHost,\n ::cudaMallocManaged and ::cudaMallocPitch.\n Any subsequent API call to this device will reinitialize the device.\n\n Note that this function will reset the device immediately.  It is the caller's\n responsibility to ensure that the device is not being accessed by any\n other host threads from the process when this function is called.\n\n \\note ::cudaDeviceReset() will not destroy memory allocations by ::cudaMallocAsync() and\n ::cudaMallocFromPoolAsync(). These memory allocations need to be destroyed explicitly.\n \\note If a non-primary ::CUcontext is current to the thread, ::cudaDeviceReset()\n will destroy only the internal CUDA RT state for that ::CUcontext.\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSynchronize"]
    pub fn cudaDeviceReset() -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Wait for compute device to finish\n\n Blocks until the device has completed all preceding requested tasks.\n ::cudaDeviceSynchronize() returns an error if one of the preceding tasks\n has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for\n this device, the host thread will block until the device has finished\n its work.\n\n \\return\n ::cudaSuccess\n \\note_device_sync_deprecated\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceReset,\n ::cuCtxSynchronize"]
    pub fn cudaDeviceSynchronize() -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Set resource limits\n\n Setting \\p limit to \\p value is a request by the application to update\n the current limit maintained by the device.  The driver is free to\n modify the requested value to meet h/w requirements (this could be\n clamping to minimum or maximum values, rounding up to nearest element\n size, etc).  The application can use ::cudaDeviceGetLimit() to find out\n exactly what the limit has been set to.\n\n Setting each ::cudaLimit has its own specific restrictions, so each is\n discussed here.\n\n - ::cudaLimitStackSize controls the stack size in bytes of each GPU thread.\n\n - ::cudaLimitPrintfFifoSize controls the size in bytes of the shared FIFO\n   used by the ::printf() device system call. Setting\n   ::cudaLimitPrintfFifoSize must not be performed after launching any kernel\n   that uses the ::printf() device system call - in such case\n   ::cudaErrorInvalidValue will be returned.\n\n - ::cudaLimitMallocHeapSize controls the size in bytes of the heap used by\n   the ::malloc() and ::free() device system calls. Setting\n   ::cudaLimitMallocHeapSize must not be performed after launching any kernel\n   that uses the ::malloc() or ::free() device system calls - in such case\n   ::cudaErrorInvalidValue will be returned.\n\n - ::cudaLimitDevRuntimeSyncDepth controls the maximum nesting depth of a\n   grid at which a thread can safely call ::cudaDeviceSynchronize(). Setting\n   this limit must be performed before any launch of a kernel that uses the\n   device runtime and calls ::cudaDeviceSynchronize() above the default sync\n   depth, two levels of grids. Calls to ::cudaDeviceSynchronize() will fail\n   with error code ::cudaErrorSyncDepthExceeded if the limitation is\n   violated. This limit can be set smaller than the default or up the maximum\n   launch depth of 24. When setting this limit, keep in mind that additional\n   levels of sync depth require the runtime to reserve large amounts of\n   device memory which can no longer be used for user allocations. If these\n   reservations of device memory fail, ::cudaDeviceSetLimit will return\n   ::cudaErrorMemoryAllocation, and the limit can be reset to a lower value.\n   This limit is only applicable to devices of compute capability < 9.0.\n   Attempting to set this limit on devices of other compute capability will\n   results in error ::cudaErrorUnsupportedLimit being returned.\n\n - ::cudaLimitDevRuntimePendingLaunchCount controls the maximum number of\n   outstanding device runtime launches that can be made from the current\n   device. A grid is outstanding from the point of launch up until the grid\n   is known to have been completed. Device runtime launches which violate\n   this limitation fail and return ::cudaErrorLaunchPendingCountExceeded when\n   ::cudaGetLastError() is called after launch. If more pending launches than\n   the default (2048 launches) are needed for a module using the device\n   runtime, this limit can be increased. Keep in mind that being able to\n   sustain additional pending launches will require the runtime to reserve\n   larger amounts of device memory upfront which can no longer be used for\n   allocations. If these reservations fail, ::cudaDeviceSetLimit will return\n   ::cudaErrorMemoryAllocation, and the limit can be reset to a lower value.\n   This limit is only applicable to devices of compute capability 3.5 and\n   higher. Attempting to set this limit on devices of compute capability less\n   than 3.5 will result in the error ::cudaErrorUnsupportedLimit being\n   returned.\n\n - ::cudaLimitMaxL2FetchGranularity controls the L2 cache fetch granularity.\n   Values can range from 0B to 128B. This is purely a performance hint and\n   it can be ignored or clamped depending on the platform.\n\n - ::cudaLimitPersistingL2CacheSize controls size in bytes available\n   for persisting L2 cache. This is purely a performance hint and it\n   can be ignored or clamped depending on the platform.\n\n \\param limit - Limit to set\n \\param value - Size of limit\n\n \\return\n ::cudaSuccess,\n ::cudaErrorUnsupportedLimit,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceGetLimit,\n ::cuCtxSetLimit"]
    pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Return resource limits\n\n Returns in \\p *pValue the current size of \\p limit. The following ::cudaLimit values are supported.\n - ::cudaLimitStackSize is the stack size in bytes of each GPU thread.\n - ::cudaLimitPrintfFifoSize is the size in bytes of the shared FIFO used by the\n   ::printf() device system call.\n - ::cudaLimitMallocHeapSize is the size in bytes of the heap used by the\n   ::malloc() and ::free() device system calls.\n - ::cudaLimitDevRuntimeSyncDepth is the maximum grid depth at which a\n   thread can isssue the device runtime call ::cudaDeviceSynchronize()\n   to wait on child grid launches to complete. This functionality is removed\n   for devices of compute capability >= 9.0, and hence will return error\n   ::cudaErrorUnsupportedLimit on such devices.\n - ::cudaLimitDevRuntimePendingLaunchCount is the maximum number of outstanding\n   device runtime launches.\n - ::cudaLimitMaxL2FetchGranularity is the L2 cache fetch granularity.\n - ::cudaLimitPersistingL2CacheSize is the persisting L2 cache size in bytes.\n\n \\param limit  - Limit to query\n \\param pValue - Returned size of the limit\n\n \\return\n ::cudaSuccess,\n ::cudaErrorUnsupportedLimit,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceSetLimit,\n ::cuCtxGetLimit"]
    pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaDeviceGetTexture1DLinearMaxWidth(
        maxWidthInElements: *mut usize,
        fmtDesc: *const cudaChannelFormatDesc,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the preferred cache configuration for the current device.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this returns through \\p pCacheConfig the preferred cache\n configuration for the current device. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute functions.\n\n This will return a \\p pCacheConfig of ::cudaFuncCachePreferNone on devices\n where the size of the L1 cache and shared memory are fixed.\n\n The supported cache configurations are:\n - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory\n\n \\param pCacheConfig - Returned cache configuration\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig,\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n ::cuCtxGetCacheConfig"]
    pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns numerical values that correspond to the least and\n greatest stream priorities.\n\n Returns in \\p *leastPriority and \\p *greatestPriority the numerical values that correspond\n to the least and greatest stream priorities respectively. Stream priorities\n follow a convention where lower numbers imply greater priorities. The range of\n meaningful stream priorities is given by [\\p *greatestPriority, \\p *leastPriority].\n If the user attempts to create a stream with a priority value that is\n outside the the meaningful range as specified by this API, the priority is\n automatically clamped down or up to either \\p *leastPriority or \\p *greatestPriority\n respectively. See ::cudaStreamCreateWithPriority for details on creating a\n priority stream.\n A NULL may be passed in for \\p *leastPriority or \\p *greatestPriority if the value\n is not desired.\n\n This function will return '0' in both \\p *leastPriority and \\p *greatestPriority if\n the current context's device does not support stream priorities\n (see ::cudaDeviceGetAttribute).\n\n \\param leastPriority    - Pointer to an int in which the numerical value for least\n                           stream priority is returned\n \\param greatestPriority - Pointer to an int in which the numerical value for greatest\n                           stream priority is returned\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamGetPriority,\n ::cuCtxGetStreamPriorityRange"]
    pub fn cudaDeviceGetStreamPriorityRange(
        leastPriority: *mut ::core::ffi::c_int,
        greatestPriority: *mut ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the preferred cache configuration for the current device.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p cacheConfig the preferred cache\n configuration for the current device. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute the function. Any\n function preference set via\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\"\n or\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\"\n will be preferred over this device-wide setting. Setting the device-wide\n cache configuration to ::cudaFuncCachePreferNone will cause subsequent\n kernel launches to prefer to not change the cache configuration unless\n required to launch the kernel.\n\n This setting does nothing on devices where the size of the L1 cache and\n shared memory are fixed.\n\n Launching a kernel with a different preference than the most recent\n preference setting may insert a device-side synchronization point.\n\n The supported cache configurations are:\n - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory\n\n \\param cacheConfig - Requested cache configuration\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceGetCacheConfig,\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n ::cuCtxSetCacheConfig"]
    pub fn cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a handle to a compute device\n\n Returns in \\p *device a device ordinal given a PCI bus ID string.\n\n \\param device   - Returned device ordinal\n\n \\param pciBusId - String in one of the following forms:\n [domain]:[bus]:[device].[function]\n [domain]:[bus]:[device]\n [bus]:[device].[function]\n where \\p domain, \\p bus, \\p device, and \\p function are all hexadecimal values\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceGetPCIBusId,\n ::cuDeviceGetByPCIBusId"]
    pub fn cudaDeviceGetByPCIBusId(
        device: *mut ::core::ffi::c_int,
        pciBusId: *const ::core::ffi::c_char,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a PCI Bus Id string for the device\n\n Returns an ASCII string identifying the device \\p dev in the NULL-terminated\n string pointed to by \\p pciBusId. \\p len specifies the maximum length of the\n string that may be returned.\n\n \\param pciBusId - Returned identifier string for the device in the following format\n [domain]:[bus]:[device].[function]\n where \\p domain, \\p bus, \\p device, and \\p function are all hexadecimal values.\n pciBusId should be large enough to store 13 characters including the NULL-terminator.\n\n \\param len      - Maximum length of string to store in \\p name\n\n \\param device   - Device to get identifier string for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceGetByPCIBusId,\n ::cuDeviceGetPCIBusId"]
    pub fn cudaDeviceGetPCIBusId(
        pciBusId: *mut ::core::ffi::c_char,
        len: ::core::ffi::c_int,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets an interprocess handle for a previously allocated event\n\n Takes as input a previously allocated event. This event must have been\n created with the ::cudaEventInterprocess and ::cudaEventDisableTiming\n flags set. This opaque handle may be copied into other processes and\n opened with ::cudaIpcOpenEventHandle to allow efficient hardware\n synchronization between GPU work in different processes.\n\n After the event has been been opened in the importing process,\n ::cudaEventRecord, ::cudaEventSynchronize, ::cudaStreamWaitEvent and\n ::cudaEventQuery may be used in either process. Performing operations\n on the imported event after the exported event has been freed\n with ::cudaEventDestroy will result in undefined behavior.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param handle - Pointer to a user allocated cudaIpcEventHandle\n                    in which to return the opaque event handle\n \\param event   - Event allocated with ::cudaEventInterprocess and\n                    ::cudaEventDisableTiming flags.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaEventCreate,\n ::cudaEventDestroy,\n ::cudaEventSynchronize,\n ::cudaEventQuery,\n ::cudaStreamWaitEvent,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cuIpcGetEventHandle"]
    pub fn cudaIpcGetEventHandle(
        handle: *mut cudaIpcEventHandle_t,
        event: cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Opens an interprocess event handle for use in the current process\n\n Opens an interprocess event handle exported from another process with\n ::cudaIpcGetEventHandle. This function returns a ::cudaEvent_t that behaves like\n a locally created event with the ::cudaEventDisableTiming flag specified.\n This event must be freed with ::cudaEventDestroy.\n\n Performing operations on the imported event after the exported event has\n been freed with ::cudaEventDestroy will result in undefined behavior.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param event - Returns the imported event\n \\param handle  - Interprocess handle to open\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue,\n ::cudaErrorDeviceUninitialized\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaEventCreate,\n ::cudaEventDestroy,\n ::cudaEventSynchronize,\n ::cudaEventQuery,\n ::cudaStreamWaitEvent,\n ::cudaIpcGetEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cuIpcOpenEventHandle"]
    pub fn cudaIpcOpenEventHandle(
        event: *mut cudaEvent_t,
        handle: cudaIpcEventHandle_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets an interprocess memory handle for an existing device memory\n          allocation\n\n Takes a pointer to the base of an existing device memory allocation created\n with ::cudaMalloc and exports it for use in another process. This is a\n lightweight operation and may be called multiple times on an allocation\n without adverse effects.\n\n If a region of memory is freed with ::cudaFree and a subsequent call\n to ::cudaMalloc returns memory with the same device address,\n ::cudaIpcGetMemHandle will return a unique handle for the\n new memory.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param handle - Pointer to user allocated ::cudaIpcMemHandle to return\n                    the handle in.\n \\param devPtr - Base pointer to previously allocated device memory\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMalloc,\n ::cudaFree,\n ::cudaIpcGetEventHandle,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cuIpcGetMemHandle"]
    pub fn cudaIpcGetMemHandle(
        handle: *mut cudaIpcMemHandle_t,
        devPtr: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Opens an interprocess memory handle exported from another process\n          and returns a device pointer usable in the local process.\n\n Maps memory exported from another process with ::cudaIpcGetMemHandle into\n the current device address space. For contexts on different devices\n ::cudaIpcOpenMemHandle can attempt to enable peer access between the\n devices as if the user called ::cudaDeviceEnablePeerAccess. This behavior is\n controlled by the ::cudaIpcMemLazyEnablePeerAccess flag.\n ::cudaDeviceCanAccessPeer can determine if a mapping is possible.\n\n ::cudaIpcOpenMemHandle can open handles to devices that may not be visible\n in the process calling the API.\n\n Contexts that may open ::cudaIpcMemHandles are restricted in the following way.\n ::cudaIpcMemHandles from each device in a given process may only be opened\n by one context per device per other process.\n\n If the memory handle has already been opened by the current context, the\n reference count on the handle is incremented by 1 and the existing device pointer\n is returned.\n\n Memory returned from ::cudaIpcOpenMemHandle must be freed with\n ::cudaIpcCloseMemHandle.\n\n Calling ::cudaFree on an exported memory region before calling\n ::cudaIpcCloseMemHandle in the importing context will result in undefined\n behavior.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param devPtr - Returned device pointer\n \\param handle - ::cudaIpcMemHandle to open\n \\param flags  - Flags for this operation. Must be specified as ::cudaIpcMemLazyEnablePeerAccess\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorDeviceUninitialized,\n ::cudaErrorTooManyPeers,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\note No guarantees are made about the address returned in \\p *devPtr.\n In particular, multiple processes may not receive the same address for the same \\p handle.\n\n \\sa\n ::cudaMalloc,\n ::cudaFree,\n ::cudaIpcGetEventHandle,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cudaDeviceEnablePeerAccess,\n ::cudaDeviceCanAccessPeer,\n ::cuIpcOpenMemHandle"]
    pub fn cudaIpcOpenMemHandle(
        devPtr: *mut *mut ::core::ffi::c_void,
        handle: cudaIpcMemHandle_t,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Attempts to close memory mapped with cudaIpcOpenMemHandle\n\n Decrements the reference count of the memory returnd by ::cudaIpcOpenMemHandle by 1.\n When the reference count reaches 0, this API unmaps the memory. The original allocation\n in the exporting process as well as imported mappings in other processes\n will be unaffected.\n\n Any resources used to enable peer access will be freed if this is the\n last mapping using them.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param devPtr - Device pointer returned by ::cudaIpcOpenMemHandle\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMalloc,\n ::cudaFree,\n ::cudaIpcGetEventHandle,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcOpenMemHandle,\n ::cuIpcCloseMemHandle"]
    pub fn cudaIpcCloseMemHandle(devPtr: *mut ::core::ffi::c_void) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaDeviceFlushGPUDirectRDMAWrites(
        target: cudaFlushGPUDirectRDMAWritesTarget,
        scope: cudaFlushGPUDirectRDMAWritesScope,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Registers a callback function to receive async notifications\n\n Registers \\p callbackFunc to receive async notifications.\n\n The \\p userData parameter is passed to the callback function at async notification time.\n Likewise, \\p callback is also passed to the callback function to distinguish between\n multiple registered callbacks.\n\n The callback function being registered should be designed to return quickly (~10ms).\n Any long running tasks should be queued for execution on an application thread.\n\n Callbacks may not call cudaDeviceRegisterAsyncNotification or cudaDeviceUnregisterAsyncNotification.\n Doing so will result in ::cudaErrorNotPermitted. Async notification callbacks execute\n in an undefined order and may be serialized.\n\n Returns in \\p *callback a handle representing the registered callback instance.\n\n \\param device - The device on which to register the callback\n \\param callbackFunc - The function to register as a callback\n \\param userData - A generic pointer to user data. This is passed into the callback function.\n \\param callback - A handle representing the registered callback instance\n\n \\return\n ::cudaSuccess\n ::cudaErrorNotSupported\n ::cudaErrorInvalidDevice\n ::cudaErrorInvalidValue\n ::cudaErrorNotPermitted\n ::cudaErrorUnknown\n \\notefnerr\n\n \\sa\n ::cudaDeviceUnregisterAsyncNotification"]
    pub fn cudaDeviceRegisterAsyncNotification(
        device: ::core::ffi::c_int,
        callbackFunc: cudaAsyncCallback,
        userData: *mut ::core::ffi::c_void,
        callback: *mut cudaAsyncCallbackHandle_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Unregisters an async notification callback\n\n Unregisters \\p callback so that the corresponding callback function will stop receiving\n async notifications.\n\n \\param device - The device from which to remove \\p callback.\n \\param callback - The callback instance to unregister from receiving async notifications.\n\n \\return\n ::cudaSuccess\n ::cudaErrorNotSupported\n ::cudaErrorInvalidDevice\n ::cudaErrorInvalidValue\n ::cudaErrorNotPermitted\n ::cudaErrorUnknown\n \\notefnerr\n\n \\sa\n ::cudaDeviceRegisterAsyncNotification"]
    pub fn cudaDeviceUnregisterAsyncNotification(
        device: ::core::ffi::c_int,
        callback: cudaAsyncCallbackHandle_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the shared memory configuration for the current device.\n\n \\deprecated\n\n This function will return in \\p pConfig the current size of shared memory banks\n on the current device. On devices with configurable shared memory banks,\n ::cudaDeviceSetSharedMemConfig can be used to change this setting, so that all\n subsequent kernel launches will by default use the new bank size. When\n ::cudaDeviceGetSharedMemConfig is called on devices without configurable shared\n memory, it will return the fixed bank size of the hardware.\n\n The returned bank configurations can be either:\n - ::cudaSharedMemBankSizeFourByte - shared memory bank width is four bytes.\n - ::cudaSharedMemBankSizeEightByte - shared memory bank width is eight bytes.\n\n \\param pConfig - Returned cache configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig,\n ::cudaDeviceGetCacheConfig,\n ::cudaDeviceSetSharedMemConfig,\n ::cudaFuncSetCacheConfig,\n ::cuCtxGetSharedMemConfig"]
    pub fn cudaDeviceGetSharedMemConfig(pConfig: *mut cudaSharedMemConfig) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the shared memory configuration for the current device.\n\n \\deprecated\n\n On devices with configurable shared memory banks, this function will set\n the shared memory bank size which is used for all subsequent kernel launches.\n Any per-function setting of shared memory set via ::cudaFuncSetSharedMemConfig\n will override the device wide setting.\n\n Changing the shared memory configuration between launches may introduce\n a device side synchronization point.\n\n Changing the shared memory bank size will not increase shared memory usage\n or affect occupancy of kernels, but may have major effects on performance.\n Larger bank sizes will allow for greater potential bandwidth to shared memory,\n but will change what kinds of accesses to shared memory will result in bank\n conflicts.\n\n This function will do nothing on devices with fixed shared memory bank size.\n\n The supported bank configurations are:\n - ::cudaSharedMemBankSizeDefault: set bank width the device default (currently,\n   four bytes)\n - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be four bytes\n   natively.\n - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight\n   bytes natively.\n\n \\param config - Requested cache configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig,\n ::cudaDeviceGetCacheConfig,\n ::cudaDeviceGetSharedMemConfig,\n ::cudaFuncSetCacheConfig,\n ::cuCtxSetSharedMemConfig"]
    pub fn cudaDeviceSetSharedMemConfig(config: cudaSharedMemConfig) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the last error from a runtime call\n\n Returns the last error that has been produced by any of the runtime calls\n in the same instance of the CUDA Runtime library in the host thread and\n resets it to ::cudaSuccess.\n\n Note: Multiple instances of the CUDA Runtime library can be present in an\n application when using a library that statically links the CUDA Runtime.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorMissingConfiguration,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorInitializationError,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorUnmapBufferObjectFailed,\n ::cudaErrorInvalidDevicePointer,\n ::cudaErrorInvalidTexture,\n ::cudaErrorInvalidTextureBinding,\n ::cudaErrorInvalidChannelDescriptor,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorInvalidFilterSetting,\n ::cudaErrorInvalidNormSetting,\n ::cudaErrorUnknown,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInsufficientDriver,\n ::cudaErrorNoDevice,\n ::cudaErrorSetOnActiveProcess,\n ::cudaErrorStartupFailure,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaPeekAtLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError"]
    pub fn cudaGetLastError() -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the last error from a runtime call\n\n Returns the last error that has been produced by any of the runtime calls\n in the same instance of the CUDA Runtime library in the host thread. This\n call does not reset the error to ::cudaSuccess like ::cudaGetLastError().\n\n Note: Multiple instances of the CUDA Runtime library can be present in an\n application when using a library that statically links the CUDA Runtime.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorMissingConfiguration,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorInitializationError,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorUnmapBufferObjectFailed,\n ::cudaErrorInvalidDevicePointer,\n ::cudaErrorInvalidTexture,\n ::cudaErrorInvalidTextureBinding,\n ::cudaErrorInvalidChannelDescriptor,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorInvalidFilterSetting,\n ::cudaErrorInvalidNormSetting,\n ::cudaErrorUnknown,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInsufficientDriver,\n ::cudaErrorNoDevice,\n ::cudaErrorSetOnActiveProcess,\n ::cudaErrorStartupFailure,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError"]
    pub fn cudaPeekAtLastError() -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the string representation of an error code enum name\n\n Returns a string containing the name of an error code in the enum.  If the error\n code is not recognized, \"unrecognized error code\" is returned.\n\n \\param error - Error code to convert to string\n\n \\return\n \\p char* pointer to a NULL-terminated string\n\n \\sa ::cudaGetErrorString, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError,\n ::cuGetErrorName"]
    pub fn cudaGetErrorName(error: cudaError_t) -> *const ::core::ffi::c_char;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the description string for an error code\n\n Returns the description string for an error code.  If the error\n code is not recognized, \"unrecognized error code\" is returned.\n\n \\param error - Error code to convert to string\n\n \\return\n \\p char* pointer to a NULL-terminated string\n\n \\sa ::cudaGetErrorName, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError,\n ::cuGetErrorString"]
    pub fn cudaGetErrorString(error: cudaError_t) -> *const ::core::ffi::c_char;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the number of compute-capable devices\n\n Returns in \\p *count the number of devices with compute capability greater\n or equal to 2.0 that are available for execution.\n\n \\param count - Returns the number of devices with compute capability\n greater or equal to 2.0\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDevice, ::cudaSetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice,\n ::cudaInitDevice,\n ::cuDeviceGetCount"]
    pub fn cudaGetDeviceCount(count: *mut ::core::ffi::c_int) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns information about the compute-device\n\n Returns in \\p *prop the properties of device \\p dev.\n \\param prop   - Properties for the specified device\n \\param device - Device number to get properties for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice,\n ::cudaDeviceGetAttribute,\n ::cudaInitDevice,\n ::cuDeviceGetAttribute,\n ::cuDeviceGetName"]
    pub fn cudaGetDeviceProperties(
        prop: *mut cudaDeviceProp,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns information about the device\n\n Returns in \\p *value the integer value of the attribute \\p attr on device\n \\p device.\n\n \\param value  - Returned device attribute value\n \\param attr   - Device attribute to query\n \\param device - Device number to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice,\n ::cudaGetDeviceProperties,\n ::cudaInitDevice,\n ::cuDeviceGetAttribute"]
    pub fn cudaDeviceGetAttribute(
        value: *mut ::core::ffi::c_int,
        attr: cudaDeviceAttr,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries details about atomic operations supported between the device and host.\n\n Returns in \\p *capabilities the details about requested atomic \\p *operations over the\n the link between \\p dev and the host. The allocated size of \\p *operations and\n \\p *capabilities must be \\p count.\n\n For each ::cudaAtomicOperation in \\p *operations, the corresponding result in \\p *capabilities\n will be a bitmask indicating which of ::cudaAtomicOperationCapability the link supports natively.\n\n Returns ::cudaErrorInvalidDevice if \\p dev is not valid.\n\n Returns ::cudaErrorInvalidValue if \\p *capabilities or \\p *operations is NULL, if \\p count is 0,\n or if any of \\p *operations is not valid.\n\n \\param capabilities          - Returned capability details of each requested operation\n \\param operations            - Requested operations\n \\param count                 - Count of requested operations and size of capabilities\n \\param dev                   - Device handle\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaDeviceGetAttribute,\n ::cudaDeviceGetP2PAtomicCapabilities,\n ::cuDeviceGeHostAtomicCapabilities"]
    pub fn cudaDeviceGetHostAtomicCapabilities(
        capabilities: *mut ::core::ffi::c_uint,
        operations: *const cudaAtomicOperation,
        count: ::core::ffi::c_uint,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the default mempool of a device\n\n The default mempool of a device contains device memory from that device.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuDeviceGetDefaultMemPool, ::cudaMallocAsync, ::cudaMemPoolTrimTo, ::cudaMemPoolGetAttribute, ::cudaDeviceSetMemPool, ::cudaMemPoolSetAttribute, ::cudaMemPoolSetAccess"]
    pub fn cudaDeviceGetDefaultMemPool(
        memPool: *mut cudaMemPool_t,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the current memory pool of a device\n\n The memory pool must be local to the specified device.\n Unless a mempool is specified in the ::cudaMallocAsync call,\n ::cudaMallocAsync allocates from the current mempool of the provided stream's device.\n By default, a device's current memory pool is its default memory pool.\n\n \\note Use ::cudaMallocFromPoolAsync to specify asynchronous allocations from a device different\n than the one the stream runs on.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorInvalidDevice\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_callback\n\n \\sa ::cuDeviceSetMemPool, ::cudaDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolDestroy, ::cudaMallocFromPoolAsync"]
    pub fn cudaDeviceSetMemPool(device: ::core::ffi::c_int, memPool: cudaMemPool_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets the current mempool for a device\n\n Returns the last pool provided to ::cudaDeviceSetMemPool for this device\n or the device's default memory pool if ::cudaDeviceSetMemPool has never been called.\n By default the current mempool is the default mempool for a device,\n otherwise the returned pool must have been set with ::cuDeviceSetMemPool or ::cudaDeviceSetMemPool.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceSetMemPool"]
    pub fn cudaDeviceGetMemPool(
        memPool: *mut cudaMemPool_t,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Return NvSciSync attributes that this device can support.\n\n Returns in \\p nvSciSyncAttrList, the properties of NvSciSync that\n this CUDA device, \\p dev can support. The returned \\p nvSciSyncAttrList\n can be used to create an NvSciSync that matches this device's capabilities.\n\n If NvSciSyncAttrKey_RequiredPerm field in \\p nvSciSyncAttrList is\n already set this API will return ::cudaErrorInvalidValue.\n\n The applications should set \\p nvSciSyncAttrList to a valid\n NvSciSyncAttrList failing which this API will return\n ::cudaErrorInvalidHandle.\n\n The \\p flags controls how applications intends to use\n the NvSciSync created from the \\p nvSciSyncAttrList. The valid flags are:\n - ::cudaNvSciSyncAttrSignal, specifies that the applications intends to\n signal an NvSciSync on this CUDA device.\n - ::cudaNvSciSyncAttrWait, specifies that the applications intends to\n wait on an NvSciSync on this CUDA device.\n\n At least one of these flags must be set, failing which the API\n returns ::cudaErrorInvalidValue. Both the flags are orthogonal\n to one another: a developer may set both these flags that allows to\n set both wait and signal specific attributes in the same \\p nvSciSyncAttrList.\n\n Note that this API updates the input \\p nvSciSyncAttrList with values equivalent\n to the following public attribute key-values:\n NvSciSyncAttrKey_RequiredPerm is set to\n - NvSciSyncAccessPerm_SignalOnly if ::cudaNvSciSyncAttrSignal is set in \\p flags.\n - NvSciSyncAccessPerm_WaitOnly if ::cudaNvSciSyncAttrWait is set in \\p flags.\n - NvSciSyncAccessPerm_WaitSignal if both ::cudaNvSciSyncAttrWait and\n ::cudaNvSciSyncAttrSignal are set in \\p flags.\n NvSciSyncAttrKey_PrimitiveInfo is set to\n - NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid \\p device.\n - NvSciSyncAttrValPrimitiveType_Syncpoint if \\p device is a Tegra device.\n - NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if \\p device is GA10X+.\n NvSciSyncAttrKey_GpuId is set to the same UUID that is returned in\n \\p cudaDeviceProp.uuid from ::cudaDeviceGetProperties for this \\p device.\n\n \\param nvSciSyncAttrList     - Return NvSciSync attributes supported.\n \\param device                - Valid Cuda Device to get NvSciSync attributes for.\n \\param flags                 - flags describing NvSciSync usage.\n\n \\return\n\n ::cudaSuccess,\n ::cudaErrorDeviceUninitialized,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidHandle,\n ::cudaErrorInvalidDevice,\n ::cudaErrorNotSupported,\n ::cudaErrorMemoryAllocation\n\n \\sa\n ::cudaImportExternalSemaphore,\n ::cudaDestroyExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync,\n ::cudaWaitExternalSemaphoresAsync"]
    pub fn cudaDeviceGetNvSciSyncAttributes(
        nvSciSyncAttrList: *mut ::core::ffi::c_void,
        device: ::core::ffi::c_int,
        flags: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries attributes of the link between two devices.\n\n Returns in \\p *value the value of the requested attribute \\p attrib of the\n link between \\p srcDevice and \\p dstDevice. The supported attributes are:\n - ::cudaDevP2PAttrPerformanceRank: A relative value indicating the\n   performance of the link between two devices. Lower value means better\n   performance (0 being the value used for most performant link).\n - ::cudaDevP2PAttrAccessSupported: 1 if peer access is enabled.\n - ::cudaDevP2PAttrNativeAtomicSupported: 1 if all native atomic operations\n   over the link are supported.\n - ::cudaDevP2PAttrCudaArrayAccessSupported: 1 if accessing CUDA arrays over\n   the link is supported.\n - ::cudaDevP2PAttrOnlyPartialNativeAtomicSupported: 1 if some\n   CUDA-valid atomic operations over the link are supported. Information about\n   specific operations can be retrieved with ::cudaDeviceGetP2PAtomicCapabilities.\n\n Returns ::cudaErrorInvalidDevice if \\p srcDevice or \\p dstDevice are not valid\n or if they represent the same device.\n\n Returns ::cudaErrorInvalidValue if \\p attrib is not valid or if \\p value is\n a null pointer.\n\n \\param value         - Returned value of the requested attribute\n \\param attrib        - The requested attribute of the link between \\p srcDevice and \\p dstDevice.\n \\param srcDevice     - The source device of the target link.\n \\param dstDevice     - The destination device of the target link.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceEnablePeerAccess,\n ::cudaDeviceDisablePeerAccess,\n ::cudaDeviceCanAccessPeer,\n ::cuDeviceGetP2PAttribute\n ::cudaDeviceGetP2PAtomicCapabilities"]
    pub fn cudaDeviceGetP2PAttribute(
        value: *mut ::core::ffi::c_int,
        attr: cudaDeviceP2PAttr,
        srcDevice: ::core::ffi::c_int,
        dstDevice: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries details about atomic operations supported between two devices\n\n Returns in \\p *capabilities the details about requested atomic \\p *operations over the\n the link between \\p srcDevice and \\p dstDevice. The allocated size of \\p *operations and\n \\p *capabilities must be \\p count.\n\n For each ::cudaAtomicOperation in \\p *operations, the corresponding result in \\p *capabilities\n will be a bitmask indicating which of ::cudaAtomicOperationCapability the link supports natively.\n\n Returns ::cudaErrorInvalidDevice if \\p srcDevice or \\p dstDevice are not valid\n or if they represent the same device.\n\n Returns ::cudaErrorInvalidValue if \\p *capabilities or \\p *operations is NULL, if \\p count is 0,\n or if any of \\p *operations is not valid.\n\n \\param capabilities          - Returned capability details of each requested operation\n \\param operations            - Requested operations\n \\param count                 - Count of requested operations and size of capabilities\n \\param srcDevice             - The source device of the target link\n \\param dstDevice             - The destination device of the target link\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaDeviceGetP2PAttribute,\n ::cuDeviceGetP2PAttribute,\n ::cuDeviceGetP2PAtomicCapabilities"]
    pub fn cudaDeviceGetP2PAtomicCapabilities(
        capabilities: *mut ::core::ffi::c_uint,
        operations: *const cudaAtomicOperation,
        count: ::core::ffi::c_uint,
        srcDevice: ::core::ffi::c_int,
        dstDevice: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Select compute-device which best matches criteria\n\n Returns in \\p *device the device which has properties that best match\n \\p *prop.\n\n \\param device - Device with best match\n \\param prop   - Desired device properties\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice,\n ::cudaGetDeviceProperties,\n ::cudaInitDevice"]
    pub fn cudaChooseDevice(
        device: *mut ::core::ffi::c_int,
        prop: *const cudaDeviceProp,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initialize device to be used for GPU executions\n\n This function will initialize the CUDA Runtime structures and primary context on \\p device when called,\n but the context will not be made current to \\p device.\n\n When ::cudaInitDeviceFlagsAreValid is set in \\p flags, deviceFlags are applied to the requested device.\n The values of deviceFlags match those of the flags parameters in ::cudaSetDeviceFlags.\n The effect may be verified by ::cudaGetDeviceFlags.\n\n This function will return an error if the device is in ::cudaComputeModeExclusiveProcess\n and is occupied by another process or if the device is in ::cudaComputeModeProhibited.\n\n \\param device - Device on which the runtime will initialize itself.\n \\param deviceFlags - Parameters for device operation.\n \\param flags - Flags for controlling the device initialization.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice, ::cudaSetDevice\n ::cuCtxSetCurrent"]
    pub fn cudaInitDevice(
        device: ::core::ffi::c_int,
        deviceFlags: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Set device to be used for GPU executions\n\n Sets \\p device as the current device for the calling host thread.\n Valid device id's are 0 to (::cudaGetDeviceCount() - 1).\n\n Any device memory subsequently allocated from this host thread\n using ::cudaMalloc(), ::cudaMallocPitch() or ::cudaMallocArray()\n will be physically resident on \\p device.  Any host memory allocated\n from this host thread using ::cudaMallocHost() or ::cudaHostAlloc()\n or ::cudaHostRegister() will have its lifetime associated  with\n \\p device.  Any streams or events created from this host thread will\n be associated with \\p device.  Any kernels launched from this host\n thread using the <<<>>> operator or ::cudaLaunchKernel() will be executed\n on \\p device.\n\n This call may be made from any host thread, to any device, and at\n any time.  This function will do no synchronization with the previous\n or new device,\n and should only take significant time when it initializes the runtime's context state.\n This call will bind the primary context of the specified device to the calling thread and all the\n subsequent memory allocations, stream and event creations, and kernel launches\n will be associated with the primary context.\n This function will also immediately initialize the runtime state on the primary context,\n and the context will be current on \\p device immediately. This function will return an\n error if the device is in ::cudaComputeModeExclusiveProcess and is occupied by another\n process or if the device is in ::cudaComputeModeProhibited.\n\n It is not required to call ::cudaInitDevice before using this function.\n \\param device - Device on which the active host thread should execute the\n device code.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorDeviceUnavailable,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice,\n ::cudaInitDevice,\n ::cuCtxSetCurrent"]
    pub fn cudaSetDevice(device: ::core::ffi::c_int) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns which device is currently being used\n\n Returns in \\p *device the current device for the calling host thread.\n\n \\param device - Returns the device on which the active host thread\n executes the device code.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorDeviceUnavailable,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice,\n ::cuCtxGetCurrent"]
    pub fn cudaGetDevice(device: *mut ::core::ffi::c_int) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Set a list of devices that can be used for CUDA\n\n Sets a list of devices for CUDA execution in priority order using\n \\p device_arr. The parameter \\p len specifies the number of elements in the\n list.  CUDA will try devices from the list sequentially until it finds one\n that works.  If this function is not called, or if it is called with a \\p len\n of 0, then CUDA will go back to its default behavior of trying devices\n sequentially from a default list containing all of the available CUDA\n devices in the system. If a specified device ID in the list does not exist,\n this function will return ::cudaErrorInvalidDevice. If \\p len is not 0 and\n \\p device_arr is NULL or if \\p len exceeds the number of devices in\n the system, then ::cudaErrorInvalidValue is returned.\n\n \\param device_arr - List of devices to try\n \\param len        - Number of devices in specified list\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties,\n ::cudaSetDeviceFlags,\n ::cudaChooseDevice"]
    pub fn cudaSetValidDevices(
        device_arr: *mut ::core::ffi::c_int,
        len: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets flags to be used for device executions\n\n Records \\p flags as the flags for the current device. If the current device\n has been set and that device has already been initialized, the previous flags\n are overwritten. If the current device has not been initialized, it is\n initialized with the provided flags. If no device has been made current to\n the calling thread, a default device is selected and initialized with the\n provided flags.\n\n The three LSBs of the \\p flags parameter can be used to control how the CPU\n thread interacts with the OS scheduler when waiting for results from the\n device.\n\n - ::cudaDeviceScheduleAuto: The default value if the \\p flags parameter is\n zero, uses a heuristic based on the number of active CUDA contexts in the\n process \\p C and the number of logical processors in the system \\p P. If\n \\p C \\> \\p P, then CUDA will yield to other OS threads when waiting for the\n device, otherwise CUDA will not yield while waiting for results and\n actively spin on the processor. Additionally, on Tegra devices,\n ::cudaDeviceScheduleAuto uses a heuristic based on the power profile of\n the platform and may choose ::cudaDeviceScheduleBlockingSync for low-powered\n devices.\n - ::cudaDeviceScheduleSpin: Instruct CUDA to actively spin when waiting for\n results from the device. This can decrease latency when waiting for the\n device, but may lower the performance of CPU threads if they are performing\n work in parallel with the CUDA thread.\n - ::cudaDeviceScheduleYield: Instruct CUDA to yield its thread when waiting\n for results from the device. This can increase latency when waiting for the\n device, but can increase the performance of CPU threads performing work in\n parallel with the device.\n - ::cudaDeviceScheduleBlockingSync: Instruct CUDA to block the CPU thread\n on a synchronization primitive when waiting for the device to finish work.\n - ::cudaDeviceBlockingSync: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the device to finish work. <br>\n \\ref deprecated \"Deprecated:\" This flag was deprecated as of CUDA 4.0 and\n replaced with ::cudaDeviceScheduleBlockingSync.\n - ::cudaDeviceMapHost: This flag enables allocating pinned\n host memory that is accessible to the device. It is implicit for the\n runtime but may be absent if a context is created using the driver API.\n If this flag is not set, ::cudaHostGetDevicePointer() will always return\n a failure code.\n - ::cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce local memory\n after resizing local memory for a kernel. This can prevent thrashing by\n local memory allocations when launching many kernels with high local\n memory usage at the cost of potentially increased memory usage. <br>\n \\ref deprecated \"Deprecated:\" This flag is deprecated and the behavior enabled\n by this flag is now the default and cannot be disabled.\n - ::cudaDeviceSyncMemops: Ensures that synchronous memory operations initiated\n on this context will always synchronize. See further documentation in the\n section titled \"API Synchronization behavior\" to learn more about cases when\n synchronous memory operations can exhibit asynchronous behavior.\n\n \\param flags - Parameters for device operation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceFlags, ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaSetDevice, ::cudaSetValidDevices,\n ::cudaInitDevice,\n ::cudaChooseDevice,\n ::cuDevicePrimaryCtxSetFlags"]
    pub fn cudaSetDeviceFlags(flags: ::core::ffi::c_uint) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets the flags for the current device\n\n\n Returns in \\p flags the flags for the current device. If there is a current\n device for the calling thread, the flags for the device are returned. If\n there is no current device, the flags for the first device are returned,\n which may be the default flags.  Compare to the behavior of\n ::cudaSetDeviceFlags.\n\n Typically, the flags returned should match the behavior that will be seen\n if the calling thread uses a device after this call, without any change to\n the flags or current device inbetween by this or another thread.  Note that\n if the device is not initialized, it is possible for another thread to\n change the flags for the current device before it is initialized.\n Additionally, when using exclusive mode, if this thread has not requested a\n specific device, it may use a device other than the first device, contrary\n to the assumption made by this function.\n\n If a context has been created via the driver API and is current to the\n calling thread, the flags for that context are always returned.\n\n Flags returned by this function may specifically include ::cudaDeviceMapHost\n even though it is not accepted by ::cudaSetDeviceFlags because it is\n implicit in runtime API flags.  The reason for this is that the current\n context may have been created via the driver API in which case the flag is\n not implicit and may be unset.\n\n \\param flags - Pointer to store the device flags\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaSetDevice, ::cudaSetDeviceFlags,\n ::cudaInitDevice,\n ::cuCtxGetFlags,\n ::cuDevicePrimaryCtxGetState"]
    pub fn cudaGetDeviceFlags(flags: *mut ::core::ffi::c_uint) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Create an asynchronous stream\n\n Creates a new asynchronous stream on the context that is current to the calling host thread.\n If no context is current to the calling host thread, then the primary context for a device\n is selected, made current to the calling thread, and initialized before creating a stream on it.\n\n \\param pStream - Pointer to new stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamGetPriority,\n ::cudaStreamGetFlags,\n ::cudaStreamGetDevice,\n ::cudaStreamQuery,\n ::cudaStreamSynchronize,\n ::cudaStreamWaitEvent,\n ::cudaStreamAddCallback,\n ::cudaSetDevice,\n ::cudaStreamDestroy,\n ::cuStreamCreate"]
    pub fn cudaStreamCreate(pStream: *mut cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Create an asynchronous stream\n\n Creates a new asynchronous stream on the context that is current to the calling host thread.\n If no context is current to the calling host thread, then the primary context for a device\n is selected, made current to the calling thread, and initialized before creating a stream on it.\n The \\p flags argument determines the behaviors of the stream.  Valid values for \\p flags are\n - ::cudaStreamDefault: Default stream creation flag.\n - ::cudaStreamNonBlocking: Specifies that work running in the created\n   stream may run concurrently with work in stream 0 (the NULL stream), and that\n   the created stream should perform no implicit synchronization with stream 0.\n\n \\param pStream - Pointer to new stream identifier\n \\param flags   - Parameters for stream creation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamCreateWithPriority,\n ::cudaStreamGetFlags,\n ::cudaStreamGetDevice,\n ::cudaStreamQuery,\n ::cudaStreamSynchronize,\n ::cudaStreamWaitEvent,\n ::cudaStreamAddCallback,\n ::cudaSetDevice,\n ::cudaStreamDestroy,\n ::cuStreamCreate"]
    pub fn cudaStreamCreateWithFlags(
        pStream: *mut cudaStream_t,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Create an asynchronous stream with the specified priority\n\n Creates a stream with the specified priority and returns a handle in \\p pStream.\n The stream is created on the context that is current to the calling host thread.\n If no context is current to the calling host thread, then the primary context for a device\n is selected, made current to the calling thread, and initialized before creating a stream on it.\n This affects the scheduling priority of work in the stream. Priorities provide a\n hint to preferentially run work with higher priority when possible, but do\n not preempt already-running work or provide any other functional guarantee on\n execution order.\n\n \\p priority follows a convention where lower numbers represent higher priorities.\n '0' represents default priority. The range of meaningful numerical priorities can\n be queried using ::cudaDeviceGetStreamPriorityRange. If the specified priority is\n outside the numerical range returned by ::cudaDeviceGetStreamPriorityRange,\n it will automatically be clamped to the lowest or the highest number in the range.\n\n \\param pStream  - Pointer to new stream identifier\n \\param flags    - Flags for stream creation. See ::cudaStreamCreateWithFlags for a list of valid flags that can be passed\n \\param priority - Priority of the stream. Lower numbers represent higher priorities.\n                   See ::cudaDeviceGetStreamPriorityRange for more information about\n                   the meaningful stream priorities that can be passed.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\note Stream priorities are supported only on GPUs\n with compute capability 3.5 or higher.\n\n \\note In the current implementation, only compute kernels launched in\n priority streams are affected by the stream's priority. Stream priorities have\n no effect on host-to-device and device-to-host memory operations.\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags,\n ::cudaDeviceGetStreamPriorityRange,\n ::cudaStreamGetPriority,\n ::cudaStreamQuery,\n ::cudaStreamWaitEvent,\n ::cudaStreamAddCallback,\n ::cudaStreamSynchronize,\n ::cudaSetDevice,\n ::cudaStreamDestroy,\n ::cuStreamCreateWithPriority"]
    pub fn cudaStreamCreateWithPriority(
        pStream: *mut cudaStream_t,
        flags: ::core::ffi::c_uint,
        priority: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query the priority of a stream\n\n Query the priority of a stream. The priority is returned in in \\p priority.\n Note that if the stream was created with a priority outside the meaningful\n numerical range returned by ::cudaDeviceGetStreamPriorityRange,\n this function returns the clamped priority.\n See ::cudaStreamCreateWithPriority for details about priority clamping.\n\n \\param hStream    - Handle to the stream to be queried\n \\param priority   - Pointer to a signed integer in which the stream's priority is returned\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaDeviceGetStreamPriorityRange,\n ::cudaStreamGetFlags,\n ::cudaStreamGetDevice,\n ::cuStreamGetPriority"]
    pub fn cudaStreamGetPriority(
        hStream: cudaStream_t,
        priority: *mut ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query the flags of a stream\n\n Query the flags of a stream. The flags are returned in \\p flags.\n See ::cudaStreamCreateWithFlags for a list of valid flags.\n\n \\param hStream - Handle to the stream to be queried\n \\param flags   - Pointer to an unsigned integer in which the stream's flags are returned\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamGetPriority,\n ::cudaStreamGetDevice,\n ::cuStreamGetFlags"]
    pub fn cudaStreamGetFlags(
        hStream: cudaStream_t,
        flags: *mut ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query the Id of a stream\n\n Query the Id of a stream. The Id is returned in \\p streamId.\n The Id is unique for the life of the program.\n\n The stream handle \\p hStream can refer to any of the following:\n <ul>\n   <li>a stream created via any of the CUDA runtime APIs such as ::cudaStreamCreate,\n   ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority, or their driver\n   API equivalents such as ::cuStreamCreate or ::cuStreamCreateWithPriority.\n   Passing an invalid handle will result in undefined behavior.</li>\n   <li>any of the special streams such as the NULL stream, ::cudaStreamLegacy\n   and ::cudaStreamPerThread respectively.  The driver API equivalents of these\n   are also accepted which are NULL, ::CU_STREAM_LEGACY and ::CU_STREAM_PER_THREAD.</li>\n </ul>\n\n \\param hStream    - Handle to the stream to be queried\n \\param streamId   - Pointer to an unsigned long long in which the stream Id is returned\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamGetPriority,\n ::cudaStreamGetFlags,\n ::cuStreamGetId"]
    pub fn cudaStreamGetId(
        hStream: cudaStream_t,
        streamId: *mut ::core::ffi::c_ulonglong,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query the device of a stream\n\n Returns in \\p *device the device of the stream.\n\n \\param hStream - Handle to the stream to be queried\n \\param device - Returns the device to which the stream belongs\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorDeviceUnavailable,\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaSetDevice,\n ::cudaGetDevice,\n ::cudaStreamCreate,\n ::cudaStreamGetPriority,\n ::cudaStreamGetFlags,\n ::cuStreamGetId"]
    pub fn cudaStreamGetDevice(
        hStream: cudaStream_t,
        device: *mut ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Resets all persisting lines in cache to normal status.\n\n Resets all persisting lines in cache to normal status.\n Takes effect on function return.\n\n \\return\n ::cudaSuccess,\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaCtxResetPersistingL2Cache() -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies attributes from source stream to destination stream.\n\n Copies attributes from source stream \\p src to destination stream \\p dst.\n Both streams must have the same context.\n\n \\param[out] dst Destination stream\n \\param[in] src Source stream\n For attributes see ::cudaStreamAttrID\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotSupported\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaStreamCopyAttributes(dst: cudaStream_t, src: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries stream attribute.\n\n Queries attribute \\p attr from \\p hStream and stores it in corresponding\n member of \\p value_out.\n\n \\param[in] hStream\n \\param[in] attr\n \\param[out] value_out\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaStreamGetAttribute(
        hStream: cudaStream_t,
        attr: cudaLaunchAttributeID,
        value_out: *mut cudaLaunchAttributeValue,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets stream attribute.\n\n Sets attribute \\p attr on \\p hStream from corresponding attribute of\n \\p value. The updated attribute will be applied to subsequent work\n submitted to the stream. It will not affect previously submitted work.\n\n \\param[out] hStream\n \\param[in] attr\n \\param[in] value\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaStreamSetAttribute(
        hStream: cudaStream_t,
        attr: cudaLaunchAttributeID,
        value: *const cudaLaunchAttributeValue,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys and cleans up an asynchronous stream\n\n Destroys and cleans up the asynchronous stream specified by \\p stream.\n\n In case the device is still doing work in the stream \\p stream\n when ::cudaStreamDestroy() is called, the function will return immediately\n and the resources associated with \\p stream will be released automatically\n once the device has completed all work in \\p stream.\n\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamQuery,\n ::cudaStreamWaitEvent,\n ::cudaStreamSynchronize,\n ::cudaStreamAddCallback,\n ::cuStreamDestroy"]
    pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Make a compute stream wait on an event\n\n Makes all future work submitted to \\p stream wait for all work captured in\n \\p event.  See ::cudaEventRecord() for details on what is captured by an event.\n The synchronization will be performed efficiently on the device when applicable.\n \\p event may be from a different device than \\p stream.\n\n flags include:\n - ::cudaEventWaitDefault: Default event creation flag.\n - ::cudaEventWaitExternal: Event is captured in the graph as an external\n   event node when performing stream capture.\n\n \\param stream - Stream to wait\n \\param event  - Event to wait on\n \\param flags  - Parameters for the operation(See above)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy,\n ::cuStreamWaitEvent"]
    pub fn cudaStreamWaitEvent(
        stream: cudaStream_t,
        event: cudaEvent_t,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
#[doc = " Type of stream callback functions.\n \\param stream The stream as passed to ::cudaStreamAddCallback, may be NULL.\n \\param status ::cudaSuccess or any persistent error on the stream.\n \\param userData User parameter provided at registration."]
pub type cudaStreamCallback_t = ::core::option::Option<
    unsafe extern "C" fn(
        stream: cudaStream_t,
        status: cudaError_t,
        userData: *mut ::core::ffi::c_void,
    ),
>;
unsafe extern "C" {
    #[doc = " \\brief Add a callback to a compute stream\n\n \\note This function is slated for eventual deprecation and removal. If\n you do not require the callback to execute in case of a device error,\n consider using ::cudaLaunchHostFunc. Additionally, this function is not\n supported with ::cudaStreamBeginCapture and ::cudaStreamEndCapture, unlike\n ::cudaLaunchHostFunc.\n\n Adds a callback to be called on the host after all currently enqueued\n items in the stream have completed.  For each\n cudaStreamAddCallback call, a callback will be executed exactly once.\n The callback will block later work in the stream until it is finished.\n\n The callback may be passed ::cudaSuccess or an error code.  In the event\n of a device error, all subsequently executed callbacks will receive an\n appropriate ::cudaError_t.\n\n Callbacks must not make any CUDA API calls.  Attempting to use CUDA APIs\n may result in ::cudaErrorNotPermitted.  Callbacks must not perform any\n synchronization that may depend on outstanding device work or other callbacks\n that are not mandated to run earlier.  Callbacks without a mandated order\n (in independent streams) execute in undefined order and may be serialized.\n\n For the purposes of Unified Memory, callback execution makes a number of\n guarantees:\n <ul>\n   <li>The callback stream is considered idle for the duration of the\n   callback.  Thus, for example, a callback may always use memory attached\n   to the callback stream.</li>\n   <li>The start of execution of a callback has the same effect as\n   synchronizing an event recorded in the same stream immediately prior to\n   the callback.  It thus synchronizes streams which have been \"joined\"\n   prior to the callback.</li>\n   <li>Adding device work to any stream does not have the effect of making\n   the stream active until all preceding callbacks have executed.  Thus, for\n   example, a callback might use global attached memory even if work has\n   been added to another stream, if it has been properly ordered with an\n   event.</li>\n   <li>Completion of a callback does not cause a stream to become\n   active except as described above.  The callback stream will remain idle\n   if no device work follows the callback, and will remain idle across\n   consecutive callbacks without device work in between.  Thus, for example,\n   stream synchronization can be done by signaling from a callback at the\n   end of the stream.</li>\n </ul>\n\n \\param stream   - Stream to add callback to\n \\param callback - The function to call once preceding stream operations are complete\n \\param userData - User specified data to be passed to the callback function\n \\param flags    - Reserved for future use, must be 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamWaitEvent, ::cudaStreamDestroy, ::cudaMallocManaged, ::cudaStreamAttachMemAsync,\n ::cudaLaunchHostFunc, ::cuStreamAddCallback"]
    pub fn cudaStreamAddCallback(
        stream: cudaStream_t,
        callback: cudaStreamCallback_t,
        userData: *mut ::core::ffi::c_void,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Waits for stream tasks to complete\n\n Blocks until \\p stream has completed all operations. If the\n ::cudaDeviceScheduleBlockingSync flag was set for this device,\n the host thread will block until the stream is finished with\n all of its tasks.\n\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamWaitEvent, ::cudaStreamAddCallback, ::cudaStreamDestroy,\n ::cuStreamSynchronize"]
    pub fn cudaStreamSynchronize(stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries an asynchronous stream for completion status\n\n Returns ::cudaSuccess if all operations in \\p stream have\n completed, or ::cudaErrorNotReady if not.\n\n For the purposes of Unified Memory, a return value of ::cudaSuccess\n is equivalent to having called ::cudaStreamSynchronize().\n\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotReady,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy,\n ::cuStreamQuery"]
    pub fn cudaStreamQuery(stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaStreamAttachMemAsync(
        stream: cudaStream_t,
        devPtr: *mut ::core::ffi::c_void,
        length: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Begins graph capture on a stream\n\n Begin graph capture on \\p stream. When a stream is in capture mode, all operations\n pushed into the stream will not be executed, but will instead be captured into\n a graph, which will be returned via ::cudaStreamEndCapture. Capture may not be initiated\n if \\p stream is ::cudaStreamLegacy. Capture must be ended on the same stream in which\n it was initiated, and it may only be initiated if the stream is not already in capture\n mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id\n representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo.\n\n If \\p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be\n called on this stream from the same thread.\n\n \\note Kernels captured using this API must not use texture and surface references.\n       Reading or writing through any texture or surface reference is undefined\n       behavior. This restriction does not apply to texture and surface objects.\n\n \\param stream - Stream in which to initiate capture\n \\param mode    - Controls the interaction of this capture sequence with other API\n                  calls that are potentially unsafe. For more details see\n                  ::cudaThreadExchangeStreamCaptureMode.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamIsCapturing,\n ::cudaStreamEndCapture,\n ::cudaThreadExchangeStreamCaptureMode"]
    pub fn cudaStreamBeginCapture(stream: cudaStream_t, mode: cudaStreamCaptureMode)
        -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Begins graph capture on a stream to an existing graph\n\n Begin graph capture on \\p stream. When a stream is in capture mode, all operations\n pushed into the stream will not be executed, but will instead be captured into\n \\p graph, which will be returned via ::cudaStreamEndCapture.\n\n Capture may not be initiated if \\p stream is ::cudaStreamLegacy. Capture must be ended on the\n same stream in which it was initiated, and it may only be initiated if the stream is not\n already in capture mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id\n representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo.\n\n If \\p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be\n called on this stream from the same thread.\n\n \\note Kernels captured using this API must not use texture and surface references.\n       Reading or writing through any texture or surface reference is undefined\n       behavior. This restriction does not apply to texture and surface objects.\n\n \\param stream          - Stream in which to initiate capture.\n \\param graph           - Graph to capture into.\n \\param dependencies    - Dependencies of the first node captured in the stream.  Can be NULL if numDependencies is 0.\n \\param dependencyData  - Optional array of data associated with each dependency.\n \\param numDependencies - Number of dependencies.\n \\param mode            - Controls the interaction of this capture sequence with other API\n                          calls that are potentially unsafe. For more details see\n                          ::cudaThreadExchangeStreamCaptureMode.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamIsCapturing,\n ::cudaStreamEndCapture,\n ::cudaThreadExchangeStreamCaptureMode"]
    pub fn cudaStreamBeginCaptureToGraph(
        stream: cudaStream_t,
        graph: cudaGraph_t,
        dependencies: *const cudaGraphNode_t,
        dependencyData: *const cudaGraphEdgeData,
        numDependencies: usize,
        mode: cudaStreamCaptureMode,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Swaps the stream capture interaction mode for a thread\n\n Sets the calling thread's stream capture interaction mode to the value contained\n in \\p *mode, and overwrites \\p *mode with the previous mode for the thread. To\n facilitate deterministic behavior across function or module boundaries, callers\n are encouraged to use this API in a push-pop fashion: \\code\ncudaStreamCaptureMode mode = desiredMode;\ncudaThreadExchangeStreamCaptureMode(&mode);\n...\ncudaThreadExchangeStreamCaptureMode(&mode); // restore previous mode\n \\endcode\n\n During stream capture (see ::cudaStreamBeginCapture), some actions, such as a call\n to ::cudaMalloc, may be unsafe. In the case of ::cudaMalloc, the operation is\n not enqueued asynchronously to a stream, and is not observed by stream capture.\n Therefore, if the sequence of operations captured via ::cudaStreamBeginCapture\n depended on the allocation being replayed whenever the graph is launched, the\n captured graph would be invalid.\n\n Therefore, stream capture places restrictions on API calls that can be made within\n or concurrently to a ::cudaStreamBeginCapture-::cudaStreamEndCapture sequence. This\n behavior can be controlled via this API and flags to ::cudaStreamBeginCapture.\n\n A thread's mode is one of the following:\n - \\p cudaStreamCaptureModeGlobal: This is the default mode. If the local thread has\n   an ongoing capture sequence that was not initiated with\n   \\p cudaStreamCaptureModeRelaxed at \\p cuStreamBeginCapture, or if any other thread\n   has a concurrent capture sequence initiated with \\p cudaStreamCaptureModeGlobal,\n   this thread is prohibited from potentially unsafe API calls.\n - \\p cudaStreamCaptureModeThreadLocal: If the local thread has an ongoing capture\n   sequence not initiated with \\p cudaStreamCaptureModeRelaxed, it is prohibited\n   from potentially unsafe API calls. Concurrent capture sequences in other threads\n   are ignored.\n - \\p cudaStreamCaptureModeRelaxed: The local thread is not prohibited from potentially\n   unsafe API calls. Note that the thread is still prohibited from API calls which\n   necessarily conflict with stream capture, for example, attempting ::cudaEventQuery\n   on an event that was last recorded inside a capture sequence.\n\n \\param mode - Pointer to mode value to swap with the current mode\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture"]
    pub fn cudaThreadExchangeStreamCaptureMode(mode: *mut cudaStreamCaptureMode) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Ends capture on a stream, returning the captured graph\n\n End capture on \\p stream, returning the captured graph via \\p pGraph.\n Capture must have been initiated on \\p stream via a call to ::cudaStreamBeginCapture.\n If capture was invalidated, due to a violation of the rules of stream capture, then\n a NULL graph will be returned.\n\n If the \\p mode argument to ::cudaStreamBeginCapture was not\n ::cudaStreamCaptureModeRelaxed, this call must be from the same thread as\n ::cudaStreamBeginCapture.\n\n \\param stream - Stream to query\n \\param pGraph - The captured graph\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureWrongThread\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamBeginCapture,\n ::cudaStreamIsCapturing,\n ::cudaGraphDestroy"]
    pub fn cudaStreamEndCapture(stream: cudaStream_t, pGraph: *mut cudaGraph_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a stream's capture status\n\n Return the capture status of \\p stream via \\p pCaptureStatus. After a successful\n call, \\p *pCaptureStatus will contain one of the following:\n - ::cudaStreamCaptureStatusNone: The stream is not capturing.\n - ::cudaStreamCaptureStatusActive: The stream is capturing.\n - ::cudaStreamCaptureStatusInvalidated: The stream was capturing but an error\n   has invalidated the capture sequence. The capture sequence must be terminated\n   with ::cudaStreamEndCapture on the stream where it was initiated in order to\n   continue using \\p stream.\n\n Note that, if this is called on ::cudaStreamLegacy (the \"null stream\") while\n a blocking stream on the same device is capturing, it will return\n ::cudaErrorStreamCaptureImplicit and \\p *pCaptureStatus is unspecified\n after the call. The blocking stream capture is not invalidated.\n\n When a blocking stream is capturing, the legacy stream is in an\n unusable state until the blocking stream capture is terminated. The legacy\n stream is not supported for stream capture, but attempted use would have an\n implicit dependency on the capturing stream(s).\n\n \\param stream         - Stream to query\n \\param pCaptureStatus - Returns the stream's capture status\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureImplicit\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamBeginCapture,\n ::cudaStreamEndCapture"]
    pub fn cudaStreamIsCapturing(
        stream: cudaStream_t,
        pCaptureStatus: *mut cudaStreamCaptureStatus,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query a stream's capture state\n\n Query stream state related to stream capture.\n\n If called on ::cudaStreamLegacy (the \"null stream\") while a stream not created\n with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit.\n\n Valid data (other than capture status) is returned only if both of the following are true:\n - the call returns cudaSuccess\n - the returned capture status is ::cudaStreamCaptureStatusActive\n\n If \\p edgeData_out is non-NULL then \\p dependencies_out must be as well. If\n \\p dependencies_out is non-NULL and \\p edgeData_out is NULL, but there is non-zero edge\n data for one or more of the current stream dependencies, the call will return\n ::cudaErrorLossyQuery.\n\n \\param stream - The stream to query\n \\param captureStatus_out - Location to return the capture status of the stream; required\n \\param id_out - Optional location to return an id for the capture sequence, which is\n           unique over the lifetime of the process\n \\param graph_out - Optional location to return the graph being captured into. All\n           operations other than destroy and node removal are permitted on the graph\n           while the capture sequence is in progress. This API does not transfer\n           ownership of the graph, which is transferred or destroyed at\n           ::cudaStreamEndCapture. Note that the graph handle may be invalidated before\n           end of capture for certain errors. Nodes that are or become\n           unreachable from the original stream at ::cudaStreamEndCapture due to direct\n           actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined.\n \\param dependencies_out - Optional location to store a pointer to an array of nodes.\n           The next node to be captured in the stream will depend on this set of nodes,\n           absent operations such as event wait which modify this set. The array pointer\n           is valid until the next API call which operates on the stream or until the\n           capture is terminated. The node handles may be copied out and are valid until\n           they or the graph is destroyed. The driver-owned array may also be passed\n           directly to APIs that operate on the graph (not the stream) without copying.\n \\param edgeData_out - Optional location to store a pointer to an array of graph edge\n           data. This array parallels \\c dependencies_out; the next node to be added\n           has an edge to \\c dependencies_out[i] with annotation \\c edgeData_out[i] for\n           each \\c i. The array pointer is valid until the next API call which operates\n           on the stream or until the capture is terminated.\n \\param numDependencies_out - Optional location to store the size of the array\n           returned in dependencies_out.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureImplicit,\n ::cudaErrorLossyQuery\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture,\n ::cudaStreamIsCapturing,\n ::cudaStreamUpdateCaptureDependencies"]
    pub fn cudaStreamGetCaptureInfo(
        stream: cudaStream_t,
        captureStatus_out: *mut cudaStreamCaptureStatus,
        id_out: *mut ::core::ffi::c_ulonglong,
        graph_out: *mut cudaGraph_t,
        dependencies_out: *mut *const cudaGraphNode_t,
        edgeData_out: *mut *const cudaGraphEdgeData,
        numDependencies_out: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Update the set of dependencies in a capturing stream\n\n Modifies the dependency set of a capturing stream. The dependency set is the set\n of nodes that the next captured node in the stream will depend on.\n\n Valid flags are ::cudaStreamAddCaptureDependencies and\n ::cudaStreamSetCaptureDependencies. These control whether the set passed to\n the API is added to the existing set or replaces it. A flags value of 0 defaults\n to ::cudaStreamAddCaptureDependencies.\n\n Nodes that are removed from the dependency set via this API do not result in\n ::cudaErrorStreamCaptureUnjoined if they are unreachable from the stream at\n ::cudaStreamEndCapture.\n\n Returns ::cudaErrorIllegalState if the stream is not capturing.\n\n \\param stream - The stream to update\n \\param dependencies - The set of dependencies to add\n \\param dependencyData - Optional array of data associated with each dependency.\n \\param numDependencies - The size of the dependencies array\n \\param flags - See above\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorIllegalState\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture,\n ::cudaStreamGetCaptureInfo,"]
    pub fn cudaStreamUpdateCaptureDependencies(
        stream: cudaStream_t,
        dependencies: *mut cudaGraphNode_t,
        dependencyData: *const cudaGraphEdgeData,
        numDependencies: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates an event object\n\n Creates an event object for the current device using ::cudaEventDefault.\n\n \\param event - Newly created event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorLaunchFailure,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*, unsigned int) \"cudaEventCreate (C++ API)\",\n ::cudaEventCreateWithFlags, ::cudaEventRecord, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cudaStreamWaitEvent,\n ::cuEventCreate"]
    pub fn cudaEventCreate(event: *mut cudaEvent_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates an event object with the specified flags\n\n Creates an event object for the current device with the specified flags. Valid\n flags include:\n - ::cudaEventDefault: Default event creation flag.\n - ::cudaEventBlockingSync: Specifies that event should use blocking\n   synchronization. A host thread that uses ::cudaEventSynchronize() to wait\n   on an event created with this flag will block until the event actually\n   completes.\n - ::cudaEventDisableTiming: Specifies that the created event does not need\n   to record timing data.  Events created with this flag specified and\n   the ::cudaEventBlockingSync flag not specified will provide the best\n   performance when used with ::cudaStreamWaitEvent() and ::cudaEventQuery().\n - ::cudaEventInterprocess: Specifies that the created event may be used as an\n   interprocess event by ::cudaIpcGetEventHandle(). ::cudaEventInterprocess must\n   be specified along with ::cudaEventDisableTiming.\n\n \\param event - Newly created event\n \\param flags - Flags for new event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorLaunchFailure,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cudaStreamWaitEvent,\n ::cuEventCreate"]
    pub fn cudaEventCreateWithFlags(
        event: *mut cudaEvent_t,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Records an event\n\n Captures in \\p event the contents of \\p stream at the time of this call.\n \\p event and \\p stream must be on the same CUDA context.\n Calls such as ::cudaEventQuery() or ::cudaStreamWaitEvent() will then\n examine or wait for completion of the work that was captured. Uses of\n \\p stream after this call do not modify \\p event. See note on default\n stream behavior for what is captured in the default case.\n\n ::cudaEventRecord() can be called multiple times on the same event and\n will overwrite the previously captured state. Other APIs such as\n ::cudaStreamWaitEvent() use the most recently captured state at the time\n of the API call, and are not affected by later calls to\n ::cudaEventRecord(). Before the first call to ::cudaEventRecord(), an\n event represents an empty set of work, so for example ::cudaEventQuery()\n would return ::cudaSuccess.\n\n \\param event  - Event to record\n \\param stream - Stream in which to record event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cudaStreamWaitEvent,\n ::cudaEventRecordWithFlags,\n ::cuEventRecord"]
    pub fn cudaEventRecord(event: cudaEvent_t, stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaEventRecordWithFlags(
        event: cudaEvent_t,
        stream: cudaStream_t,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries an event's status\n\n Queries the status of all work currently captured by \\p event. See\n ::cudaEventRecord() for details on what is captured by an event.\n\n Returns ::cudaSuccess if all captured work has been completed, or\n ::cudaErrorNotReady if any captured work is incomplete.\n\n For the purposes of Unified Memory, a return value of ::cudaSuccess\n is equivalent to having called ::cudaEventSynchronize().\n\n \\param event - Event to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotReady,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventRecord,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cuEventQuery"]
    pub fn cudaEventQuery(event: cudaEvent_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Waits for an event to complete\n\n Waits until the completion of all work currently captured in \\p event.\n See ::cudaEventRecord() for details on what is captured by an event.\n\n Waiting for an event that was created with the ::cudaEventBlockingSync\n flag will cause the calling CPU thread to block until the event has\n been completed by the device.  If the ::cudaEventBlockingSync flag has\n not been set, then the CPU thread will busy-wait until the event has\n been completed by the device.\n\n \\param event - Event to wait for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventRecord,\n ::cudaEventQuery, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cuEventSynchronize"]
    pub fn cudaEventSynchronize(event: cudaEvent_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys an event object\n\n Destroys the event specified by \\p event.\n\n An event may be destroyed before it is complete (i.e., while\n ::cudaEventQuery() would return ::cudaErrorNotReady). In this case, the\n call does not block on completion of the event, and any associated\n resources will automatically be released asynchronously at completion.\n\n \\param event - Event to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventRecord, ::cudaEventElapsedTime,\n ::cuEventDestroy"]
    pub fn cudaEventDestroy(event: cudaEvent_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Computes the elapsed time between events\n\n Computes the elapsed time between two events (in milliseconds with a\n resolution of around 0.5 microseconds). Note this API is not guaranteed\n to return the latest errors for pending work. As such this API is intended to\n serve as a elapsed time calculation only and polling for completion on the\n events to be compared should be done with ::cudaEventQuery instead.\n\n If either event was last recorded in a non-NULL stream, the resulting time\n may be greater than expected (even if both used the same stream handle). This\n happens because the ::cudaEventRecord() operation takes place asynchronously\n and there is no guarantee that the measured latency is actually just between\n the two events. Any number of other different stream operations could execute\n in between the two measured events, thus altering the timing in a significant\n way.\n\n If ::cudaEventRecord() has not been called on either event, then\n ::cudaErrorInvalidResourceHandle is returned. If ::cudaEventRecord() has been\n called on both events but one or both of them has not yet been completed\n (that is, ::cudaEventQuery() would return ::cudaErrorNotReady on at least one\n of the events), ::cudaErrorNotReady is returned. If either event was created\n with the ::cudaEventDisableTiming flag, then this function will return\n ::cudaErrorInvalidResourceHandle.\n\n \\param ms    - Time between \\p start and \\p end in ms\n \\param start - Starting event\n \\param end   - Ending event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotReady,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventRecord,\n ::cuEventElapsedTime"]
    pub fn cudaEventElapsedTime(ms: *mut f32, start: cudaEvent_t, end: cudaEvent_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Imports an external memory object\n\n Imports an externally allocated memory object and returns\n a handle to that in \\p extMem_out.\n\n The properties of the handle being imported must be described in\n \\p memHandleDesc. The ::cudaExternalMemoryHandleDesc structure\n is defined as follows:\n\n \\code\ntypedef struct cudaExternalMemoryHandleDesc_st {\ncudaExternalMemoryHandleType type;\nunion {\nint fd;\nstruct {\nvoid *handle;\nconst void *name;\n} win32;\nconst void *nvSciBufObject;\n} handle;\nunsigned long long size;\nunsigned int flags;\n} cudaExternalMemoryHandleDesc;\n \\endcode\n\n where ::cudaExternalMemoryHandleDesc::type specifies the type\n of handle being imported. ::cudaExternalMemoryHandleType is\n defined as:\n\n \\code\ntypedef enum cudaExternalMemoryHandleType_enum {\ncudaExternalMemoryHandleTypeOpaqueFd         = 1,\ncudaExternalMemoryHandleTypeOpaqueWin32      = 2,\ncudaExternalMemoryHandleTypeOpaqueWin32Kmt   = 3,\ncudaExternalMemoryHandleTypeD3D12Heap        = 4,\ncudaExternalMemoryHandleTypeD3D12Resource    = 5,\ncudaExternalMemoryHandleTypeD3D11Resource    = 6,\ncudaExternalMemoryHandleTypeD3D11ResourceKmt = 7,\ncudaExternalMemoryHandleTypeNvSciBuf         = 8\n} cudaExternalMemoryHandleType;\n \\endcode\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeOpaqueFd, then\n ::cudaExternalMemoryHandleDesc::handle::fd must be a valid\n file descriptor referencing a memory object. Ownership of\n the file descriptor is transferred to the CUDA driver when the\n handle is imported successfully. Performing any operations on the\n file descriptor after it is imported results in undefined behavior.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeOpaqueWin32, then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n references a memory object. Ownership of this handle is\n not transferred to CUDA after the import operation, so the\n application must release the handle using the appropriate system\n call. If ::cudaExternalMemoryHandleDesc::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a memory object.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt, then\n ::cudaExternalMemoryHandleDesc::handle::win32::handle must\n be non-NULL and\n ::cudaExternalMemoryHandleDesc::handle::win32::name\n must be NULL. The handle specified must be a globally shared KMT\n handle. This handle does not hold a reference to the underlying\n object, and thus will be invalid when all references to the\n memory object are destroyed.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D12Heap, then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D12Device::CreateSharedHandle when referring to a\n ID3D12Heap object. This handle holds a reference to the underlying\n object. If ::cudaExternalMemoryHandleDesc::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a ID3D12Heap object.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D12Resource, then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D12Device::CreateSharedHandle when referring to a\n ID3D12Resource object. This handle holds a reference to the\n underlying object. If\n ::cudaExternalMemoryHandleDesc::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a ID3D12Resource object.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D11Resource,then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle is\n not NULL, then it must represent a valid shared NT handle that is\n returned by  IDXGIResource1::CreateSharedHandle when referring to a\n ID3D11Resource object. If\n ::cudaExternalMemoryHandleDesc::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a ID3D11Resource object.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D11ResourceKmt, then\n ::cudaExternalMemoryHandleDesc::handle::win32::handle must\n be non-NULL and ::cudaExternalMemoryHandleDesc::handle::win32::name\n must be NULL. The handle specified must be a valid shared KMT\n handle that is returned by IDXGIResource::GetSharedHandle when\n referring to a ID3D11Resource object.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeNvSciBuf, then\n ::cudaExternalMemoryHandleDesc::handle::nvSciBufObject must be NON-NULL\n and reference a valid NvSciBuf object.\n If the NvSciBuf object imported into CUDA is also mapped by other drivers, then the\n application must use ::cudaWaitExternalSemaphoresAsync or ::cudaSignalExternalSemaphoresAsync\n as approprriate barriers to maintain coherence between CUDA and the other drivers.\n See ::cudaExternalSemaphoreWaitSkipNvSciBufMemSync and ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync\n for memory synchronization.\n\n The size of the memory object must be specified in\n ::cudaExternalMemoryHandleDesc::size.\n\n Specifying the flag ::cudaExternalMemoryDedicated in\n ::cudaExternalMemoryHandleDesc::flags indicates that the\n resource is a dedicated resource. The definition of what a\n dedicated resource is outside the scope of this extension.\n This flag must be set if ::cudaExternalMemoryHandleDesc::type\n is one of the following:\n ::cudaExternalMemoryHandleTypeD3D12Resource\n ::cudaExternalMemoryHandleTypeD3D11Resource\n ::cudaExternalMemoryHandleTypeD3D11ResourceKmt\n\n \\param extMem_out    - Returned handle to an external memory object\n \\param memHandleDesc - Memory import handle descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorOperatingSystem\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\note If the Vulkan memory imported into CUDA is mapped on the CPU then the\n application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges\n as well as appropriate Vulkan pipeline barriers to maintain coherence between\n CPU and GPU. For more information on these APIs, please refer to \"Synchronization\n and Cache Control\" chapter from Vulkan specification.\n\n\n \\sa ::cudaDestroyExternalMemory,\n ::cudaExternalMemoryGetMappedBuffer,\n ::cudaExternalMemoryGetMappedMipmappedArray"]
    pub fn cudaImportExternalMemory(
        extMem_out: *mut cudaExternalMemory_t,
        memHandleDesc: *const cudaExternalMemoryHandleDesc,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Maps a buffer onto an imported memory object\n\n Maps a buffer onto an imported memory object and returns a device\n pointer in \\p devPtr.\n\n The properties of the buffer being mapped must be described in\n \\p bufferDesc. The ::cudaExternalMemoryBufferDesc structure is\n defined as follows:\n\n \\code\ntypedef struct cudaExternalMemoryBufferDesc_st {\nunsigned long long offset;\nunsigned long long size;\nunsigned int flags;\n} cudaExternalMemoryBufferDesc;\n \\endcode\n\n where ::cudaExternalMemoryBufferDesc::offset is the offset in\n the memory object where the buffer's base address is.\n ::cudaExternalMemoryBufferDesc::size is the size of the buffer.\n ::cudaExternalMemoryBufferDesc::flags must be zero.\n\n The offset and size have to be suitably aligned to match the\n requirements of the external API. Mapping two buffers whose ranges\n overlap may or may not result in the same virtual address being\n returned for the overlapped portion. In such cases, the application\n must ensure that all accesses to that region from the GPU are\n volatile. Otherwise writes made via one address are not guaranteed\n to be visible via the other address, even if they're issued by the\n same thread. It is recommended that applications map the combined\n range instead of mapping separate buffers and then apply the\n appropriate offsets to the returned pointer to derive the\n individual buffers.\n\n The returned pointer \\p devPtr must be freed using ::cudaFree.\n\n \\param devPtr     - Returned device pointer to buffer\n \\param extMem     - Handle to external memory object\n \\param bufferDesc - Buffer descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalMemory,\n ::cudaDestroyExternalMemory,\n ::cudaExternalMemoryGetMappedMipmappedArray"]
    pub fn cudaExternalMemoryGetMappedBuffer(
        devPtr: *mut *mut ::core::ffi::c_void,
        extMem: cudaExternalMemory_t,
        bufferDesc: *const cudaExternalMemoryBufferDesc,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Maps a CUDA mipmapped array onto an external memory object\n\n Maps a CUDA mipmapped array onto an external object and returns a\n handle to it in \\p mipmap.\n\n The properties of the CUDA mipmapped array being mapped must be\n described in \\p mipmapDesc. The structure\n ::cudaExternalMemoryMipmappedArrayDesc is defined as follows:\n\n \\code\ntypedef struct cudaExternalMemoryMipmappedArrayDesc_st {\nunsigned long long offset;\ncudaChannelFormatDesc formatDesc;\ncudaExtent extent;\nunsigned int flags;\nunsigned int numLevels;\n} cudaExternalMemoryMipmappedArrayDesc;\n \\endcode\n\n where ::cudaExternalMemoryMipmappedArrayDesc::offset is the\n offset in the memory object where the base level of the mipmap\n chain is.\n ::cudaExternalMemoryMipmappedArrayDesc::formatDesc describes the\n format of the data.\n ::cudaExternalMemoryMipmappedArrayDesc::extent specifies the\n dimensions of the base level of the mipmap chain.\n ::cudaExternalMemoryMipmappedArrayDesc::flags are flags associated\n with CUDA mipmapped arrays. For further details, please refer to\n the documentation for ::cudaMalloc3DArray. Note that if the mipmapped\n array is bound as a color target in the graphics API, then the flag\n ::cudaArrayColorAttachment must be specified in\n ::cudaExternalMemoryMipmappedArrayDesc::flags.\n ::cudaExternalMemoryMipmappedArrayDesc::numLevels specifies\n the total number of levels in the mipmap chain.\n\n The returned CUDA mipmapped array must be freed using ::cudaFreeMipmappedArray.\n\n \\param mipmap     - Returned CUDA mipmapped array\n \\param extMem     - Handle to external memory object\n \\param mipmapDesc - CUDA array descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalMemory,\n ::cudaDestroyExternalMemory,\n ::cudaExternalMemoryGetMappedBuffer\n\n \\note If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeNvSciBuf, then\n ::cudaExternalMemoryMipmappedArrayDesc::numLevels must not be greater than 1."]
    pub fn cudaExternalMemoryGetMappedMipmappedArray(
        mipmap: *mut cudaMipmappedArray_t,
        extMem: cudaExternalMemory_t,
        mipmapDesc: *const cudaExternalMemoryMipmappedArrayDesc,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys an external memory object.\n\n Destroys the specified external memory object. Any existing buffers\n and CUDA mipmapped arrays mapped onto this object must no longer be\n used and must be explicitly freed using ::cudaFree and\n ::cudaFreeMipmappedArray respectively.\n\n \\param extMem - External memory object to be destroyed\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa ::cudaImportExternalMemory,\n ::cudaExternalMemoryGetMappedBuffer,\n ::cudaExternalMemoryGetMappedMipmappedArray"]
    pub fn cudaDestroyExternalMemory(extMem: cudaExternalMemory_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Imports an external semaphore\n\n Imports an externally allocated synchronization object and returns\n a handle to that in \\p extSem_out.\n\n The properties of the handle being imported must be described in\n \\p semHandleDesc. The ::cudaExternalSemaphoreHandleDesc is defined\n as follows:\n\n \\code\ntypedef struct cudaExternalSemaphoreHandleDesc_st {\ncudaExternalSemaphoreHandleType type;\nunion {\nint fd;\nstruct {\nvoid *handle;\nconst void *name;\n} win32;\nconst void* NvSciSyncObj;\n} handle;\nunsigned int flags;\n} cudaExternalSemaphoreHandleDesc;\n \\endcode\n\n where ::cudaExternalSemaphoreHandleDesc::type specifies the type of\n handle being imported. ::cudaExternalSemaphoreHandleType is defined\n as:\n\n \\code\ntypedef enum cudaExternalSemaphoreHandleType_enum {\ncudaExternalSemaphoreHandleTypeOpaqueFd                = 1,\ncudaExternalSemaphoreHandleTypeOpaqueWin32             = 2,\ncudaExternalSemaphoreHandleTypeOpaqueWin32Kmt          = 3,\ncudaExternalSemaphoreHandleTypeD3D12Fence              = 4,\ncudaExternalSemaphoreHandleTypeD3D11Fence              = 5,\ncudaExternalSemaphoreHandleTypeNvSciSync               = 6,\ncudaExternalSemaphoreHandleTypeKeyedMutex              = 7,\ncudaExternalSemaphoreHandleTypeKeyedMutexKmt           = 8,\ncudaExternalSemaphoreHandleTypeTimelineSemaphoreFd     = 9,\ncudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32  = 10\n} cudaExternalSemaphoreHandleType;\n \\endcode\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeOpaqueFd, then\n ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file\n descriptor referencing a synchronization object. Ownership of the\n file descriptor is transferred to the CUDA driver when the handle\n is imported successfully. Performing any operations on the file\n descriptor after it is imported results in undefined behavior.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n references a synchronization object. Ownership of this handle is\n not transferred to CUDA after the import operation, so the\n application must release the handle using the appropriate system\n call. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name is\n not NULL, then it must name a valid synchronization object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt, then\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be\n non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name\n must be NULL. The handle specified must be a globally shared KMT\n handle. This handle does not hold a reference to the underlying\n object, and thus will be invalid when all references to the\n synchronization object are destroyed.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeD3D12Fence, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D12Device::CreateSharedHandle when referring to a\n ID3D12Fence object. This handle holds a reference to the underlying\n object. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name\n is not NULL, then it must name a valid synchronization object that\n refers to a valid ID3D12Fence object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeD3D11Fence, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D11Fence::CreateSharedHandle. If\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name\n is not NULL, then it must name a valid synchronization object that\n refers to a valid ID3D11Fence object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeNvSciSync, then\n ::cudaExternalSemaphoreHandleDesc::handle::nvSciSyncObj\n represents a valid NvSciSyncObj.\n\n ::cudaExternalSemaphoreHandleTypeKeyedMutex, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it represent a valid shared NT handle that\n is returned by IDXGIResource1::CreateSharedHandle when referring to\n a IDXGIKeyedMutex object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be\n non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name\n must be NULL. The handle specified must represent a valid KMT\n handle that is returned by IDXGIResource::GetSharedHandle when\n referring to a IDXGIKeyedMutex object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, then\n ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file\n descriptor referencing a synchronization object. Ownership of the\n file descriptor is transferred to the CUDA driver when the handle\n is imported successfully. Performing any operations on the file\n descriptor after it is imported results in undefined behavior.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n references a synchronization object. Ownership of this handle is\n not transferred to CUDA after the import operation, so the\n application must release the handle using the appropriate system\n call. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name is\n not NULL, then it must name a valid synchronization object.\n\n \\param extSem_out    - Returned handle to an external semaphore\n \\param semHandleDesc - Semaphore import handle descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorOperatingSystem\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDestroyExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync,\n ::cudaWaitExternalSemaphoresAsync"]
    pub fn cudaImportExternalSemaphore(
        extSem_out: *mut cudaExternalSemaphore_t,
        semHandleDesc: *const cudaExternalSemaphoreHandleDesc,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Signals a set of external semaphore objects\n\n Enqueues a signal operation on a set of externally allocated\n semaphore object in the specified stream. The operations will be\n executed when all prior operations in the stream complete.\n\n The exact semantics of signaling a semaphore depends on the type of\n the object.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeOpaqueFd,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\n then signaling the semaphore will set it to the signaled state.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeD3D12Fence,\n ::cudaExternalSemaphoreHandleTypeD3D11Fence,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32\n then the semaphore will be set to the value specified in\n ::cudaExternalSemaphoreSignalParams::params::fence::value.\n\n If the semaphore object is of the type ::cudaExternalSemaphoreHandleTypeNvSciSync\n this API sets ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence to a\n value that can be used by subsequent waiters of the same NvSciSync object to\n order operations with those currently submitted in \\p stream. Such an update\n will overwrite previous contents of\n ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence. By default,\n signaling such an external semaphore object causes appropriate memory synchronization\n operations to be performed over all the external memory objects that are imported as\n ::cudaExternalMemoryHandleTypeNvSciBuf. This ensures that any subsequent accesses\n made by other importers of the same set of NvSciBuf memory object(s) are coherent.\n These operations can be skipped by specifying the flag\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync, which can be used as a\n performance optimization when data coherency is not required. But specifying this\n flag in scenarios where data coherency is required results in undefined behavior.\n Also, for semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync,\n if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in\n ::cudaDeviceGetNvSciSyncAttributes to cudaNvSciSyncAttrSignal, this API will return\n cudaErrorNotSupported.\n\n ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence associated with\n semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync can be\n deterministic. For this the NvSciSyncAttrList used to create the semaphore object\n must have value of NvSciSyncAttrKey_RequireDeterministicFences key set to true.\n Deterministic fences allow users to enqueue a wait over the semaphore object even\n before corresponding signal is enqueued. For such a semaphore object, CUDA guarantees\n that each signal operation will increment the fence value by '1'. Users are expected\n to track count of signals enqueued on the semaphore object and insert waits accordingly.\n When such a semaphore object is signaled from multiple streams, due to concurrent\n stream execution, it is possible that the order in which the semaphore gets signaled\n is indeterministic. This could lead to waiters of the semaphore getting unblocked\n incorrectly. Users are expected to handle such situations, either by not using the\n same semaphore object with deterministic fence support enabled in different streams\n or by adding explicit dependency amongst such streams so that the semaphore is\n signaled in order.\n ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence associated with\n semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync can be\n timestamp enabled. For this the NvSciSyncAttrList used to create the object must\n have the value of NvSciSyncAttrKey_WaiterRequireTimestamps key set to true. Timestamps\n are emitted asynchronously by the GPU and CUDA saves the GPU timestamp in the\n corresponding NvSciSyncFence at the time of signal on GPU. Users are expected to\n convert GPU clocks to CPU clocks using appropriate scaling functions. Users are\n expected to wait for the completion of the fence before extracting timestamp using\n appropriate NvSciSync APIs. Users are expected to ensure that there is only one\n outstanding timestamp enabled fence per Cuda-NvSciSync object at any point of time,\n failing which leads to undefined behavior. Extracting the timestamp before the\n corresponding fence is signalled could lead to undefined behaviour. Timestamp\n extracted via appropriate NvSciSync API would be in microseconds.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeKeyedMutex,\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt,\n then the keyed mutex will be released with the key specified in\n ::cudaExternalSemaphoreSignalParams::params::keyedmutex::key.\n\n \\param extSemArray - Set of external semaphores to be signaled\n \\param paramsArray - Array of semaphore parameters\n \\param numExtSems  - Number of semaphores to signal\n \\param stream     - Stream to enqueue the signal operations in\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalSemaphore,\n ::cudaDestroyExternalSemaphore,\n ::cudaWaitExternalSemaphoresAsync"]
    pub fn cudaSignalExternalSemaphoresAsync(
        extSemArray: *const cudaExternalSemaphore_t,
        paramsArray: *const cudaExternalSemaphoreSignalParams,
        numExtSems: ::core::ffi::c_uint,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Waits on a set of external semaphore objects\n\n Enqueues a wait operation on a set of externally allocated\n semaphore object in the specified stream. The operations will be\n executed when all prior operations in the stream complete.\n\n The exact semantics of waiting on a semaphore depends on the type\n of the object.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeOpaqueFd,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\n then waiting on the semaphore will wait until the semaphore reaches\n the signaled state. The semaphore will then be reset to the\n unsignaled state. Therefore for every signal operation, there can\n only be one wait operation.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeD3D12Fence,\n ::cudaExternalSemaphoreHandleTypeD3D11Fence,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32\n then waiting on the semaphore will wait until the value of the\n semaphore is greater than or equal to\n ::cudaExternalSemaphoreWaitParams::params::fence::value.\n\n If the semaphore object is of the type ::cudaExternalSemaphoreHandleTypeNvSciSync\n then, waiting on the semaphore will wait until the\n ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence is signaled by the\n signaler of the NvSciSyncObj that was associated with this semaphore object.\n By default, waiting on such an external semaphore object causes appropriate\n memory synchronization operations to be performed over all external memory objects\n that are imported as ::cudaExternalMemoryHandleTypeNvSciBuf. This ensures that\n any subsequent accesses made by other importers of the same set of NvSciBuf memory\n object(s) are coherent. These operations can be skipped by specifying the flag\n ::cudaExternalSemaphoreWaitSkipNvSciBufMemSync, which can be used as a\n performance optimization when data coherency is not required. But specifying this\n flag in scenarios where data coherency is required results in undefined behavior.\n Also, for semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync,\n if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in\n ::cudaDeviceGetNvSciSyncAttributes to cudaNvSciSyncAttrWait, this API will return\n cudaErrorNotSupported.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeKeyedMutex,\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt,\n then the keyed mutex will be acquired when it is released with the key specified\n in ::cudaExternalSemaphoreSignalParams::params::keyedmutex::key or\n until the timeout specified by\n ::cudaExternalSemaphoreSignalParams::params::keyedmutex::timeoutMs\n has lapsed. The timeout interval can either be a finite value\n specified in milliseconds or an infinite value. In case an infinite\n value is specified the timeout never elapses. The windows INFINITE\n macro must be used to specify infinite timeout\n\n \\param extSemArray - External semaphores to be waited on\n \\param paramsArray - Array of semaphore parameters\n \\param numExtSems  - Number of semaphores to wait on\n \\param stream      - Stream to enqueue the wait operations in\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n ::cudaErrorTimeout\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalSemaphore,\n ::cudaDestroyExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync"]
    pub fn cudaWaitExternalSemaphoresAsync(
        extSemArray: *const cudaExternalSemaphore_t,
        paramsArray: *const cudaExternalSemaphoreWaitParams,
        numExtSems: ::core::ffi::c_uint,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys an external semaphore\n\n Destroys an external semaphore object and releases any references\n to the underlying resource. Any outstanding signals or waits must\n have completed before the semaphore is destroyed.\n\n \\param extSem - External semaphore to be destroyed\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa ::cudaImportExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync,\n ::cudaWaitExternalSemaphoresAsync"]
    pub fn cudaDestroyExternalSemaphore(extSem: cudaExternalSemaphore_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Launches a device function\n\n The function invokes kernel \\p func on \\p gridDim (\\p gridDim.x &times; \\p gridDim.y\n &times; \\p gridDim.z) grid of blocks. Each block contains \\p blockDim (\\p blockDim.x &times;\n \\p blockDim.y &times; \\p blockDim.z) threads.\n\n If the kernel has N parameters the \\p args should point to array of N pointers.\n Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point to the region\n of memory from which the actual parameter will be copied.\n\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n \\p sharedMem sets the amount of dynamic shared memory that will be available to\n each thread block.\n\n \\p stream specifies a stream the invocation is associated to.\n\n \\param func        - Device function symbol\n \\param gridDim     - Grid dimentions\n \\param blockDim    - Block dimentions\n \\param args        - Arguments\n \\param sharedMem   - Shared memory\n \\param stream      - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorSharedObjectInitFailed,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n \\ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C++ API)\",\n ::cuLaunchKernel"]
    pub fn cudaLaunchKernel(
        func: *const ::core::ffi::c_void,
        gridDim: dim3,
        blockDim: dim3,
        args: *mut *mut ::core::ffi::c_void,
        sharedMem: usize,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Launches a CUDA function with launch-time configuration\n\n Note that the functionally equivalent variadic template ::cudaLaunchKernelEx\n is available for C++11 and newer.\n\n Invokes the kernel \\p func on \\p config->gridDim (\\p config->gridDim.x\n &times; \\p config->gridDim.y &times; \\p config->gridDim.z) grid of blocks.\n Each block contains \\p config->blockDim (\\p config->blockDim.x &times;\n \\p config->blockDim.y &times; \\p config->blockDim.z) threads.\n\n \\p config->dynamicSmemBytes sets the amount of dynamic shared memory that\n will be available to each thread block.\n\n \\p config->stream specifies a stream the invocation is associated to.\n\n Configuration beyond grid and block dimensions, dynamic shared memory size,\n and stream can be provided with the following two fields of \\p config:\n\n \\p config->attrs is an array of \\p config->numAttrs contiguous\n ::cudaLaunchAttribute elements. The value of this pointer is not considered\n if \\p config->numAttrs is zero. However, in that case, it is recommended to\n set the pointer to NULL.\n \\p config->numAttrs is the number of attributes populating the first\n \\p config->numAttrs positions of the \\p config->attrs array.\n\n If the kernel has N parameters the \\p args should point to array of N\n pointers. Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point\n to the region of memory from which the actual parameter will be copied.\n\n N.B. This function is so named to avoid unintentionally invoking the\n      templated version, \\p cudaLaunchKernelEx, for kernels taking a single\n      void** or void* parameter.\n\n \\param config - Launch configuration\n \\param func   - Kernel to launch\n \\param args   - Array of pointers to kernel parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorSharedObjectInitFailed,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n \\ref ::cudaLaunchKernelEx(const cudaLaunchConfig_t *config, void (*kernel)(ExpTypes...), ActTypes &&... args) \"cudaLaunchKernelEx (C++ API)\",\n ::cuLaunchKernelEx"]
    pub fn cudaLaunchKernelExC(
        config: *const cudaLaunchConfig_t,
        func: *const ::core::ffi::c_void,
        args: *mut *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Launches a device function where thread blocks can cooperate and synchronize as they execute\n\n The function invokes kernel \\p func on \\p gridDim (\\p gridDim.x &times; \\p gridDim.y\n &times; \\p gridDim.z) grid of blocks. Each block contains \\p blockDim (\\p blockDim.x &times;\n \\p blockDim.y &times; \\p blockDim.z) threads.\n\n The device on which this kernel is invoked must have a non-zero value for\n the device attribute ::cudaDevAttrCooperativeLaunch.\n\n The total number of blocks launched cannot exceed the maximum number of blocks per\n multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or\n ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors\n as specified by the device attribute ::cudaDevAttrMultiProcessorCount.\n\n The kernel cannot make use of CUDA dynamic parallelism.\n\n If the kernel has N parameters the \\p args should point to array of N pointers.\n Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point to the region\n of memory from which the actual parameter will be copied.\n\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n \\p sharedMem sets the amount of dynamic shared memory that will be available to\n each thread block.\n\n \\p stream specifies a stream the invocation is associated to.\n\n \\param func        - Device function symbol\n \\param gridDim     - Grid dimentions\n \\param blockDim    - Block dimentions\n \\param args        - Arguments\n \\param sharedMem   - Shared memory\n \\param stream      - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorCooperativeLaunchTooLarge,\n ::cudaErrorSharedObjectInitFailed\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n \\ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchCooperativeKernel (C++ API)\",\n ::cuLaunchCooperativeKernel"]
    pub fn cudaLaunchCooperativeKernel(
        func: *const ::core::ffi::c_void,
        gridDim: dim3,
        blockDim: dim3,
        args: *mut *mut ::core::ffi::c_void,
        sharedMem: usize,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the preferred cache configuration for a device function\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p cacheConfig the preferred cache configuration\n for the function specified via \\p func. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute \\p func.\n\n \\p func is a device function symbol and must be declared as a\n \\c __global__ function. If the specified function does not exist,\n then ::cudaErrorInvalidDeviceFunction is returned. For templated functions,\n pass the function symbol as follows: func_name<template_arg_0,...,template_arg_N>\n\n This setting does nothing on devices where the size of the L1 cache and\n shared memory are fixed.\n\n Launching a kernel with a different preference than the most recent\n preference setting may insert a device-side synchronization point.\n\n The supported cache configurations are:\n - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory\n\n \\param func        - Device function symbol\n \\param cacheConfig - Requested cache configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction\n \\notefnerr\n \\note_string_api_deprecation2\n \\note_init_rt\n \\note_callback\n\n \\note This API does not accept a ::cudaKernel_t casted as void*. If cache config modification\n is required for a ::cudaKernel_t (or a __global__ function), it can be replaced with a call to\n ::cudaFuncSetAttributes with the attribute ::cudaFuncAttributePreferredSharedMemoryCarveout\n to specify a more granular L1 cache and shared memory split configuration.\n\n \\sa\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\",\n \\ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C API)\",\n ::cuFuncSetCacheConfig"]
    pub fn cudaFuncSetCacheConfig(
        func: *const ::core::ffi::c_void,
        cacheConfig: cudaFuncCache,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Find out attributes for a given function\n\n This function obtains the attributes of a function specified via \\p func.\n \\p func is a device function symbol and must be declared as a\n \\c __global__ function. The fetched attributes are placed in \\p attr.\n If the specified function does not exist, then it is assumed to\n be a ::cudaKernel_t and used as is.\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n Note that some function attributes such as\n \\ref ::cudaFuncAttributes::maxThreadsPerBlock \"maxThreadsPerBlock\"\n may vary based on the device that is currently being used.\n\n \\param attr - Return pointer to function's attributes\n \\param func - Device function symbol\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction\n \\notefnerr\n \\note_string_api_deprecation2\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, T*) \"cudaFuncGetAttributes (C++ API)\",\n \\ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C API)\",\n ::cuFuncGetAttribute"]
    pub fn cudaFuncGetAttributes(
        attr: *mut cudaFuncAttributes,
        func: *const ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Set attributes for a given function\n\n This function sets the attributes of a function specified via \\p func.\n The parameter \\p func must be a pointer to a function that executes\n on the device. The parameter specified by \\p func must be declared as a \\p __global__\n function. The enumeration defined by \\p attr is set to the value defined by \\p value.\n If the specified function does not exist, then it is assumed to\n be a ::cudaKernel_t and used as is.\n If the specified attribute cannot be written, or if the value is incorrect,\n then ::cudaErrorInvalidValue is returned.\n\n Valid values for \\p attr are:\n - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes\n   cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture.\n - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources,\n   this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor.\n   This is only a hint, and the driver can choose a different ratio if required to execute the function.\n - ::cudaFuncAttributeRequiredClusterWidth: The required cluster width in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return cudaErrorNotPermitted.\n - ::cudaFuncAttributeRequiredClusterHeight: The required cluster height in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return cudaErrorNotPermitted.\n - ::cudaFuncAttributeRequiredClusterDepth: The required cluster depth in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return cudaErrorNotPermitted.\n - ::cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates whether the\n   function can be launched with non-portable cluster size. 1 is allowed, 0 is\n   disallowed.\n - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block\n   scheduling policy of a function. The value type is cudaClusterSchedulingPolicy.\n\n \\param func  - Function to get attributes of\n \\param attr  - Attribute to set\n \\param value - Value to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C++ API)\",\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\","]
    pub fn cudaFuncSetAttribute(
        func: *const ::core::ffi::c_void,
        attr: cudaFuncAttribute,
        value: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the function name for a device entry function pointer.\n\n Returns in \\p **name the function name associated with the symbol \\p func .\n The function name is returned as a null-terminated string. This API may\n return a mangled name if the function is not declared as having C linkage.\n If \\p **name is NULL, ::cudaErrorInvalidValue is returned.\n If \\p func is not a device entry function, then it is assumed to\n be a ::cudaKernel_t and used as is.\n\n \\param name - The returned name of the function\n \\param func - The function pointer to retrieve name for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\ref ::cudaFuncGetName(const char **name, const T *func) \"cudaFuncGetName (C++ API)\""]
    pub fn cudaFuncGetName(
        name: *mut *const ::core::ffi::c_char,
        func: *const ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the offset and size of a kernel parameter in the device-side parameter layout.\n\n Queries the kernel parameter at \\p paramIndex in \\p func's list of parameters and returns\n parameter information via \\p paramOffset and \\p paramSize. \\p paramOffset returns the\n offset of the parameter in the device-side parameter layout. \\p paramSize returns the size\n in bytes of the parameter. This information can be used to update kernel node parameters\n from the device via ::cudaGraphKernelNodeSetParam() and ::cudaGraphKernelNodeUpdatesApply().\n \\p paramIndex must be less than the number of parameters that \\p func takes.\n\n \\param func        - The function to query\n \\param paramIndex  - The parameter index to query\n \\param paramOffset - The offset into the device-side parameter layout at which the parameter resides\n \\param paramSize   - The size of the parameter in the device-side parameter layout\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n \\note_cudaKernel_t"]
    pub fn cudaFuncGetParamInfo(
        func: *const ::core::ffi::c_void,
        paramIndex: usize,
        paramOffset: *mut usize,
        paramSize: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Enqueues a host function call in a stream\n\n Enqueues a host function to run in a stream.  The function will be called\n after currently enqueued work and will block work added after it.\n\n The host function must not make any CUDA API calls.  Attempting to use a\n CUDA API may result in ::cudaErrorNotPermitted, but this is not required.\n The host function must not perform any synchronization that may depend on\n outstanding CUDA work not mandated to run earlier.  Host functions without a\n mandated order (such as in independent streams) execute in undefined order\n and may be serialized.\n\n For the purposes of Unified Memory, execution makes a number of guarantees:\n <ul>\n   <li>The stream is considered idle for the duration of the function's\n   execution.  Thus, for example, the function may always use memory attached\n   to the stream it was enqueued in.</li>\n   <li>The start of execution of the function has the same effect as\n   synchronizing an event recorded in the same stream immediately prior to\n   the function.  It thus synchronizes streams which have been \"joined\"\n   prior to the function.</li>\n   <li>Adding device work to any stream does not have the effect of making\n   the stream active until all preceding host functions and stream callbacks\n   have executed.  Thus, for\n   example, a function might use global attached memory even if work has\n   been added to another stream, if the work has been ordered behind the\n   function call with an event.</li>\n   <li>Completion of the function does not cause a stream to become\n   active except as described above.  The stream will remain idle\n   if no device work follows the function, and will remain idle across\n   consecutive host functions or stream callbacks without device work in\n   between.  Thus, for example,\n   stream synchronization can be done by signaling from a host function at the\n   end of the stream.</li>\n </ul>\n\n Note that, in constrast to ::cuStreamAddCallback, the function will not be\n called in the event of an error in the CUDA context.\n\n \\param hStream  - Stream to enqueue function call in\n \\param fn       - The function to call once preceding stream operations are complete\n \\param userData - User-specified data to be passed to the function\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamQuery,\n ::cudaStreamSynchronize,\n ::cudaStreamWaitEvent,\n ::cudaStreamDestroy,\n ::cudaMallocManaged,\n ::cudaStreamAttachMemAsync,\n ::cudaStreamAddCallback,\n ::cuLaunchHostFunc"]
    pub fn cudaLaunchHostFunc(
        stream: cudaStream_t,
        fn_: cudaHostFn_t,
        userData: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the shared memory configuration for a device function\n\n \\deprecated\n\n On devices with configurable shared memory banks, this function will\n force all subsequent launches of the specified device function to have\n the given shared memory bank size configuration. On any given launch of the\n function, the shared memory configuration of the device will be temporarily\n changed if needed to suit the function's preferred configuration. Changes in\n shared memory configuration between subsequent launches of functions,\n may introduce a device side synchronization point.\n\n Any per-function setting of shared memory bank size set via\n ::cudaFuncSetSharedMemConfig will override the device wide setting set by\n ::cudaDeviceSetSharedMemConfig.\n\n Changing the shared memory bank size will not increase shared memory usage\n or affect occupancy of kernels, but may have major effects on performance.\n Larger bank sizes will allow for greater potential bandwidth to shared memory,\n but will change what kinds of accesses to shared memory will result in bank\n conflicts.\n\n This function will do nothing on devices with fixed shared memory bank size.\n\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n The supported bank configurations are:\n - ::cudaSharedMemBankSizeDefault: use the device's shared memory configuration\n   when launching this function.\n - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be\n   four bytes natively when launching this function.\n - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight\n   bytes natively when launching this function.\n\n \\param func   - Device function symbol\n \\param config - Requested shared memory configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_string_api_deprecation2\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetSharedMemConfig,\n ::cudaDeviceGetSharedMemConfig,\n ::cudaDeviceSetCacheConfig,\n ::cudaDeviceGetCacheConfig,\n ::cudaFuncSetCacheConfig,\n ::cuFuncSetSharedMemConfig"]
    pub fn cudaFuncSetSharedMemConfig(
        func: *const ::core::ffi::c_void,
        config: cudaSharedMemConfig,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns occupancy for a device function\n\n Returns in \\p *numBlocks the maximum number of active blocks per\n streaming multiprocessor for the device function.\n\n \\param numBlocks       - Returned occupancy\n \\param func            - Kernel function for which occupancy is calculated\n \\param blockSize       - Block size the kernel is intended to be launched with\n \\param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,\n \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\",\n \\ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) \"cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)\",\n ::cuOccupancyMaxActiveBlocksPerMultiprocessor"]
    pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessor(
        numBlocks: *mut ::core::ffi::c_int,
        func: *const ::core::ffi::c_void,
        blockSize: ::core::ffi::c_int,
        dynamicSMemSize: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns dynamic shared memory available per block when launching \\p numBlocks blocks on SM.\n\n Returns in \\p *dynamicSmemSize the maximum size of dynamic shared memory to allow \\p numBlocks blocks per SM.\n\n \\param dynamicSmemSize - Returned maximum dynamic shared memory\n \\param func            - Kernel function for which occupancy is calculated\n \\param numBlocks       - Number of blocks to fit on SM\n \\param blockSize       - Size of the block\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,\n \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\",\n ::cudaOccupancyAvailableDynamicSMemPerBlock"]
    pub fn cudaOccupancyAvailableDynamicSMemPerBlock(
        dynamicSmemSize: *mut usize,
        func: *const ::core::ffi::c_void,
        numBlocks: ::core::ffi::c_int,
        blockSize: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns occupancy for a device function with the specified flags\n\n Returns in \\p *numBlocks the maximum number of active blocks per\n streaming multiprocessor for the device function.\n\n The \\p flags parameter controls how special cases are handled. Valid flags include:\n\n - ::cudaOccupancyDefault: keeps the default behavior as\n   ::cudaOccupancyMaxActiveBlocksPerMultiprocessor\n\n - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior\n   on platform where global caching affects occupancy. On such platforms, if caching\n   is enabled, but per-block SM resource usage would result in zero occupancy, the\n   occupancy calculator will calculate the occupancy as if caching is disabled.\n   Setting this flag makes the occupancy calculator to return 0 in such cases.\n   More information can be found about this feature in the \"Unified L1/Texture Cache\"\n   section of the Maxwell tuning guide.\n\n \\param numBlocks       - Returned occupancy\n \\param func            - Kernel function for which occupancy is calculated\n \\param blockSize       - Block size the kernel is intended to be launched with\n \\param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes\n \\param flags           - Requested behavior for the occupancy calculator\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor,\n \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\",\n \\ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) \"cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)\",\n ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"]
    pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
        numBlocks: *mut ::core::ffi::c_int,
        func: *const ::core::ffi::c_void,
        blockSize: ::core::ffi::c_int,
        dynamicSMemSize: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Given the kernel function (\\p func) and launch configuration\n (\\p config), return the maximum cluster size in \\p *clusterSize.\n\n The cluster dimensions in \\p config are ignored. If func has a required\n cluster size set (see ::cudaFuncGetAttributes),\\p *clusterSize will reflect\n the required cluster size.\n\n By default this function will always return a value that's portable on\n future hardware. A higher value may be returned if the kernel function\n allows non-portable cluster sizes.\n\n This function will respect the compile time launch bounds.\n\n \\param clusterSize - Returned maximum cluster size that can be launched\n                      for the given kernel function and launch configuration\n \\param func        - Kernel function for which maximum cluster\n                      size is calculated\n \\param config      - Launch configuration for the given kernel function\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa ::cudaFuncGetAttributes\n \\ref ::cudaOccupancyMaxPotentialClusterSize(int*, T, const cudaLaunchConfig_t*) \"cudaOccupancyMaxPotentialClusterSize (C++ API)\",\n ::cuOccupancyMaxPotentialClusterSize"]
    pub fn cudaOccupancyMaxPotentialClusterSize(
        clusterSize: *mut ::core::ffi::c_int,
        func: *const ::core::ffi::c_void,
        launchConfig: *const cudaLaunchConfig_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Given the kernel function (\\p func) and launch configuration\n (\\p config), return the maximum number of clusters that could co-exist\n on the target device in \\p *numClusters.\n\n If the function has required cluster size already set (see\n ::cudaFuncGetAttributes), the cluster size from config must either be\n unspecified or match the required size.\n Without required sizes, the cluster size must be specified in config,\n else the function will return an error.\n\n Note that various attributes of the kernel function may affect occupancy\n calculation. Runtime environment may affect how the hardware schedules\n the clusters, so the calculated occupancy is not guaranteed to be achievable.\n\n \\param numClusters - Returned maximum number of clusters that\n                      could co-exist on the target device\n \\param func        - Kernel function for which maximum number\n                      of clusters are calculated\n \\param config      - Launch configuration for the given kernel function\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidClusterSize,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n ::cudaFuncGetAttributes\n \\ref ::cudaOccupancyMaxActiveClusters(int*, T, const cudaLaunchConfig_t*) \"cudaOccupancyMaxActiveClusters (C++ API)\",\n ::cuOccupancyMaxActiveClusters"]
    pub fn cudaOccupancyMaxActiveClusters(
        numClusters: *mut ::core::ffi::c_int,
        func: *const ::core::ffi::c_void,
        launchConfig: *const cudaLaunchConfig_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaMallocManaged(
        devPtr: *mut *mut ::core::ffi::c_void,
        size: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocate memory on the device\n\n Allocates \\p size bytes of linear memory on the device and returns in\n \\p *devPtr a pointer to the allocated memory. The allocated memory is\n suitably aligned for any kind of variable. The memory is not cleared.\n ::cudaMalloc() returns ::cudaErrorMemoryAllocation in case of failure.\n\n The device version of ::cudaFree cannot be used with a \\p *devPtr\n allocated using the host API, and vice versa.\n\n \\param devPtr - Pointer to allocated device memory\n \\param size   - Requested allocation size in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,\n ::cudaMalloc3D, ::cudaMalloc3DArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuMemAlloc"]
    pub fn cudaMalloc(devPtr: *mut *mut ::core::ffi::c_void, size: usize) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocates page-locked memory on the host\n\n Allocates \\p size bytes of host memory that is page-locked and accessible\n to the device. The driver tracks the virtual memory ranges allocated with\n this function and automatically accelerates calls to functions such as\n ::cudaMemcpy*(). Since the memory can be accessed directly by the device,\n it can be read or written with much higher bandwidth than pageable memory\n obtained with functions such as ::malloc().\n\n On systems where ::pageableMemoryAccessUsesHostPageTables\n is true, ::cudaMallocHost may not page-lock the allocated memory.\n\n Page-locking excessive amounts of memory with ::cudaMallocHost() may degrade\n system performance, since it reduces the amount of memory available to the\n system for paging. As a result, this function is best used sparingly to allocate\n staging areas for data exchange between host and device.\n\n \\param ptr  - Pointer to allocated host memory\n \\param size - Requested allocation size in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocArray, ::cudaMalloc3D,\n ::cudaMalloc3DArray, ::cudaHostAlloc, ::cudaFree, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t, unsigned int) \"cudaMallocHost (C++ API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuMemAllocHost"]
    pub fn cudaMallocHost(ptr: *mut *mut ::core::ffi::c_void, size: usize) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocates pitched memory on the device\n\n Allocates at least \\p width (in bytes) * \\p height bytes of linear memory\n on the device and returns in \\p *devPtr a pointer to the allocated memory.\n The function may pad the allocation to ensure that corresponding pointers\n in any given row will continue to meet the alignment requirements for\n coalescing as the address is updated from row to row. The pitch returned in\n \\p *pitch by ::cudaMallocPitch() is the width in bytes of the allocation.\n The intended usage of \\p pitch is as a separate parameter of the allocation,\n used to compute addresses within the 2D array. Given the row and column of\n an array element of type \\p T, the address is computed as:\n \\code\nT* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column;\n\\endcode\n\n For allocations of 2D arrays, it is recommended that programmers consider\n performing pitch allocations using ::cudaMallocPitch(). Due to pitch\n alignment restrictions in the hardware, this is especially true if the\n application will be performing 2D memory copies between different regions\n of device memory (whether linear memory or CUDA arrays).\n\n \\param devPtr - Pointer to allocated pitched device memory\n \\param pitch  - Pitch for allocation\n \\param width  - Requested pitched allocation width (in bytes)\n \\param height - Requested pitched allocation height\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,\n ::cudaHostAlloc,\n ::cuMemAllocPitch"]
    pub fn cudaMallocPitch(
        devPtr: *mut *mut ::core::ffi::c_void,
        pitch: *mut usize,
        width: usize,
        height: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocate an array on the device\n\n Allocates a CUDA array according to the ::cudaChannelFormatDesc structure\n \\p desc and returns a handle to the new CUDA array in \\p *array.\n\n The ::cudaChannelFormatDesc is defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n\\endcode\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation\n - ::cudaArraySurfaceLoadStore: Allocates an array that can be read from or written to using a surface reference\n - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the array.\n - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array\n   can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync.\n   The physical backing memory must be allocated via ::cuMemCreate.\n - ::cudaArrayDeferredMapping: Allocates a CUDA array without physical backing memory. The entire array can\n   later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync.\n   The physical backing memory must be allocated via ::cuMemCreate.\n\n \\p width and \\p height must meet certain size requirements. See ::cudaMalloc3DArray() for more details.\n\n \\param array  - Pointer to allocated array in device memory\n \\param desc   - Requested channel format\n \\param width  - Requested array allocation width\n \\param height - Requested array allocation height\n \\param flags  - Requested properties of allocated array\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,\n ::cudaHostAlloc,\n ::cuArrayCreate"]
    pub fn cudaMallocArray(
        array: *mut cudaArray_t,
        desc: *const cudaChannelFormatDesc,
        width: usize,
        height: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Frees memory on the device\n\n Frees the memory space pointed to by \\p devPtr, which must have been\n returned by a previous call to one of the following memory allocation APIs -\n ::cudaMalloc(), ::cudaMallocPitch(), ::cudaMallocManaged(), ::cudaMallocAsync(),\n ::cudaMallocFromPoolAsync().\n\n Note - This API will not perform any implicit synchronization when the pointer was\n allocated with ::cudaMallocAsync or ::cudaMallocFromPoolAsync. Callers must ensure\n that all accesses to these pointer have completed before invoking ::cudaFree. For\n best performance and memory reuse, users should use ::cudaFreeAsync to free memory\n allocated via the stream ordered memory allocator.\n For all other pointers, this API may perform implicit synchronization.\n\n If ::cudaFree(\\p devPtr) has already been called before,\n an error is returned. If \\p devPtr is 0, no operation is performed.\n ::cudaFree() returns ::cudaErrorValue in case of failure.\n\n The device version of ::cudaFree cannot be used with a \\p *devPtr\n allocated using the host API, and vice versa.\n\n \\param devPtr - Device pointer to memory to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocManaged, ::cudaMallocArray, ::cudaFreeArray, ::cudaMallocAsync, ::cudaMallocFromPoolAsync\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaFreeAsync\n ::cudaHostAlloc,\n ::cuMemFree"]
    pub fn cudaFree(devPtr: *mut ::core::ffi::c_void) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Frees page-locked memory\n\n Frees the memory space pointed to by \\p hostPtr, which must have been\n returned by a previous call to ::cudaMallocHost() or ::cudaHostAlloc().\n\n \\param ptr - Pointer to memory to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaHostAlloc,\n ::cuMemFreeHost"]
    pub fn cudaFreeHost(ptr: *mut ::core::ffi::c_void) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Frees an array on the device\n\n Frees the CUDA array \\p array, which must have been returned by a\n previous call to ::cudaMallocArray(). If \\p devPtr is 0,\n no operation is performed.\n\n \\param array - Pointer to array to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuArrayDestroy"]
    pub fn cudaFreeArray(array: cudaArray_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Frees a mipmapped array on the device\n\n Frees the CUDA mipmapped array \\p mipmappedArray, which must have been\n returned by a previous call to ::cudaMallocMipmappedArray(). If \\p devPtr\n is 0, no operation is performed.\n\n \\param mipmappedArray - Pointer to mipmapped array to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuMipmappedArrayDestroy"]
    pub fn cudaFreeMipmappedArray(mipmappedArray: cudaMipmappedArray_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocates page-locked memory on the host\n\n Allocates \\p size bytes of host memory that is page-locked and accessible\n to the device. The driver tracks the virtual memory ranges allocated with\n this function and automatically accelerates calls to functions such as\n ::cudaMemcpy(). Since the memory can be accessed directly by the device, it\n can be read or written with much higher bandwidth than pageable memory\n obtained with functions such as ::malloc(). Allocating excessive amounts of\n pinned memory may degrade system performance, since it reduces the amount\n of memory available to the system for paging. As a result, this function is\n best used sparingly to allocate staging areas for data exchange between host\n and device.\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaHostAllocDefault: This flag's value is defined to be 0 and causes\n ::cudaHostAlloc() to emulate ::cudaMallocHost().\n - ::cudaHostAllocPortable: The memory returned by this call will be\n considered as pinned memory by all CUDA contexts, not just the one that\n performed the allocation.\n - ::cudaHostAllocMapped: Maps the allocation into the CUDA address space.\n The device pointer to the memory may be obtained by calling\n ::cudaHostGetDevicePointer().\n - ::cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC).\n WC memory can be transferred across the PCI Express bus more quickly on some\n system configurations, but cannot be read efficiently by most CPUs.  WC\n memory is a good option for buffers that will be written by the CPU and read\n by the device via mapped pinned memory or host->device transfers.\n\n All of these flags are orthogonal to one another: a developer may allocate\n memory that is portable, mapped and/or write-combined with no restrictions.\n\n In order for the ::cudaHostAllocMapped flag to have any effect, the CUDA context\n must support the ::cudaDeviceMapHost flag, which can be checked via\n ::cudaGetDeviceFlags(). The ::cudaDeviceMapHost flag is implicitly set for\n contexts created via the runtime API.\n\n The ::cudaHostAllocMapped flag may be specified on CUDA contexts for devices\n that do not support mapped pinned memory. The failure is deferred to\n ::cudaHostGetDevicePointer() because the memory may be mapped into other\n CUDA contexts via the ::cudaHostAllocPortable flag.\n\n Memory allocated by this function must be freed with ::cudaFreeHost().\n\n \\param pHost - Device pointer to allocated memory\n \\param size  - Requested allocation size in bytes\n \\param flags - Requested properties of allocated memory\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaSetDeviceFlags,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost,\n ::cudaGetDeviceFlags,\n ::cuMemHostAlloc"]
    pub fn cudaHostAlloc(
        pHost: *mut *mut ::core::ffi::c_void,
        size: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Registers an existing host memory range for use by CUDA\n\n Page-locks the memory range specified by \\p ptr and \\p size and maps it\n for the device(s) as specified by \\p flags. This memory range also is added\n to the same tracking mechanism as ::cudaHostAlloc() to automatically accelerate\n calls to functions such as ::cudaMemcpy(). Since the memory can be accessed\n directly by the device, it can be read or written with much higher bandwidth\n than pageable memory that has not been registered.  Page-locking excessive\n amounts of memory may degrade system performance, since it reduces the amount\n of memory available to the system for paging. As a result, this function is\n best used sparingly to register staging areas for data exchange between\n host and device.\n\n On systems where ::pageableMemoryAccessUsesHostPageTables is true, ::cudaHostRegister\n will not page-lock the memory range specified by \\p ptr but only populate\n unpopulated pages.\n\n ::cudaHostRegister is supported only on I/O coherent devices that have a non-zero\n value for the device attribute ::cudaDevAttrHostRegisterSupported.\n\n The \\p flags parameter enables different options to be specified that\n affect the allocation, as follows.\n\n - ::cudaHostRegisterDefault: On a system with unified virtual addressing,\n   the memory will be both mapped and portable.  On a system with no unified\n   virtual addressing, the memory will be neither mapped nor portable.\n\n - ::cudaHostRegisterPortable: The memory returned by this call will be\n   considered as pinned memory by all CUDA contexts, not just the one that\n   performed the allocation.\n\n - ::cudaHostRegisterMapped: Maps the allocation into the CUDA address\n   space. The device pointer to the memory may be obtained by calling\n   ::cudaHostGetDevicePointer().\n\n - ::cudaHostRegisterIoMemory: The passed memory pointer is treated as\n   pointing to some memory-mapped I/O space, e.g. belonging to a\n   third-party PCIe device, and it will marked as non cache-coherent and\n   contiguous.\n\n - ::cudaHostRegisterReadOnly: The passed memory pointer is treated as\n   pointing to memory that is considered read-only by the device.  On\n   platforms without ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, this\n   flag is required in order to register memory mapped to the CPU as\n   read-only.  Support for the use of this flag can be queried from the device\n   attribute ::cudaDevAttrHostRegisterReadOnlySupported.  Using this flag with\n   a current context associated with a device that does not have this attribute\n   set will cause ::cudaHostRegister to error with cudaErrorNotSupported.\n\n All of these flags are orthogonal to one another: a developer may page-lock\n memory that is portable or mapped with no restrictions.\n\n The CUDA context must have been created with the ::cudaMapHost flag in\n order for the ::cudaHostRegisterMapped flag to have any effect.\n\n The ::cudaHostRegisterMapped flag may be specified on CUDA contexts for\n devices that do not support mapped pinned memory. The failure is deferred\n to ::cudaHostGetDevicePointer() because the memory may be mapped into\n other CUDA contexts via the ::cudaHostRegisterPortable flag.\n\n For devices that have a non-zero value for the device attribute\n ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory\n can also be accessed from the device using the host pointer \\p ptr.\n The device pointer returned by ::cudaHostGetDevicePointer() may or may not\n match the original host pointer \\p ptr and depends on the devices visible to the\n application. If all devices visible to the application have a non-zero value for the\n device attribute, the device pointer returned by ::cudaHostGetDevicePointer()\n will match the original pointer \\p ptr. If any device visible to the application\n has a zero value for the device attribute, the device pointer returned by\n ::cudaHostGetDevicePointer() will not match the original host pointer \\p ptr,\n but it will be suitable for use on all devices provided Unified Virtual Addressing\n is enabled. In such systems, it is valid to access the memory using either pointer\n on devices that have a non-zero value for the device attribute. Note however that\n such devices should access the memory using only of the two pointers and not both.\n\n The memory page-locked by this function must be unregistered with ::cudaHostUnregister().\n\n \\param ptr   - Host pointer to memory to page-lock\n \\param size  - Size in bytes of the address range to page-lock in bytes\n \\param flags - Flags for allocation request\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorHostMemoryAlreadyRegistered,\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaHostUnregister, ::cudaHostGetFlags, ::cudaHostGetDevicePointer,\n ::cuMemHostRegister"]
    pub fn cudaHostRegister(
        ptr: *mut ::core::ffi::c_void,
        size: usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Unregisters a memory range that was registered with cudaHostRegister\n\n Unmaps the memory range whose base address is specified by \\p ptr, and makes\n it pageable again.\n\n The base address must be the same one specified to ::cudaHostRegister().\n\n \\param ptr - Host pointer to memory to unregister\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorHostMemoryNotRegistered\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaHostUnregister,\n ::cuMemHostUnregister"]
    pub fn cudaHostUnregister(ptr: *mut ::core::ffi::c_void) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Passes back device pointer of mapped host memory allocated by\n cudaHostAlloc or registered by cudaHostRegister\n\n Passes back the device pointer corresponding to the mapped, pinned host\n buffer allocated by ::cudaHostAlloc() or registered by ::cudaHostRegister().\n\n ::cudaHostGetDevicePointer() will fail if the ::cudaDeviceMapHost flag was\n not specified before deferred context creation occurred, or if called on a\n device that does not support mapped, pinned memory.\n\n For devices that have a non-zero value for the device attribute\n ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory\n can also be accessed from the device using the host pointer \\p pHost.\n The device pointer returned by ::cudaHostGetDevicePointer() may or may not\n match the original host pointer \\p pHost and depends on the devices visible to the\n application. If all devices visible to the application have a non-zero value for the\n device attribute, the device pointer returned by ::cudaHostGetDevicePointer()\n will match the original pointer \\p pHost. If any device visible to the application\n has a zero value for the device attribute, the device pointer returned by\n ::cudaHostGetDevicePointer() will not match the original host pointer \\p pHost,\n but it will be suitable for use on all devices provided Unified Virtual Addressing\n is enabled. In such systems, it is valid to access the memory using either pointer\n on devices that have a non-zero value for the device attribute. Note however that\n such devices should access the memory using only of the two pointers and not both.\n\n \\p flags provides for future releases.  For now, it must be set to 0.\n\n \\param pDevice - Returned device pointer for mapped memory\n \\param pHost   - Requested host pointer mapping\n \\param flags   - Flags for extensions (must be 0 for now)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaSetDeviceFlags, ::cudaHostAlloc,\n ::cuMemHostGetDevicePointer"]
    pub fn cudaHostGetDevicePointer(
        pDevice: *mut *mut ::core::ffi::c_void,
        pHost: *mut ::core::ffi::c_void,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Passes back flags used to allocate pinned host memory allocated by\n cudaHostAlloc\n\n ::cudaHostGetFlags() will fail if the input pointer does not\n reside in an address range allocated by ::cudaHostAlloc().\n\n \\param pFlags - Returned flags word\n \\param pHost - Host pointer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaHostAlloc,\n ::cuMemHostGetFlags"]
    pub fn cudaHostGetFlags(
        pFlags: *mut ::core::ffi::c_uint,
        pHost: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocates logical 1D, 2D, or 3D memory objects on the device\n\n Allocates at least \\p width * \\p height * \\p depth bytes of linear memory\n on the device and returns a ::cudaPitchedPtr in which \\p ptr is a pointer\n to the allocated memory. The function may pad the allocation to ensure\n hardware alignment requirements are met. The pitch returned in the \\p pitch\n field of \\p pitchedDevPtr is the width in bytes of the allocation.\n\n The returned ::cudaPitchedPtr contains additional fields \\p xsize and\n \\p ysize, the logical width and height of the allocation, which are\n equivalent to the \\p width and \\p height \\p extent parameters provided by\n the programmer during allocation.\n\n For allocations of 2D and 3D objects, it is highly recommended that\n programmers perform allocations using ::cudaMalloc3D() or\n ::cudaMallocPitch(). Due to alignment restrictions in the hardware, this is\n especially true if the application will be performing memory copies\n involving 2D or 3D objects (whether linear memory or CUDA arrays).\n\n \\param pitchedDevPtr  - Pointer to allocated pitched device memory\n \\param extent         - Requested allocation size (\\p width field in bytes)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMallocPitch, ::cudaFree, ::cudaMemcpy3D, ::cudaMemset3D,\n ::cudaMalloc3DArray, ::cudaMallocArray, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc, ::make_cudaPitchedPtr, ::make_cudaExtent,\n ::cuMemAllocPitch"]
    pub fn cudaMalloc3D(pitchedDevPtr: *mut cudaPitchedPtr, extent: cudaExtent) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocate an array on the device\n\n Allocates a CUDA array according to the ::cudaChannelFormatDesc structure\n \\p desc and returns a handle to the new CUDA array in \\p *array.\n\n The ::cudaChannelFormatDesc is defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n\\endcode\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n ::cudaMalloc3DArray() can allocate the following:\n\n - A 1D array is allocated if the height and depth extents are both zero.\n - A 2D array is allocated if only the depth extent is zero.\n - A 3D array is allocated if all three extents are non-zero.\n - A 1D layered CUDA array is allocated if only the height extent is zero and\n the cudaArrayLayered flag is set. Each layer is a 1D array. The number of layers is\n determined by the depth extent.\n - A 2D layered CUDA array is allocated if all three extents are non-zero and\n the cudaArrayLayered flag is set. Each layer is a 2D array. The number of layers is\n determined by the depth extent.\n - A cubemap CUDA array is allocated if all three extents are non-zero and the\n cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six. A cubemap is\n a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube.\n The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace.\n - A cubemap layered CUDA array is allocated if all three extents are non-zero, and both,\n cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be\n a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists\n of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form\n the second cubemap, and so on.\n\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation\n - ::cudaArrayLayered: Allocates a layered CUDA array, with the depth extent indicating the number of layers\n - ::cudaArrayCubemap: Allocates a cubemap CUDA array. Width must be equal to height, and depth must be six.\n   If the cudaArrayLayered flag is also set, depth must be a multiple of six.\n - ::cudaArraySurfaceLoadStore: Allocates a CUDA array that could be read from or written to using a surface\n   reference.\n - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA\n   array. Texture gather can only be performed on 2D CUDA arrays.\n - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array\n   can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. This flag can only be used for\n   creating 2D, 3D or 2D layered sparse CUDA arrays. The physical backing memory must be allocated via ::cuMemCreate.\n - ::cudaArrayDeferredMapping: Allocates a CUDA array without physical backing memory. The entire array can\n   later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated\n   via ::cuMemCreate.\n\n The width, height and depth extents must meet certain size requirements as listed in the following table.\n All values are specified in elements.\n\n Note that 2D CUDA arrays have different size requirements if the ::cudaArrayTextureGather flag is set. In that\n case, the valid range for (width, height, depth) is ((1,maxTexture2DGather[0]), (1,maxTexture2DGather[1]), 0).\n\n \\xmlonly\n <table outputclass=\"xmlonly\">\n <tgroup cols=\"3\" colsep=\"1\" rowsep=\"1\">\n <colspec colname=\"c1\" colwidth=\"1.0*\"/>\n <colspec colname=\"c2\" colwidth=\"3.0*\"/>\n <colspec colname=\"c3\" colwidth=\"3.0*\"/>\n <thead>\n <row>\n <entry>CUDA array type</entry>\n <entry>Valid extents that must always be met {(width range in elements),\n (height range), (depth range)}</entry>\n <entry>Valid extents with cudaArraySurfaceLoadStore set {(width range in\n elements), (height range), (depth range)}</entry>\n </row>\n </thead>\n <tbody>\n <row>\n <entry>1D</entry>\n <entry>{ (1,maxTexture1D), 0, 0 }</entry>\n <entry>{ (1,maxSurface1D), 0, 0 }</entry>\n </row>\n <row>\n <entry>2D</entry>\n <entry>{ (1,maxTexture2D[0]), (1,maxTexture2D[1]), 0 }</entry>\n <entry>{ (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 }</entry>\n </row>\n <row>\n <entry>3D</entry>\n <entry>{ (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) }\n OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]),\n (1,maxTexture3DAlt[2]) }</entry>\n <entry>{ (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) }</entry>\n </row>\n <row>\n <entry>1D Layered</entry>\n <entry>{ (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) }</entry>\n <entry>{ (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) }</entry>\n </row>\n <row>\n <entry>2D Layered</entry>\n <entry>{ (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]),\n (1,maxTexture2DLayered[2]) }</entry>\n <entry>{ (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]),\n (1,maxSurface2DLayered[2]) }</entry>\n </row>\n <row>\n <entry>Cubemap</entry>\n <entry>{ (1,maxTextureCubemap), (1,maxTextureCubemap), 6 }</entry>\n <entry>{ (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 }</entry>\n </row>\n <row>\n <entry>Cubemap Layered</entry>\n <entry>{ (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]),\n (1,maxTextureCubemapLayered[1]) }</entry>\n <entry>{ (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]),\n (1,maxSurfaceCubemapLayered[1]) }</entry>\n </row>\n </tbody>\n </tgroup>\n </table>\n \\endxmlonly\n\n \\param array  - Pointer to allocated array in device memory\n \\param desc   - Requested channel format\n \\param extent - Requested allocation size (\\p width field in elements)\n \\param flags  - Flags for extensions\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::make_cudaExtent,\n ::cuArray3DCreate"]
    pub fn cudaMalloc3DArray(
        array: *mut cudaArray_t,
        desc: *const cudaChannelFormatDesc,
        extent: cudaExtent,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocate a mipmapped array on the device\n\n Allocates a CUDA mipmapped array according to the ::cudaChannelFormatDesc structure\n \\p desc and returns a handle to the new CUDA mipmapped array in \\p *mipmappedArray.\n \\p numLevels specifies the number of mipmap levels to be allocated. This value is\n clamped to the range [1, 1 + floor(log2(max(width, height, depth)))].\n\n The ::cudaChannelFormatDesc is defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n\\endcode\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n ::cudaMallocMipmappedArray() can allocate the following:\n\n - A 1D mipmapped array is allocated if the height and depth extents are both zero.\n - A 2D mipmapped array is allocated if only the depth extent is zero.\n - A 3D mipmapped array is allocated if all three extents are non-zero.\n - A 1D layered CUDA mipmapped array is allocated if only the height extent is zero and\n the cudaArrayLayered flag is set. Each layer is a 1D mipmapped array. The number of layers is\n determined by the depth extent.\n - A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and\n the cudaArrayLayered flag is set. Each layer is a 2D mipmapped array. The number of layers is\n determined by the depth extent.\n - A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the\n cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six.\n The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace.\n - A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero, and both,\n cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be\n a multiple of six. A cubemap layered CUDA mipmapped array is a special type of 2D layered CUDA mipmapped\n array that consists of a collection of cubemap mipmapped arrays. The first six layers represent the\n first cubemap mipmapped array, the next six layers form the second cubemap mipmapped array, and so on.\n\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default mipmapped array allocation\n - ::cudaArrayLayered: Allocates a layered CUDA mipmapped array, with the depth extent indicating the number of layers\n - ::cudaArrayCubemap: Allocates a cubemap CUDA mipmapped array. Width must be equal to height, and depth must be six.\n   If the cudaArrayLayered flag is also set, depth must be a multiple of six.\n - ::cudaArraySurfaceLoadStore: This flag indicates that individual mipmap levels of the CUDA mipmapped array\n   will be read from or written to using a surface reference.\n - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA\n   array. Texture gather can only be performed on 2D CUDA mipmapped arrays, and the gather operations are\n   performed only on the most detailed mipmap level.\n - ::cudaArraySparse: Allocates a CUDA mipmapped array without physical backing memory. The subregions within this sparse array\n   can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. This flag can only be used for creating\n   2D, 3D or 2D layered sparse CUDA mipmapped arrays. The physical backing memory must be allocated via ::cuMemCreate.\n - ::cudaArrayDeferredMapping: Allocates a CUDA mipmapped array without physical backing memory. The entire array can\n   later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated\n   via ::cuMemCreate.\n\n The width, height and depth extents must meet certain size requirements as listed in the following table.\n All values are specified in elements.\n\n \\xmlonly\n <table outputclass=\"xmlonly\">\n <tgroup cols=\"3\" colsep=\"1\" rowsep=\"1\">\n <colspec colname=\"c1\" colwidth=\"1.0*\"/>\n <colspec colname=\"c2\" colwidth=\"3.0*\"/>\n <colspec colname=\"c3\" colwidth=\"3.0*\"/>\n <thead>\n <row>\n <entry>CUDA array type</entry>\n <entry>Valid extents that must always be met {(width range in elements),\n (height range), (depth range)}</entry>\n <entry>Valid extents with cudaArraySurfaceLoadStore set {(width range in\n elements), (height range), (depth range)}</entry>\n </row>\n </thead>\n <tbody>\n <row>\n <entry>1D</entry>\n <entry>{ (1,maxTexture1DMipmap), 0, 0 }</entry>\n <entry>{ (1,maxSurface1D), 0, 0 }</entry>\n </row>\n <row>\n <entry>2D</entry>\n <entry>{ (1,maxTexture2DMipmap[0]), (1,maxTexture2DMipmap[1]), 0 }</entry>\n <entry>{ (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 }</entry>\n </row>\n <row>\n <entry>3D</entry>\n <entry>{ (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) }\n OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]),\n (1,maxTexture3DAlt[2]) }</entry>\n <entry>{ (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) }</entry>\n </row>\n <row>\n <entry>1D Layered</entry>\n <entry>{ (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) }</entry>\n <entry>{ (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) }</entry>\n </row>\n <row>\n <entry>2D Layered</entry>\n <entry>{ (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]),\n (1,maxTexture2DLayered[2]) }</entry>\n <entry>{ (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]),\n (1,maxSurface2DLayered[2]) }</entry>\n </row>\n <row>\n <entry>Cubemap</entry>\n <entry>{ (1,maxTextureCubemap), (1,maxTextureCubemap), 6 }</entry>\n <entry>{ (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 }</entry>\n </row>\n <row>\n <entry>Cubemap Layered</entry>\n <entry>{ (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]),\n (1,maxTextureCubemapLayered[1]) }</entry>\n <entry>{ (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]),\n (1,maxSurfaceCubemapLayered[1]) }</entry>\n </row>\n </tbody>\n </tgroup>\n </table>\n \\endxmlonly\n\n \\param mipmappedArray  - Pointer to allocated mipmapped array in device memory\n \\param desc            - Requested channel format\n \\param extent          - Requested allocation size (\\p width field in elements)\n \\param numLevels       - Number of mipmap levels to allocate\n \\param flags           - Flags for extensions\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::make_cudaExtent,\n ::cuMipmappedArrayCreate"]
    pub fn cudaMallocMipmappedArray(
        mipmappedArray: *mut cudaMipmappedArray_t,
        desc: *const cudaChannelFormatDesc,
        extent: cudaExtent,
        numLevels: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets a mipmap level of a CUDA mipmapped array\n\n Returns in \\p *levelArray a CUDA array that represents a single mipmap level\n of the CUDA mipmapped array \\p mipmappedArray.\n\n If \\p level is greater than the maximum number of levels in this mipmapped array,\n ::cudaErrorInvalidValue is returned.\n\n If \\p mipmappedArray is NULL,\n ::cudaErrorInvalidResourceHandle is returned.\n\n \\param levelArray     - Returned mipmap level CUDA array\n \\param mipmappedArray - CUDA mipmapped array\n \\param level          - Mipmap level\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::make_cudaExtent,\n ::cuMipmappedArrayGetLevel"]
    pub fn cudaGetMipmappedArrayLevel(
        levelArray: *mut cudaArray_t,
        mipmappedArray: cudaMipmappedArray_const_t,
        level: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between 3D objects\n\n\\code\nstruct cudaExtent {\nsize_t width;\nsize_t height;\nsize_t depth;\n};\nstruct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d);\n\nstruct cudaPos {\nsize_t x;\nsize_t y;\nsize_t z;\n};\nstruct cudaPos make_cudaPos(size_t x, size_t y, size_t z);\n\nstruct cudaMemcpy3DParms {\ncudaArray_t           srcArray;\nstruct cudaPos        srcPos;\nstruct cudaPitchedPtr srcPtr;\ncudaArray_t           dstArray;\nstruct cudaPos        dstPos;\nstruct cudaPitchedPtr dstPtr;\nstruct cudaExtent     extent;\nenum cudaMemcpyKind   kind;\n};\n\\endcode\n\n ::cudaMemcpy3D() copies data betwen two 3D objects. The source and\n destination objects may be in either host memory, device memory, or a CUDA\n array. The source, destination, extent, and kind of copy performed is\n specified by the ::cudaMemcpy3DParms struct which should be initialized to\n zero before use:\n\\code\ncudaMemcpy3DParms myParms = {0};\n\\endcode\n\n The struct passed to ::cudaMemcpy3D() must specify one of \\p srcArray or\n \\p srcPtr and one of \\p dstArray or \\p dstPtr. Passing more than one\n non-zero source or destination will cause ::cudaMemcpy3D() to return an\n error.\n\n The \\p srcPos and \\p dstPos fields are optional offsets into the source and\n destination objects and are defined in units of each object's elements. The\n element for a host or device pointer is assumed to be <b>unsigned char</b>.\n\n The \\p extent field defines the dimensions of the transferred area in\n elements. If a CUDA array is participating in the copy, the extent is\n defined in terms of that array's elements. If no CUDA array is\n participating in the copy then the extents are defined in elements of\n <b>unsigned char</b>.\n\n The \\p kind field defines the direction of the copy. It must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost\n passed as kind and cudaArray type passed as source or destination, if the kind\n implies cudaArray type to be present on the host, ::cudaMemcpy3D() will\n disregard that implication and silently correct the kind based on the fact that\n cudaArray type can only be present on the device.\n\n If the source and destination are both arrays, ::cudaMemcpy3D() will return\n an error if they do not have the same element size.\n\n The source and destination object may not overlap. If overlapping source\n and destination objects are specified, undefined behavior will result.\n\n The source object must entirely contain the region defined by \\p srcPos\n and \\p extent. The destination object must entirely contain the region\n defined by \\p dstPos and \\p extent.\n\n ::cudaMemcpy3D() returns an error if the pitch of \\p srcPtr or \\p dstPtr\n exceeds the maximum allowed. The pitch of a ::cudaPitchedPtr allocated\n with ::cudaMalloc3D() will always be valid.\n\n \\param p - 3D memory copy parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3DAsync,\n ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::make_cudaExtent, ::make_cudaPos,\n ::cuMemcpy3D"]
    pub fn cudaMemcpy3D(p: *const cudaMemcpy3DParms) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies memory between devices\n\n Perform a 3D memory copy according to the parameters specified in\n \\p p.  See the definition of the ::cudaMemcpy3DPeerParms structure\n for documentation of its parameters.\n\n Note that this function is synchronous with respect to the host only if\n the source or destination of the transfer is host memory.  Note also\n that this copy is serialized with respect to all pending and future\n asynchronous work in to the current device, the copy's source device,\n and the copy's destination device (use ::cudaMemcpy3DPeerAsync to avoid\n this synchronization).\n\n \\param p - Parameters for the memory copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidPitchValue\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpy3DPeer"]
    pub fn cudaMemcpy3DPeer(p: *const cudaMemcpy3DPeerParms) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between 3D objects\n\n\\code\nstruct cudaExtent {\nsize_t width;\nsize_t height;\nsize_t depth;\n};\nstruct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d);\n\nstruct cudaPos {\nsize_t x;\nsize_t y;\nsize_t z;\n};\nstruct cudaPos make_cudaPos(size_t x, size_t y, size_t z);\n\nstruct cudaMemcpy3DParms {\ncudaArray_t           srcArray;\nstruct cudaPos        srcPos;\nstruct cudaPitchedPtr srcPtr;\ncudaArray_t           dstArray;\nstruct cudaPos        dstPos;\nstruct cudaPitchedPtr dstPtr;\nstruct cudaExtent     extent;\nenum cudaMemcpyKind   kind;\n};\n\\endcode\n\n ::cudaMemcpy3DAsync() copies data betwen two 3D objects. The source and\n destination objects may be in either host memory, device memory, or a CUDA\n array. The source, destination, extent, and kind of copy performed is\n specified by the ::cudaMemcpy3DParms struct which should be initialized to\n zero before use:\n\\code\ncudaMemcpy3DParms myParms = {0};\n\\endcode\n\n The struct passed to ::cudaMemcpy3DAsync() must specify one of \\p srcArray\n or \\p srcPtr and one of \\p dstArray or \\p dstPtr. Passing more than one\n non-zero source or destination will cause ::cudaMemcpy3DAsync() to return an\n error.\n\n The \\p srcPos and \\p dstPos fields are optional offsets into the source and\n destination objects and are defined in units of each object's elements. The\n element for a host or device pointer is assumed to be <b>unsigned char</b>.\n For CUDA arrays, positions must be in the range [0, 2048) for any\n dimension.\n\n The \\p extent field defines the dimensions of the transferred area in\n elements. If a CUDA array is participating in the copy, the extent is\n defined in terms of that array's elements. If no CUDA array is\n participating in the copy then the extents are defined in elements of\n <b>unsigned char</b>.\n\n The \\p kind field defines the direction of the copy. It must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost\n passed as kind and cudaArray type passed as source or destination, if the kind\n implies cudaArray type to be present on the host, ::cudaMemcpy3DAsync() will\n disregard that implication and silently correct the kind based on the fact that\n cudaArray type can only be present on the device.\n\n If the source and destination are both arrays, ::cudaMemcpy3DAsync() will\n return an error if they do not have the same element size.\n\n The source and destination object may not overlap. If overlapping source\n and destination objects are specified, undefined behavior will result.\n\n The source object must lie entirely within the region defined by \\p srcPos\n and \\p extent. The destination object must lie entirely within the region\n defined by \\p dstPos and \\p extent.\n\n ::cudaMemcpy3DAsync() returns an error if the pitch of \\p srcPtr or\n \\p dstPtr exceeds the maximum allowed. The pitch of a\n ::cudaPitchedPtr allocated with ::cudaMalloc3D() will always be valid.\n\n ::cudaMemcpy3DAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream\n is non-zero, the copy may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param p      - 3D memory copy parameters\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3D,\n ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, :::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::make_cudaExtent, ::make_cudaPos,\n ::cuMemcpy3DAsync"]
    pub fn cudaMemcpy3DAsync(p: *const cudaMemcpy3DParms, stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies memory between devices asynchronously.\n\n Perform a 3D memory copy according to the parameters specified in\n \\p p.  See the definition of the ::cudaMemcpy3DPeerParms structure\n for documentation of its parameters.\n\n \\param p      - Parameters for the memory copy\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidPitchValue\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpy3DPeerAsync"]
    pub fn cudaMemcpy3DPeerAsync(
        p: *const cudaMemcpy3DPeerParms,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets free and total device memory\n\n Returns in \\p *total the total amount of memory available to the the current context.\n Returns in \\p *free the amount of memory on the device that is free according to the OS.\n CUDA is not guaranteed to be able to allocate all of the memory that the OS reports as free.\n In a multi-tenet situation, free estimate returned is prone to race condition where\n a new allocation/free done by a different process or a different thread in the same\n process between the time when free memory was estimated and reported, will result in\n deviation in free value reported and actual free memory.\n\n The integrated GPU on Tegra shares memory with CPU and other component\n of the SoC. The free and total values returned by the API excludes\n the SWAP memory space maintained by the OS on some platforms.\n The OS may move some of the memory pages into swap area as the GPU or\n CPU allocate or access memory. See Tegra app note on how to calculate\n total and free memory on Tegra.\n\n \\param free  - Returned free memory in bytes\n \\param total - Returned total memory in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cuMemGetInfo"]
    pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets info about the specified cudaArray\n\n Returns in \\p *desc, \\p *extent and \\p *flags respectively, the type, shape\n and flags of \\p array.\n\n Any of \\p *desc, \\p *extent and \\p *flags may be specified as NULL.\n\n \\param desc   - Returned array type\n \\param extent - Returned array shape. 2D arrays will have depth of zero\n \\param flags  - Returned array flags\n \\param array  - The ::cudaArray to get info for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cuArrayGetDescriptor,\n ::cuArray3DGetDescriptor"]
    pub fn cudaArrayGetInfo(
        desc: *mut cudaChannelFormatDesc,
        extent: *mut cudaExtent,
        flags: *mut ::core::ffi::c_uint,
        array: cudaArray_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets a CUDA array plane from a CUDA array\n\n Returns in \\p pPlaneArray a CUDA array that represents a single format plane\n of the CUDA array \\p hArray.\n\n If \\p planeIdx is greater than the maximum number of planes in this array or if the array does\n not have a multi-planar format e.g: ::cudaChannelFormatKindNV12, then ::cudaErrorInvalidValue is returned.\n\n Note that if the \\p hArray has format ::cudaChannelFormatKindNV12, then passing in 0 for \\p planeIdx returns\n a CUDA array of the same size as \\p hArray but with one 8-bit channel and ::cudaChannelFormatKindUnsigned as its format kind.\n If 1 is passed for \\p planeIdx, then the returned CUDA array has half the height and width\n of \\p hArray with two 8-bit channels and ::cudaChannelFormatKindUnsigned as its format kind.\n\n \\param pPlaneArray   - Returned CUDA array referenced by the \\p planeIdx\n \\param hArray        - CUDA array\n \\param planeIdx      - Plane index\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cuArrayGetPlane"]
    pub fn cudaArrayGetPlane(
        pPlaneArray: *mut cudaArray_t,
        hArray: cudaArray_t,
        planeIdx: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the memory requirements of a CUDA array\n\n Returns the memory requirements of a CUDA array in \\p memoryRequirements\n If the CUDA array is not allocated with flag ::cudaArrayDeferredMapping\n ::cudaErrorInvalidValue will be returned.\n\n The returned value in ::cudaArrayMemoryRequirements::size\n represents the total size of the CUDA array.\n The returned value in ::cudaArrayMemoryRequirements::alignment\n represents the alignment necessary for mapping the CUDA array.\n\n \\return\n ::cudaSuccess\n ::cudaErrorInvalidValue\n\n \\param[out] memoryRequirements - Pointer to ::cudaArrayMemoryRequirements\n \\param[in] array - CUDA array to get the memory requirements of\n \\param[in] device - Device to get the memory requirements for\n \\sa ::cudaMipmappedArrayGetMemoryRequirements"]
    pub fn cudaArrayGetMemoryRequirements(
        memoryRequirements: *mut cudaArrayMemoryRequirements,
        array: cudaArray_t,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the memory requirements of a CUDA mipmapped array\n\n Returns the memory requirements of a CUDA mipmapped array in \\p memoryRequirements\n If the CUDA mipmapped array is not allocated with flag ::cudaArrayDeferredMapping\n ::cudaErrorInvalidValue will be returned.\n\n The returned value in ::cudaArrayMemoryRequirements::size\n represents the total size of the CUDA mipmapped array.\n The returned value in ::cudaArrayMemoryRequirements::alignment\n represents the alignment necessary for mapping the CUDA mipmapped\n array.\n\n \\return\n ::cudaSuccess\n ::cudaErrorInvalidValue\n\n \\param[out] memoryRequirements - Pointer to ::cudaArrayMemoryRequirements\n \\param[in] mipmap - CUDA mipmapped array to get the memory requirements of\n \\param[in] device - Device to get the memory requirements for\n \\sa ::cudaArrayGetMemoryRequirements"]
    pub fn cudaMipmappedArrayGetMemoryRequirements(
        memoryRequirements: *mut cudaArrayMemoryRequirements,
        mipmap: cudaMipmappedArray_t,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaArrayGetSparseProperties(
        sparseProperties: *mut cudaArraySparseProperties,
        array: cudaArray_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaMipmappedArrayGetSparseProperties(
        sparseProperties: *mut cudaArraySparseProperties,
        mipmap: cudaMipmappedArray_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n memory area pointed to by \\p dst, where \\p kind specifies the direction\n of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing. Calling\n ::cudaMemcpy() with dst and src pointers that do not match the direction of\n the copy results in an undefined behavior.\n\n \\param dst   - Destination memory address\n \\param src   - Source memory address\n \\param count - Size in bytes to copy\n \\param kind  - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\note_sync\n \\note_memcpy\n\n \\sa ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyDtoH,\n ::cuMemcpyHtoD,\n ::cuMemcpyDtoD,\n ::cuMemcpy"]
    pub fn cudaMemcpy(
        dst: *mut ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies memory between two devices\n\n Copies memory from one device to memory on another device.  \\p dst is the\n base device pointer of the destination memory and \\p dstDevice is the\n destination device.  \\p src is the base device pointer of the source memory\n and \\p srcDevice is the source device.  \\p count specifies the number of bytes\n to copy.\n\n Note that this function is asynchronous with respect to the host, but\n serialized with respect all pending and future asynchronous work in to the\n current device, \\p srcDevice, and \\p dstDevice (use ::cudaMemcpyPeerAsync\n to avoid this synchronization).\n\n \\param dst       - Destination device pointer\n \\param dstDevice - Destination device\n \\param src       - Source device pointer\n \\param srcDevice - Source device\n \\param count     - Size of memory copy in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpyPeer"]
    pub fn cudaMemcpyPeer(
        dst: *mut ::core::ffi::c_void,
        dstDevice: ::core::ffi::c_int,
        src: *const ::core::ffi::c_void,
        srcDevice: ::core::ffi::c_int,
        count: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the memory area pointed to by \\p dst, where\n \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing. \\p dpitch and\n \\p spitch are the widths in memory in bytes of the 2D arrays pointed to by\n \\p dst and \\p src, including any padding added to the end of each row. The\n memory areas may not overlap. \\p width must not exceed either \\p dpitch or\n \\p spitch. Calling ::cudaMemcpy2D() with \\p dst and \\p src pointers that do\n not match the direction of the copy results in an undefined behavior.\n ::cudaMemcpy2D() returns an error if \\p dpitch or \\p spitch exceeds\n the maximum allowed.\n\n \\param dst    - Destination memory address\n \\param dpitch - Pitch of destination memory\n \\param src    - Source memory address\n \\param spitch - Pitch of source memory\n \\param width  - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind   - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
    pub fn cudaMemcpy2D(
        dst: *mut ::core::ffi::c_void,
        dpitch: usize,
        src: *const ::core::ffi::c_void,
        spitch: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the CUDA array \\p dst starting at\n \\p hOffset rows and \\p wOffset bytes from the upper left corner,\n where \\p kind specifies the direction of the copy, and must be one\n of ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p spitch is the width in memory in bytes of the 2D array pointed to by\n \\p src, including any padding added to the end of each row. \\p wOffset +\n \\p width must not exceed the width of the CUDA array \\p dst. \\p width must\n not exceed \\p spitch. ::cudaMemcpy2DToArray() returns an error if \\p spitch\n exceeds the maximum allowed.\n\n \\param dst     - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src     - Source memory address\n \\param spitch  - Pitch of source memory\n \\param width   - Width of matrix transfer (columns in bytes)\n \\param height  - Height of matrix transfer (rows)\n \\param kind    - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
    pub fn cudaMemcpy2DToArray(
        dst: cudaArray_t,
        wOffset: usize,
        hOffset: usize,
        src: *const ::core::ffi::c_void,
        spitch: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA\n array \\p src starting at \\p hOffset rows and \\p wOffset bytes from the\n upper left corner to the memory area pointed to by \\p dst, where\n \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing. \\p dpitch is the\n width in memory in bytes of the 2D array pointed to by \\p dst, including any\n padding added to the end of each row. \\p wOffset + \\p width must not exceed\n the width of the CUDA array \\p src. \\p width must not exceed \\p dpitch.\n ::cudaMemcpy2DFromArray() returns an error if \\p dpitch exceeds the maximum\n allowed.\n\n \\param dst     - Destination memory address\n \\param dpitch  - Pitch of destination memory\n \\param src     - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param width   - Width of matrix transfer (columns in bytes)\n \\param height  - Height of matrix transfer (rows)\n \\param kind    - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
    pub fn cudaMemcpy2DFromArray(
        dst: *mut ::core::ffi::c_void,
        dpitch: usize,
        src: cudaArray_const_t,
        wOffset: usize,
        hOffset: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA\n array \\p src starting at \\p hOffsetSrc rows and \\p wOffsetSrc bytes from the\n upper left corner to the CUDA array \\p dst starting at \\p hOffsetDst rows\n and \\p wOffsetDst bytes from the upper left corner, where \\p kind\n specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p wOffsetDst + \\p width must not exceed the width of the CUDA array \\p dst.\n \\p wOffsetSrc + \\p width must not exceed the width of the CUDA array \\p src.\n\n \\param dst        - Destination memory address\n \\param wOffsetDst - Destination starting X offset (columns in bytes)\n \\param hOffsetDst - Destination starting Y offset (rows)\n \\param src        - Source memory address\n \\param wOffsetSrc - Source starting X offset (columns in bytes)\n \\param hOffsetSrc - Source starting Y offset (rows)\n \\param width      - Width of matrix transfer (columns in bytes)\n \\param height     - Height of matrix transfer (rows)\n \\param kind       - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
    pub fn cudaMemcpy2DArrayToArray(
        dst: cudaArray_t,
        wOffsetDst: usize,
        hOffsetDst: usize,
        src: cudaArray_const_t,
        wOffsetSrc: usize,
        hOffsetSrc: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data to the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p src\n to the memory area pointed to by \\p offset bytes from the start of symbol\n \\p symbol. The memory areas may not overlap. \\p symbol is a variable that\n resides in global or constant memory space. \\p kind can be either\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of\n transfer is inferred from the pointer values. However, ::cudaMemcpyDefault\n is only allowed on systems that support unified virtual addressing.\n\n \\param symbol - Device symbol address\n \\param src    - Source memory address\n \\param count  - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind   - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_sync\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray,  ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy,\n ::cuMemcpyHtoD,\n ::cuMemcpyDtoD"]
    pub fn cudaMemcpyToSymbol(
        symbol: *const ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data from the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p offset bytes\n from the start of symbol \\p symbol to the memory area pointed to by \\p dst.\n The memory areas may not overlap. \\p symbol is a variable that\n resides in global or constant memory space. \\p kind can be either\n ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of\n transfer is inferred from the pointer values. However, ::cudaMemcpyDefault\n is only allowed on systems that support unified virtual addressing.\n\n \\param dst    - Destination memory address\n \\param symbol - Device symbol address\n \\param count  - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind   - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_sync\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy,\n ::cuMemcpyDtoH,\n ::cuMemcpyDtoD"]
    pub fn cudaMemcpyFromSymbol(
        dst: *mut ::core::ffi::c_void,
        symbol: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n memory area pointed to by \\p dst, where \\p kind specifies the\n direction of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n The memory areas may not overlap. Calling ::cudaMemcpyAsync() with \\p dst and\n \\p src pointers that do not match the direction of the copy results in an\n undefined behavior.\n\n ::cudaMemcpyAsync() is asynchronous with respect to the host, so the call\n may return before the copy is complete. The copy can optionally be\n associated to a stream by passing a non-zero \\p stream argument. If \\p kind\n is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and the \\p stream is\n non-zero, the copy may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param dst    - Destination memory address\n \\param src    - Source memory address\n \\param count  - Size in bytes to copy\n \\param kind   - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAsync,\n ::cuMemcpyDtoHAsync,\n ::cuMemcpyHtoDAsync,\n ::cuMemcpyDtoDAsync"]
    pub fn cudaMemcpyAsync(
        dst: *mut ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies memory between two devices asynchronously.\n\n Copies memory from one device to memory on another device.  \\p dst is the\n base device pointer of the destination memory and \\p dstDevice is the\n destination device.  \\p src is the base device pointer of the source memory\n and \\p srcDevice is the source device.  \\p count specifies the number of bytes\n to copy.\n\n Note that this function is asynchronous with respect to the host and all work\n on other devices.\n\n \\param dst       - Destination device pointer\n \\param dstDevice - Destination device\n \\param src       - Source device pointer\n \\param srcDevice - Source device\n \\param count     - Size of memory copy in bytes\n \\param stream    - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpyPeerAsync"]
    pub fn cudaMemcpyPeerAsync(
        dst: *mut ::core::ffi::c_void,
        dstDevice: ::core::ffi::c_int,
        src: *const ::core::ffi::c_void,
        srcDevice: ::core::ffi::c_int,
        count: usize,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Performs a batch of memory copies asynchronously.\n\n Performs a batch of memory copies. The batch as a whole executes in stream order but copies within a\n batch are not guaranteed to execute in any specific order. This API only supports pointer-to-pointer copies.\n For copies involving CUDA arrays, please see ::cudaMemcpy3DBatchAsync.\n\n Performs memory copies from source buffers specified in \\p srcs to destination buffers specified in \\p dsts.\n The size of each copy is specified in \\p sizes. All three arrays must be of the same length as specified\n by \\p count. Since there are no ordering guarantees for copies within a batch, specifying any dependent copies\n within a batch will result in undefined behavior.\n\n Every copy in the batch has to be associated with a set of attributes specified in the \\p attrs array.\n Each entry in this array can apply to more than one copy. This can be done by specifying in the \\p attrsIdxs array,\n the index of the first copy that the corresponding entry in the \\p attrs array applies to. Both \\p attrs and\n \\p attrsIdxs must be of the same length as specified by \\p numAttrs. For example, if a batch has 10 copies listed\n in dst/src/sizes, the first 6 of which have one set of attributes and the remaining 4 another, then \\p numAttrs\n will be 2, \\p attrsIdxs will be {0, 6} and \\p attrs will contains the two sets of attributes. Note that the first entry\n in \\p attrsIdxs must always be 0. Also, each entry must be greater than the previous entry and the last entry should be\n less than \\p count. Furthermore, \\p numAttrs must be lesser than or equal to \\p count.\n\n The ::cudaMemcpyAttributes::srcAccessOrder indicates the source access ordering to be observed for copies associated\n with the attribute. If the source access order is set to ::cudaMemcpySrcAccessOrderStream, then the source will\n be accessed in stream order. If the source access order is set to ::cudaMemcpySrcAccessOrderDuringApiCall then\n it indicates that access to the source pointer can be out of stream order and all accesses must be complete before the\n API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior\n operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope\n that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the\n need for the user to synchronize the stream after the API call. If the source access order is set to\n ::cudaMemcpySrcAccessOrderAny then it indicates that access to the source pointer can be out of stream order and the\n accesses can happen even after the API call returns. This flag is suited for host pointers allocated\n outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory.\n Specifying this flag allows the driver to optimize the copy on certain platforms. Each memcpy operation in the batch\n must have a valid ::cudaMemcpyAttributes corresponding to it including the appropriate srcAccessOrder setting,\n otherwise the API will return ::cudaErrorInvalidValue.\n\n The ::cudaMemcpyAttributes::srcLocHint and ::cudaMemcpyAttributes::dstLocHint allows applications to specify hint locations\n for operands of a copy when the operand doesn't have a fixed location. That is, these hints are\n only applicable for managed memory pointers on devices where ::cudaDevAttrConcurrentManagedAccess is true or\n system-allocated pageable memory on devices where ::cudaDevAttrPageableMemoryAccess is true.\n For other cases, these hints are ignored.\n\n The ::cudaMemcpyAttributes::flags field can be used to specify certain flags for copies. Setting the\n ::cudaMemcpyFlagPreferOverlapWithCompute flag indicates that the associated copies should preferably overlap with\n any compute work. Note that this flag is a hint and can be ignored depending on the platform and other parameters of the copy.\n\n\n \\param dsts          - Array of destination pointers.\n \\param srcs          - Array of memcpy source pointers.\n \\param sizes         - Array of sizes for memcpy operations.\n \\param count         - Size of \\p dsts, \\p srcs and \\p sizes arrays\n \\param attrs         - Array of memcpy attributes.\n \\param attrsIdxs     - Array of indices to specify which copies each entry in the \\p attrs array applies to.\n                        The attributes specified in attrs[k] will be applied to copies starting from attrsIdxs[k]\n                        through attrsIdxs[k+1] - 1. Also attrs[numAttrs-1] will apply to copies starting from\n                        attrsIdxs[numAttrs-1] through count - 1.\n \\param numAttrs      - Size of \\p attrs and \\p attrsIdxs arrays.\n \\param hStream       - The stream to enqueue the operations in. Must not be legacy NULL stream.\n\n \\return\n ::cudaSuccess\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_async\n \\note_memcpy"]
    pub fn cudaMemcpyBatchAsync(
        dsts: *const *mut ::core::ffi::c_void,
        srcs: *const *const ::core::ffi::c_void,
        sizes: *const usize,
        count: usize,
        attrs: *mut cudaMemcpyAttributes,
        attrsIdxs: *mut usize,
        numAttrs: usize,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Performs a batch of 3D memory copies asynchronously.\n\n Performs a batch of memory copies. The batch as a whole executes in stream order but copies within a\n batch are not guaranteed to execute in any specific order. Note that this means specifying any dependent\n copies within a batch will result in undefined behavior.\n\n Performs memory copies as specified in the \\p opList array. The length of this array is specified in \\p numOps.\n Each entry in this array describes a copy operation. This includes among other things, the source and destination\n operands for the copy as specified in ::cudaMemcpy3DBatchOp::src and ::cudaMemcpy3DBatchOp::dst respectively.\n The source and destination operands of a copy can either be a pointer or a CUDA array. The width, height and depth\n of a copy is specified in ::cudaMemcpy3DBatchOp::extent. The width, height and depth of a copy are specified in\n elements and must not be zero. For pointer-to-pointer copies, the element size is considered to be 1. For pointer\n to CUDA array or vice versa copies, the element size is determined by the CUDA array. For CUDA array to CUDA array copies,\n the element size of the two CUDA arrays must match.\n\n For a given operand, if ::cudaMemcpy3DOperand::type is specified as ::cudaMemcpyOperandTypePointer, then\n ::cudaMemcpy3DOperand::op::ptr will be used. The ::cudaMemcpy3DOperand::op::ptr::ptr field must contain the pointer where\n the copy should begin. The ::cudaMemcpy3DOperand::op::ptr::rowLength field specifies the length of each row in elements and\n must either be zero or be greater than or equal to the width of the copy specified in ::cudaMemcpy3DBatchOp::extent::width.\n The ::cudaMemcpy3DOperand::op::ptr::layerHeight field specifies the height of each layer and must either be\n zero or be greater than or equal to the height of the copy specified in ::cudaMemcpy3DBatchOp::extent::height.\n When either of these values is zero, that aspect of the operand is considered to be tightly packed according to the copy extent.\n For managed memory pointers on devices where ::cudaDevAttrConcurrentManagedAccess is true or system-allocated pageable memory\n on devices where ::cudaDevAttrPageableMemoryAccess is true, the ::cudaMemcpy3DOperand::op::ptr::locHint field can be used to hint\n the location of the operand.\n\n If an operand's type is specified as ::cudaMemcpyOperandTypeArray, then ::cudaMemcpy3DOperand::op::array will be used.\n The ::cudaMemcpy3DOperand::op::array::array field specifies the CUDA array and ::cudaMemcpy3DOperand::op::array::offset specifies\n the 3D offset into that array where the copy begins.\n\n The ::cudaMemcpyAttributes::srcAccessOrder indicates the source access ordering to be observed for copies associated\n with the attribute. If the source access order is set to ::cudaMemcpySrcAccessOrderStream, then the source will\n be accessed in stream order. If the source access order is set to ::cudaMemcpySrcAccessOrderDuringApiCall then\n it indicates that access to the source pointer can be out of stream order and all accesses must be complete before the\n API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior\n operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope\n that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the\n need for the user to synchronize the stream after the API call. If the source access order is set to\n ::cudaMemcpySrcAccessOrderAny then it indicates that access to the source pointer can be out of stream order and the\n accesses can happen even after the API call returns. This flag is suited for host pointers allocated\n outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory.\n Specifying this flag allows the driver to optimize the copy on certain platforms. Each memcopy operation in \\p opList\n must have a valid srcAccessOrder setting, otherwise this API will return ::cudaErrorInvalidValue.\n\n The ::cudaMemcpyAttributes::flags field can be used to specify certain flags for copies. Setting the\n ::cudaMemcpyFlagPreferOverlapWithCompute flag indicates that the associated copies should preferably overlap with\n any compute work. Note that this flag is a hint and can be ignored depending on the platform and other parameters of the copy.\n\n\n \\param numOps     - Total number of memcpy operations.\n \\param opList     - Array of size \\p numOps containing the actual memcpy operations.\n \\param flags      - Flags for future use, must be zero now.\n \\param hStream    - The stream to enqueue the operations in. Must not be default NULL stream.\n\n \\return\n ::cudaSuccess\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_async\n \\note_memcpy"]
    pub fn cudaMemcpy3DBatchAsync(
        numOps: usize,
        opList: *mut cudaMemcpy3DBatchOp,
        flags: ::core::ffi::c_ulonglong,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the memory area pointed to by \\p dst, where\n \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p dpitch and \\p spitch are the widths in memory in bytes of the 2D arrays\n pointed to by \\p dst and \\p src, including any padding added to the end of\n each row. The memory areas may not overlap. \\p width must not exceed either\n \\p dpitch or \\p spitch.\n\n Calling ::cudaMemcpy2DAsync() with \\p dst and \\p src pointers that do not\n match the direction of the copy results in an undefined behavior.\n ::cudaMemcpy2DAsync() returns an error if \\p dpitch or \\p spitch is greater\n than the maximum allowed.\n\n ::cudaMemcpy2DAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and\n \\p stream is non-zero, the copy may overlap with operations in other\n streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param dst    - Destination memory address\n \\param dpitch - Pitch of destination memory\n \\param src    - Source memory address\n \\param spitch - Pitch of source memory\n \\param width  - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind   - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2DAsync"]
    pub fn cudaMemcpy2DAsync(
        dst: *mut ::core::ffi::c_void,
        dpitch: usize,
        src: *const ::core::ffi::c_void,
        spitch: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the CUDA array \\p dst starting at \\p hOffset\n rows and \\p wOffset bytes from the upper left corner, where \\p kind specifies\n the direction of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p spitch is the width in memory in bytes of the 2D array pointed to by\n \\p src, including any padding added to the end of each row. \\p wOffset +\n \\p width must not exceed the width of the CUDA array \\p dst. \\p width must\n not exceed \\p spitch. ::cudaMemcpy2DToArrayAsync() returns an error if\n \\p spitch exceeds the maximum allowed.\n\n ::cudaMemcpy2DToArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and\n \\p stream is non-zero, the copy may overlap with operations in other\n streams.\n\n \\param dst     - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src     - Source memory address\n \\param spitch  - Pitch of source memory\n \\param width   - Width of matrix transfer (columns in bytes)\n \\param height  - Height of matrix transfer (rows)\n \\param kind    - Type of transfer\n \\param stream  - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2DAsync"]
    pub fn cudaMemcpy2DToArrayAsync(
        dst: cudaArray_t,
        wOffset: usize,
        hOffset: usize,
        src: *const ::core::ffi::c_void,
        spitch: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA\n array \\p src starting at \\p hOffset rows and \\p wOffset bytes from the\n upper left corner to the memory area pointed to by \\p dst,\n where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p dpitch is the width in memory in bytes of the 2D\n array pointed to by \\p dst, including any padding added to the end of each\n row. \\p wOffset + \\p width must not exceed the width of the CUDA array\n \\p src. \\p width must not exceed \\p dpitch. ::cudaMemcpy2DFromArrayAsync()\n returns an error if \\p dpitch exceeds the maximum allowed.\n\n ::cudaMemcpy2DFromArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally be\n associated to a stream by passing a non-zero \\p stream argument. If \\p kind\n is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream is\n non-zero, the copy may overlap with operations in other streams.\n\n \\param dst     - Destination memory address\n \\param dpitch  - Pitch of destination memory\n \\param src     - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param width   - Width of matrix transfer (columns in bytes)\n \\param height  - Height of matrix transfer (rows)\n \\param kind    - Type of transfer\n \\param stream  - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2DAsync"]
    pub fn cudaMemcpy2DFromArrayAsync(
        dst: *mut ::core::ffi::c_void,
        dpitch: usize,
        src: cudaArray_const_t,
        wOffset: usize,
        hOffset: usize,
        width: usize,
        height: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data to the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p src\n to the memory area pointed to by \\p offset bytes from the start of symbol\n \\p symbol. The memory areas may not overlap. \\p symbol is a variable that\n resides in global or constant memory space. \\p kind can be either\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer\n is inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice and \\p stream is non-zero, the copy\n may overlap with operations in other streams.\n\n \\param symbol - Device symbol address\n \\param src    - Source memory address\n \\param count  - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind   - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAsync,\n ::cuMemcpyHtoDAsync,\n ::cuMemcpyDtoDAsync"]
    pub fn cudaMemcpyToSymbolAsync(
        symbol: *const ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data from the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p offset bytes\n from the start of symbol \\p symbol to the memory area pointed to by \\p dst.\n The memory areas may not overlap. \\p symbol is a variable that resides in\n global or constant memory space. \\p kind can be either\n ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer\n is inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally be\n associated to a stream by passing a non-zero \\p stream argument. If \\p kind\n is ::cudaMemcpyDeviceToHost and \\p stream is non-zero, the copy may overlap\n with operations in other streams.\n\n \\param dst    - Destination memory address\n \\param symbol - Device symbol address\n \\param count  - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind   - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync,\n ::cuMemcpyAsync,\n ::cuMemcpyDtoHAsync,\n ::cuMemcpyDtoDAsync"]
    pub fn cudaMemcpyFromSymbolAsync(
        dst: *mut ::core::ffi::c_void,
        symbol: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initializes or sets device memory to a value\n\n Fills the first \\p count bytes of the memory area pointed to by \\p devPtr\n with the constant byte value \\p value.\n\n Note that this function is asynchronous with respect to the host unless\n \\p devPtr refers to pinned host memory.\n\n \\param devPtr - Pointer to device memory\n \\param value  - Value to set for each byte of specified memory\n \\param count  - Size in bytes to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cuMemsetD8,\n ::cuMemsetD16,\n ::cuMemsetD32"]
    pub fn cudaMemset(
        devPtr: *mut ::core::ffi::c_void,
        value: ::core::ffi::c_int,
        count: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initializes or sets device memory to a value\n\n Sets to the specified value \\p value a matrix (\\p height rows of \\p width\n bytes each) pointed to by \\p dstPtr. \\p pitch is the width in bytes of the\n 2D array pointed to by \\p dstPtr, including any padding added to the end\n of each row. This function performs fastest when the pitch is one that has\n been passed back by ::cudaMallocPitch().\n\n Note that this function is asynchronous with respect to the host unless\n \\p devPtr refers to pinned host memory.\n\n \\param devPtr - Pointer to 2D device memory\n \\param pitch  - Pitch in bytes of 2D device memory(Unused if \\p height is 1)\n \\param value  - Value to set for each byte of specified memory\n \\param width  - Width of matrix set (columns in bytes)\n \\param height - Height of matrix set (rows)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset3D, ::cudaMemsetAsync,\n ::cudaMemset2DAsync, ::cudaMemset3DAsync,\n ::cuMemsetD2D8,\n ::cuMemsetD2D16,\n ::cuMemsetD2D32"]
    pub fn cudaMemset2D(
        devPtr: *mut ::core::ffi::c_void,
        pitch: usize,
        value: ::core::ffi::c_int,
        width: usize,
        height: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initializes or sets device memory to a value\n\n Initializes each element of a 3D array to the specified value \\p value.\n The object to initialize is defined by \\p pitchedDevPtr. The \\p pitch field\n of \\p pitchedDevPtr is the width in memory in bytes of the 3D array pointed\n to by \\p pitchedDevPtr, including any padding added to the end of each row.\n The \\p xsize field specifies the logical width of each row in bytes, while\n the \\p ysize field specifies the height of each 2D slice in rows.\n The \\p pitch field of \\p pitchedDevPtr is ignored when \\p height and \\p depth\n are both equal to 1.\n\n The extents of the initialized region are specified as a \\p width in bytes,\n a \\p height in rows, and a \\p depth in slices.\n\n Extents with \\p width greater than or equal to the \\p xsize of\n \\p pitchedDevPtr may perform significantly faster than extents narrower\n than the \\p xsize. Secondarily, extents with \\p height equal to the\n \\p ysize of \\p pitchedDevPtr will perform faster than when the \\p height is\n shorter than the \\p ysize.\n\n This function performs fastest when the \\p pitchedDevPtr has been allocated\n by ::cudaMalloc3D().\n\n Note that this function is asynchronous with respect to the host unless\n \\p pitchedDevPtr refers to pinned host memory.\n\n \\param pitchedDevPtr - Pointer to pitched device memory\n \\param value         - Value to set for each byte of specified memory\n \\param extent        - Size parameters for where to set device memory (\\p width field in bytes)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D,\n ::cudaMemsetAsync, ::cudaMemset2DAsync, ::cudaMemset3DAsync,\n ::cudaMalloc3D, ::make_cudaPitchedPtr,\n ::make_cudaExtent"]
    pub fn cudaMemset3D(
        pitchedDevPtr: cudaPitchedPtr,
        value: ::core::ffi::c_int,
        extent: cudaExtent,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initializes or sets device memory to a value\n\n Fills the first \\p count bytes of the memory area pointed to by \\p devPtr\n with the constant byte value \\p value.\n\n ::cudaMemsetAsync() is asynchronous with respect to the host, so\n the call may return before the memset is complete. The operation can optionally\n be associated to a stream by passing a non-zero \\p stream argument.\n If \\p stream is non-zero, the operation may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param devPtr - Pointer to device memory\n \\param value  - Value to set for each byte of specified memory\n \\param count  - Size in bytes to set\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,\n ::cudaMemset2DAsync, ::cudaMemset3DAsync,\n ::cuMemsetD8Async,\n ::cuMemsetD16Async,\n ::cuMemsetD32Async"]
    pub fn cudaMemsetAsync(
        devPtr: *mut ::core::ffi::c_void,
        value: ::core::ffi::c_int,
        count: usize,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initializes or sets device memory to a value\n\n Sets to the specified value \\p value a matrix (\\p height rows of \\p width\n bytes each) pointed to by \\p dstPtr. \\p pitch is the width in bytes of the\n 2D array pointed to by \\p dstPtr, including any padding added to the end\n of each row. This function performs fastest when the pitch is one that has\n been passed back by ::cudaMallocPitch().\n\n ::cudaMemset2DAsync() is asynchronous with respect to the host, so\n the call may return before the memset is complete. The operation can optionally\n be associated to a stream by passing a non-zero \\p stream argument.\n If \\p stream is non-zero, the operation may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param devPtr - Pointer to 2D device memory\n \\param pitch  - Pitch in bytes of 2D device memory(Unused if \\p height is 1)\n \\param value  - Value to set for each byte of specified memory\n \\param width  - Width of matrix set (columns in bytes)\n \\param height - Height of matrix set (rows)\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,\n ::cudaMemsetAsync, ::cudaMemset3DAsync,\n ::cuMemsetD2D8Async,\n ::cuMemsetD2D16Async,\n ::cuMemsetD2D32Async"]
    pub fn cudaMemset2DAsync(
        devPtr: *mut ::core::ffi::c_void,
        pitch: usize,
        value: ::core::ffi::c_int,
        width: usize,
        height: usize,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Initializes or sets device memory to a value\n\n Initializes each element of a 3D array to the specified value \\p value.\n The object to initialize is defined by \\p pitchedDevPtr. The \\p pitch field\n of \\p pitchedDevPtr is the width in memory in bytes of the 3D array pointed\n to by \\p pitchedDevPtr, including any padding added to the end of each row.\n The \\p xsize field specifies the logical width of each row in bytes, while\n the \\p ysize field specifies the height of each 2D slice in rows.\n The \\p pitch field of \\p pitchedDevPtr is ignored when \\p height and \\p depth\n are both equal to 1.\n\n The extents of the initialized region are specified as a \\p width in bytes,\n a \\p height in rows, and a \\p depth in slices.\n\n Extents with \\p width greater than or equal to the \\p xsize of\n \\p pitchedDevPtr may perform significantly faster than extents narrower\n than the \\p xsize. Secondarily, extents with \\p height equal to the\n \\p ysize of \\p pitchedDevPtr will perform faster than when the \\p height is\n shorter than the \\p ysize.\n\n This function performs fastest when the \\p pitchedDevPtr has been allocated\n by ::cudaMalloc3D().\n\n ::cudaMemset3DAsync() is asynchronous with respect to the host, so\n the call may return before the memset is complete. The operation can optionally\n be associated to a stream by passing a non-zero \\p stream argument.\n If \\p stream is non-zero, the operation may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param pitchedDevPtr - Pointer to pitched device memory\n \\param value         - Value to set for each byte of specified memory\n \\param extent        - Size parameters for where to set device memory (\\p width field in bytes)\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,\n ::cudaMemsetAsync, ::cudaMemset2DAsync,\n ::cudaMalloc3D, ::make_cudaPitchedPtr,\n ::make_cudaExtent"]
    pub fn cudaMemset3DAsync(
        pitchedDevPtr: cudaPitchedPtr,
        value: ::core::ffi::c_int,
        extent: cudaExtent,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Finds the address associated with a CUDA symbol\n\n Returns in \\p *devPtr the address of symbol \\p symbol on the device.\n \\p symbol is a variable that resides in global or constant memory space.\n If \\p symbol cannot be found, or if \\p symbol is not declared in the\n global or constant memory space, \\p *devPtr is unchanged and the error\n ::cudaErrorInvalidSymbol is returned.\n\n \\param devPtr - Return device pointer associated with symbol\n \\param symbol - Device symbol address\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaGetSymbolAddress(void**, const T&) \"cudaGetSymbolAddress (C++ API)\",\n \\ref ::cudaGetSymbolSize(size_t*, const void*) \"cudaGetSymbolSize (C API)\",\n ::cuModuleGetGlobal"]
    pub fn cudaGetSymbolAddress(
        devPtr: *mut *mut ::core::ffi::c_void,
        symbol: *const ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Finds the size of the object associated with a CUDA symbol\n\n Returns in \\p *size the size of symbol \\p symbol. \\p symbol is a variable that\n resides in global or constant memory space. If \\p symbol cannot be found, or\n if \\p symbol is not declared in global or constant memory space, \\p *size is\n unchanged and the error ::cudaErrorInvalidSymbol is returned.\n\n \\param size   - Size of object associated with symbol\n \\param symbol - Device symbol address\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaGetSymbolAddress(void**, const void*) \"cudaGetSymbolAddress (C API)\",\n \\ref ::cudaGetSymbolSize(size_t*, const T&) \"cudaGetSymbolSize (C++ API)\",\n ::cuModuleGetGlobal"]
    pub fn cudaGetSymbolSize(size: *mut usize, symbol: *const ::core::ffi::c_void) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Prefetches memory to the specified destination location\n\n Prefetches memory to the specified destination location.  \\p devPtr is the\n base device pointer of the memory to be prefetched and \\p location specifies the\n destination location. \\p count specifies the number of bytes to copy. \\p stream\n is the stream in which the operation is enqueued. The memory range must refer\n to managed memory allocated via ::cudaMallocManaged or declared via __managed__ variables,\n or it may also refer to system-allocated memory on systems with non-zero\n cudaDevAttrPageableMemoryAccess.\n\n Specifying ::cudaMemLocationTypeDevice for ::cudaMemLocation::type will prefetch memory to GPU\n specified by device ordinal ::cudaMemLocation::id which must have non-zero value for the device attribute\n ::concurrentManagedAccess. Additionally, \\p stream must be associated with a device\n that has a non-zero value for the device attribute ::concurrentManagedAccess.\n Specifying ::cudaMemLocationTypeHost as ::cudaMemLocation::type will prefetch data to host memory.\n Applications can request prefetching memory to a specific host NUMA node by specifying\n ::cudaMemLocationTypeHostNuma for ::cudaMemLocation::type and a valid host NUMA node id in ::cudaMemLocation::id\n Users can also request prefetching memory to the host NUMA node closest to the current thread's CPU by specifying\n ::cudaMemLocationTypeHostNumaCurrent for ::cudaMemLocation::type. Note when ::cudaMemLocation::type is etiher\n ::cudaMemLocationTypeHost OR ::cudaMemLocationTypeHostNumaCurrent, ::cudaMemLocation::id will be ignored.\n\n The start address and end address of the memory range will be rounded down and rounded up\n respectively to be aligned to CPU page size before the prefetch operation is enqueued\n in the stream.\n\n If no physical memory has been allocated for this region, then this memory region\n will be populated and mapped on the destination device. If there's insufficient\n memory to prefetch the desired region, the Unified Memory driver may evict pages from other\n ::cudaMallocManaged allocations to host memory in order to make room. Device memory\n allocated using ::cudaMalloc or ::cudaMallocArray will not be evicted.\n\n By default, any mappings to the previous location of the migrated pages are removed and\n mappings for the new location are only setup on the destination location. The exact behavior however\n also depends on the settings applied to this memory range via ::cuMemAdvise as described\n below:\n\n If ::cudaMemAdviseSetReadMostly was set on any subset of this memory range,\n then that subset will create a read-only copy of the pages on destination location.\n If however the destination location is a host NUMA node, then any pages of that subset\n that are already in another host NUMA node will be transferred to the destination.\n\n If ::cudaMemAdviseSetPreferredLocation was called on any subset of this memory\n range, then the pages will be migrated to \\p location even if \\p location is not the\n preferred location of any pages in the memory range.\n\n If ::cudaMemAdviseSetAccessedBy was called on any subset of this memory range,\n then mappings to those pages from all the appropriate processors are updated to\n refer to the new location if establishing such a mapping is possible. Otherwise,\n those mappings are cleared.\n\n Note that this API is not required for functionality and only serves to improve performance\n by allowing the application to migrate data to a suitable location before it is accessed.\n Memory accesses to this range are always coherent and are allowed even when the data is\n actively being migrated.\n\n Note that this function is asynchronous with respect to the host and all work\n on other devices.\n\n \\param devPtr    - Pointer to be prefetched\n \\param count     - Size in bytes\n \\param location  - location to prefetch to\n \\param flags     - flags for future use, must be zero now.\n \\param stream    - Stream to enqueue prefetch operation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync, ::cudaMemAdvise, ::cuMemPrefetchAsync"]
    pub fn cudaMemPrefetchAsync(
        devPtr: *const ::core::ffi::c_void,
        count: usize,
        location: cudaMemLocation,
        flags: ::core::ffi::c_uint,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Performs a batch of memory prefetches asynchronously\n\n Performs a batch of memory prefetches. The batch as a whole executes in stream order\n but operations within a batch are not guaranteed to execute in any specific order.\n All devices in the system must have a non-zero value for the device attribute\n ::cudaDevAttrConcurrentManagedAccess otherwise the API will return an error.\n\n The semantics of the individual prefetch operations are as described in ::cudaMemPrefetchAsync.\n\n Performs memory prefetch on address ranges specified in \\p dptrs and \\p sizes.\n Both arrays must be of the same length as specified by \\p count. Each memory range specified\n must refer to managed memory allocated via ::cudaMallocManaged or declared via\n __managed__ variables or it may also refer to system-allocated memory when all devices\n have a non-zero value for ::cudaDevAttrPageableMemoryAccess. The prefetch location for\n every operation in the batch is specified in the \\p prefetchLocs array. Each entry in\n this array can apply to more than one operation. This can be done by specifying in the\n \\p prefetchLocIdxs array, the index of the first prefetch operation that the corresponding entry\n in the \\p prefetchLocs array applies to. Both \\p prefetchLocs and \\p prefetchLocIdxs must be of\n the same length as specified by \\p numPrefetchLocs. For example, if a batch has 10 prefetches listed\n in dptrs/sizes, the first 4 of which are to be prefetched to one location and the remaining 6 are to be prefetched\n to another, then \\p numPrefetchLocs will be 2, \\p prefetchLocIdxs will be {0, 4} and \\p prefetchLocs\n will contain the two locations. Note the first entry in \\p prefetchLocIdxs must always be 0.\n Also, each entry must be greater than the previous entry and the last entry should be less than \\p count.\n Furthermore, \\p numPrefetchLocs must be lesser than or equal to \\p count.\n\n \\param dptrs           - Array of pointers to be prefetched\n \\param sizes           - Array of sizes for memory prefetch operations.\n \\param count           - Size of \\p dptrs and \\p sizes arrays.\n \\param prefetchLocs    - Array of locations to prefetch to.\n \\param prefetchLocIdxs - Array of indices to specify which operands each entry in the \\p prefetchLocs array applies to.\n                          The locations specified in prefetchLocs[k] will be applied to copies starting from  prefetchLocIdxs[k]\n                          through  prefetchLocIdxs[k+1] - 1. Also prefetchLocs[numPrefetchLocs - 1] will apply to prefetches starting from\n                          prefetchLocIdxs[numPrefetchLocs - 1] through count - 1.\n \\param numPrefetchLocs - Size of \\p prefetchLocs and \\p prefetchLocIdxs arrays.\n \\param flags           - Flags reserved for future use. Must be zero.\n \\param hStream         - The stream to enqueue the operations in. Must not be legacy NULL stream.\n"]
    pub fn cudaMemPrefetchBatchAsync(
        dptrs: *mut *mut ::core::ffi::c_void,
        sizes: *mut usize,
        count: usize,
        prefetchLocs: *mut cudaMemLocation,
        prefetchLocIdxs: *mut usize,
        numPrefetchLocs: usize,
        flags: ::core::ffi::c_ulonglong,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Performs a batch of memory discards asynchronously\n\n Performs a batch of memory discards. The batch as a whole executes in stream order\n but operations within a batch are not guaranteed to execute in any specific order.\n All devices in the system must have a non-zero value for the device attribute\n ::cudaDevAttrConcurrentManagedAccess otherwise the API will return an error.\n\n Discarding a memory range informs the driver that the contents of that range are no longer useful.\n Discarding memory ranges allows the driver to optimize certain data migrations and can also help\n reduce memory pressure. This operation can be undone on any part of the range by either writing to it\n or prefetching it via ::cudaMemPrefetchAsync or ::cudaMemPrefetchBatchAsync. Reading from a discarded range,\n without a subsequent write or prefetch to that part of the range, will return an indeterminate value.\n Note that any reads, writes or prefetches to any part of the memory range that occur simultaneously with\n the discard operation result in undefined behavior.\n\n Performs memory discard on address ranges specified in \\p dptrs and \\p sizes.\n Both arrays must be of the same length as specified by \\p count. Each memory range\n specified must refer to managed memory allocated via ::cudaMallocManaged or declared\n via __managed__ variables or it may also refer to system-allocated memory when all devices\n have a non-zero value for ::cudaDevAttrPageableMemoryAccess.\n\n \\param dptrs   - Array of pointers to be discarded\n \\param sizes   - Array of sizes for memory discard operations.\n \\param count   - Size of \\p dptrs and \\p sizes arrays.\n \\param flags   - Flags reserved for future use. Must be zero.\n \\param hStream - The stream to enqueue the operations in. Must not be legacy NULL stream.\n"]
    pub fn cudaMemDiscardBatchAsync(
        dptrs: *mut *mut ::core::ffi::c_void,
        sizes: *mut usize,
        count: usize,
        flags: ::core::ffi::c_ulonglong,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Performs a batch of memory discards and prefetches asynchronously\n\n Performs a batch of memory discards followed by prefetches. The batch as a whole executes\n in stream order but operations within a batch are not guaranteed to execute in any specific order.\n All devices in the system must have a non-zero value for the device attribute\n ::cudaDevAttrConcurrentManagedAccess otherwise the API will return an error.\n\n Calling ::cudaMemDiscardAndPrefetchBatchAsync is semantically equivalent to calling\n ::cudaMemDiscardBatchAsync followed by ::cudaMemPrefetchBatchAsync, but is more optimal.\n For more details on what discarding and prefetching imply, please refer to ::cudaMemDiscardBatchAsync\n and ::cudaMemPrefetchBatchAsync respectively. Note that any reads, writes or prefetches to any part\n of the memory range that occur simultaneously with this combined discard+prefetch operation\n result in undefined behavior.\n\n Performs memory discard and prefetch on address ranges specified in \\p dptrs and \\p sizes.\n Both arrays must be of the same length as specified by \\p count. Each memory range specified\n must refer to managed memory allocated via ::cudaMallocManaged or declared via\n __managed__ variables or it may also refer to system-allocated memory when all devices\n have a non-zero value for ::cudaDevAttrPageableMemoryAccess. Every operation in the batch\n has to be associated with a valid location to prefetch the address range to and specified in\n the \\p prefetchLocs array. Each entry in this array can apply to more than one operation.\n This can be done by specifying in the \\p prefetchLocIdxs array, the index of the first\n operation that the corresponding entry in the \\p prefetchLocs array applies to.\n Both \\p prefetchLocs and \\p prefetchLocIdxs must be of the same length as specified by\n \\p numPrefetchLocs. For example, if a batch has 10 operations listed in dptrs/sizes,\n the first 6 of which are to be prefetched to one location and the remaining 4 are to be\n prefetched to another, then \\p numPrefetchLocs will be 2, \\p prefetchLocIdxs will be {0, 6}\n and \\p prefetchLocs will contain the two set of locations. Note the first entry in\n \\p prefetchLocIdxs must always be 0. Also, each entry must be greater than the previous\n entry and the last entry should be less than \\p count. Furthermore, \\p numPrefetchLocs\n must be lesser than or equal to \\p count.\n\n \\param dptrs           - Array of pointers to be discarded\n \\param sizes           - Array of sizes for memory discard operations.\n \\param count           - Size of \\p dptrs and \\p sizes arrays.\n \\param prefetchLocs    - Array of locations to prefetch to.\n \\param prefetchLocIdxs - Array of indices to specify which operands each entry in the \\p prefetchLocs array applies to.\n                          The locations specified in prefetchLocs[k] will be applied to operations starting from  prefetchLocIdxs[k]\n                          through prefetchLocIdxs[k+1] - 1. Also prefetchLocs[numPrefetchLocs - 1] will apply to copies starting from\n                          prefetchLocIdxs[numPrefetchLocs - 1] through count - 1.\n \\param numPrefetchLocs - Size of \\p prefetchLocs and \\p prefetchLocIdxs arrays.\n \\param flags           - Flags reserved for future use. Must be zero.\n \\param hStream         - The stream to enqueue the operations in. Must not be legacy NULL stream.\n"]
    pub fn cudaMemDiscardAndPrefetchBatchAsync(
        dptrs: *mut *mut ::core::ffi::c_void,
        sizes: *mut usize,
        count: usize,
        prefetchLocs: *mut cudaMemLocation,
        prefetchLocIdxs: *mut usize,
        numPrefetchLocs: usize,
        flags: ::core::ffi::c_ulonglong,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Advise about the usage of a given memory range\n\n Advise the Unified Memory subsystem about the usage pattern for the memory range\n starting at \\p devPtr with a size of \\p count bytes. The start address and end address of the memory\n range will be rounded down and rounded up respectively to be aligned to CPU page size before the\n advice is applied. The memory range must refer to managed memory allocated via ::cudaMallocManaged\n or declared via __managed__ variables. The memory range could also refer to system-allocated pageable\n memory provided it represents a valid, host-accessible region of memory and all additional constraints\n imposed by \\p advice as outlined below are also satisfied. Specifying an invalid system-allocated pageable\n memory range results in an error being returned.\n\n The \\p advice parameter can take the following values:\n - ::cudaMemAdviseSetReadMostly: This implies that the data is mostly going to be read\n from and only occasionally written to. Any read accesses from any processor to this region will create a\n read-only copy of at least the accessed pages in that processor's memory. Additionally, if ::cudaMemPrefetchAsync\n or ::cudaMemPrefetchAsync is called on this region, it will create a read-only copy of the data on the destination processor.\n If the target location for ::cudaMemPrefetchAsync is a host NUMA node and a read-only copy already exists on\n another host NUMA node, that copy will be migrated to the targeted host NUMA node.\n If any processor writes to this region, all copies of the corresponding page will be invalidated\n except for the one where the write occurred. If the writing processor is the CPU and the preferred location of\n the page is a host NUMA node, then the page will also be migrated to that host NUMA node. The \\p location argument is ignored for this advice.\n Note that for a page to be read-duplicated, the accessing processor must either be the CPU or a GPU\n that has a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess.\n Also, if a context is created on a device that does not have the device attribute\n ::cudaDevAttrConcurrentManagedAccess set, then read-duplication will not occur until\n all such contexts are destroyed.\n If the memory region refers to valid system-allocated pageable memory, then the accessing device must\n have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess for a read-only\n copy to be created on that device. Note however that if the accessing device also has a non-zero value for the\n device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, then setting this advice\n will not create a read-only copy when that device accesses this memory region.\n\n - ::cudaMemAdviceUnsetReadMostly:  Undoes the effect of ::cudaMemAdviseSetReadMostly and also prevents the\n Unified Memory driver from attempting heuristic read-duplication on the memory range. Any read-duplicated\n copies of the data will be collapsed into a single copy. The location for the collapsed\n copy will be the preferred location if the page has a preferred location and one of the read-duplicated\n copies was resident at that location. Otherwise, the location chosen is arbitrary.\n Note: The \\p location argument is ignored for this advice.\n\n - ::cudaMemAdviseSetPreferredLocation: This advice sets the preferred location for the\n data to be the memory belonging to \\p location. When ::cudaMemLocation::type is ::cudaMemLocationTypeHost,\n ::cudaMemLocation::id is ignored and the preferred location is set to be host memory. To set the preferred location\n to a specific host NUMA node, applications must set ::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and\n ::cudaMemLocation::id must specify the NUMA ID of the host NUMA node. If ::cudaMemLocation::type is set to ::cudaMemLocationTypeHostNumaCurrent,\n ::cudaMemLocation::id will be ignored and the host NUMA node closest to the calling thread's CPU will be used as the preferred location.\n If ::cudaMemLocation::type is a ::cudaMemLocationTypeDevice, then ::cudaMemLocation::id must be a valid device ordinal\n and the device must have a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess.\n Setting the preferred location does not cause data to migrate to that location immediately. Instead, it guides the migration policy\n when a fault occurs on that memory region. If the data is already in its preferred location and the\n faulting processor can establish a mapping without requiring the data to be migrated, then\n data migration will be avoided. On the other hand, if the data is not in its preferred location\n or if a direct mapping cannot be established, then it will be migrated to the processor accessing\n it. It is important to note that setting the preferred location does not prevent data prefetching\n done using ::cudaMemPrefetchAsync.\n Having a preferred location can override the page thrash detection and resolution logic in the Unified\n Memory driver. Normally, if a page is detected to be constantly thrashing between for example host and device\n memory, the page may eventually be pinned to host memory by the Unified Memory driver. But\n if the preferred location is set as device memory, then the page will continue to thrash indefinitely.\n If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the\n policies associated with that advice will override the policies of this advice, unless read accesses from\n \\p location will not result in a read-only copy being created on that procesor as outlined in description for\n the advice ::cudaMemAdviseSetReadMostly.\n If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice\n then ::cudaMemLocation::id must be a valid device that has a non-zero alue for the device attribute ::cudaDevAttrPageableMemoryAccess.\n\n - ::cudaMemAdviseUnsetPreferredLocation: Undoes the effect of ::cudaMemAdviseSetPreferredLocation\n and changes the preferred location to none. The \\p location argument is ignored for this advice.\n\n - ::cudaMemAdviseSetAccessedBy: This advice implies that the data will be accessed by processor \\p location.\n The ::cudaMemLocation::type must be either ::cudaMemLocationTypeDevice with ::cudaMemLocation::id representing a valid device\n ordinal or ::cudaMemLocationTypeHost and ::cudaMemLocation::id will be ignored. All other location types are invalid.\n If ::cudaMemLocation::id is a GPU, then the device attribute ::cudaDevAttrConcurrentManagedAccess must be non-zero.\n This advice does not cause data migration and has no impact on the location of the data per se. Instead,\n it causes the data to always be mapped in the specified processor's page tables, as long as the\n location of the data permits a mapping to be established. If the data gets migrated for any reason,\n the mappings are updated accordingly.\n This advice is recommended in scenarios where data locality is not important, but avoiding faults is.\n Consider for example a system containing multiple GPUs with peer-to-peer access enabled, where the\n data located on one GPU is occasionally accessed by peer GPUs. In such scenarios, migrating data\n over to the other GPUs is not as important because the accesses are infrequent and the overhead of\n migration may be too high. But preventing faults can still help improve performance, and so having\n a mapping set up in advance is useful. Note that on CPU access of this data, the data may be migrated\n to host memory because the CPU typically cannot access device memory directly. Any GPU that had the\n ::cudaMemAdviseSetAccessedBy flag set for this data will now have its mapping updated to point to the\n page in host memory.\n If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the\n policies associated with that advice will override the policies of this advice. Additionally, if the\n preferred location of this memory region or any subset of it is also \\p location, then the policies\n associated with ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the policies of this advice.\n If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice\n then device in ::cudaMemLocation::id must have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess.\n Additionally, if ::cudaMemLocation::id has a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,\n then this call has no effect.\n\n - ::CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of ::cudaMemAdviseSetAccessedBy. Any mappings to\n the data from \\p location may be removed at any time causing accesses to result in non-fatal page faults.\n If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice\n then device in ::cudaMemLocation::id must have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess.\n Additionally, if ::cudaMemLocation::id has a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,\n then this call has no effect.\n\n \\param devPtr   - Pointer to memory to set the advice for\n \\param count    - Size in bytes of the memory range\n \\param advice   - Advice to be applied for the specified memory range\n \\param location - location to apply the advice for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync, ::cudaMemPrefetchAsync,\n ::cuMemAdvise"]
    pub fn cudaMemAdvise(
        devPtr: *const ::core::ffi::c_void,
        count: usize,
        advice: cudaMemoryAdvise,
        location: cudaMemLocation,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query an attribute of a given memory range\n\n Query an attribute about the memory range starting at \\p devPtr with a size of \\p count bytes. The\n memory range must refer to managed memory allocated via ::cudaMallocManaged or declared via\n __managed__ variables.\n\n The \\p attribute parameter can take the following values:\n - ::cudaMemRangeAttributeReadMostly: If this attribute is specified, \\p data will be interpreted\n as a 32-bit integer, and \\p dataSize must be 4. The result returned will be 1 if all pages in the given\n memory range have read-duplication enabled, or 0 otherwise.\n - ::cudaMemRangeAttributePreferredLocation: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. The result returned will be a GPU device\n id if all pages in the memory range have that GPU as their preferred location, or it will be cudaCpuDeviceId\n if all pages in the memory range have the CPU as their preferred location, or it will be cudaInvalidDeviceId\n if either all the pages don't have the same preferred location or some of the pages don't have a\n preferred location at all. Note that the actual location of the pages in the memory range at the time of\n the query may be different from the preferred location.\n - ::cudaMemRangeAttributeAccessedBy: If this attribute is specified, \\p data will be interpreted\n as an array of 32-bit integers, and \\p dataSize must be a non-zero multiple of 4. The result returned\n will be a list of device ids that had ::cudaMemAdviceSetAccessedBy set for that entire memory range.\n If any device does not have that advice set for the entire memory range, that device will not be included.\n If \\p data is larger than the number of devices that have that advice set for that memory range,\n cudaInvalidDeviceId will be returned in all the extra space provided. For ex., if \\p dataSize is 12\n (i.e. \\p data has 3 elements) and only device 0 has the advice set, then the result returned will be\n { 0, cudaInvalidDeviceId, cudaInvalidDeviceId }. If \\p data is smaller than the number of devices that have\n that advice set, then only as many devices will be returned as can fit in the array. There is no\n guarantee on which specific devices will be returned, however.\n - ::cudaMemRangeAttributeLastPrefetchLocation: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. The result returned will be the last location\n to which all pages in the memory range were prefetched explicitly via ::cudaMemPrefetchAsync. This will either be\n a GPU id or cudaCpuDeviceId depending on whether the last location for prefetch was a GPU or the CPU\n respectively. If any page in the memory range was never explicitly prefetched or if all pages were not\n prefetched to the same location, cudaInvalidDeviceId will be returned. Note that this simply returns the\n last location that the applicaton requested to prefetch the memory range to. It gives no indication as to\n whether the prefetch operation to that location has completed or even begun.\n - ::cudaMemRangeAttributePreferredLocationType: If this attribute is specified, \\p data will be\n interpreted as a ::cudaMemLocationType, and \\p dataSize must be sizeof(cudaMemLocationType). The ::cudaMemLocationType returned will be\n ::cudaMemLocationTypeDevice if all pages in the memory range have the same GPU as their preferred location, or ::cudaMemLocationType\n will be ::cudaMemLocationTypeHost if all pages in the memory range have the CPU as their preferred location, or or it will be ::cudaMemLocationTypeHostNuma\n if all the pages in the memory range have the same host NUMA node ID as their preferred location or it will be ::cudaMemLocationTypeInvalid\n if either all the pages don't have the same preferred location or some of the pages don't have a preferred location at all.\n Note that the actual location type of the pages in the memory range at the time of the query may be different from the preferred location type.\n  - ::cudaMemRangeAttributePreferredLocationId: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. If the ::cudaMemRangeAttributePreferredLocationType query for the same address range\n returns ::cudaMemLocationTypeDevice, it will be a valid device ordinal or if it returns ::cudaMemLocationTypeHostNuma, it will be a valid host NUMA node ID\n or if it returns any other location type, the id should be ignored.\n - ::cudaMemRangeAttributeLastPrefetchLocationType: If this attribute is specified, \\p data will be\n interpreted as a ::cudaMemLocationType, and \\p dataSize must be sizeof(cudaMemLocationType). The result returned will be the last location type\n to which all pages in the memory range were prefetched explicitly via ::cuMemPrefetchAsync. The ::cudaMemLocationType returned\n will be ::cudaMemLocationTypeDevice if the last prefetch location was the GPU or ::cudaMemLocationTypeHost if it was the CPU or ::cudaMemLocationTypeHostNuma if\n the last prefetch location was a specific host NUMA node. If any page in the memory range was never explicitly prefetched or if all pages were not\n prefetched to the same location, ::CUmemLocationType will be ::cudaMemLocationTypeInvalid.\n Note that this simply returns the last location type that the application requested to prefetch the memory range to. It gives no indication as to\n whether the prefetch operation to that location has completed or even begun.\n  - ::cudaMemRangeAttributeLastPrefetchLocationId: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. If the ::cudaMemRangeAttributeLastPrefetchLocationType query for the same address range\n returns ::cudaMemLocationTypeDevice, it will be a valid device ordinal or if it returns ::cudaMemLocationTypeHostNuma, it will be a valid host NUMA node ID\n or if it returns any other location type, the id should be ignored.\n\n \\param data      - A pointers to a memory location where the result\n                    of each attribute query will be written to.\n \\param dataSize  - Array containing the size of data\n \\param attribute - The attribute to query\n \\param devPtr    - Start of the range to query\n \\param count     - Size of the range to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemRangeGetAttributes, ::cudaMemPrefetchAsync,\n ::cudaMemAdvise,\n ::cuMemRangeGetAttribute"]
    pub fn cudaMemRangeGetAttribute(
        data: *mut ::core::ffi::c_void,
        dataSize: usize,
        attribute: cudaMemRangeAttribute,
        devPtr: *const ::core::ffi::c_void,
        count: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query attributes of a given memory range.\n\n Query attributes of the memory range starting at \\p devPtr with a size of \\p count bytes. The\n memory range must refer to managed memory allocated via ::cudaMallocManaged or declared via\n __managed__ variables. The \\p attributes array will be interpreted to have \\p numAttributes\n entries. The \\p dataSizes array will also be interpreted to have \\p numAttributes entries.\n The results of the query will be stored in \\p data.\n\n The list of supported attributes are given below. Please refer to ::cudaMemRangeGetAttribute for\n attribute descriptions and restrictions.\n\n - ::cudaMemRangeAttributeReadMostly\n - ::cudaMemRangeAttributePreferredLocation\n - ::cudaMemRangeAttributeAccessedBy\n - ::cudaMemRangeAttributeLastPrefetchLocation\n - :: cudaMemRangeAttributePreferredLocationType\n - :: cudaMemRangeAttributePreferredLocationId\n - :: cudaMemRangeAttributeLastPrefetchLocationType\n - :: cudaMemRangeAttributeLastPrefetchLocationId\n\n \\param data          - A two-dimensional array containing pointers to memory\n                        locations where the result of each attribute query will be written to.\n \\param dataSizes     - Array containing the sizes of each result\n \\param attributes    - An array of attributes to query\n                        (numAttributes and the number of attributes in this array should match)\n \\param numAttributes - Number of attributes to query\n \\param devPtr        - Start of the range to query\n \\param count         - Size of the range to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemRangeGetAttribute, ::cudaMemAdvise,\n ::cudaMemPrefetchAsync,\n ::cuMemRangeGetAttributes"]
    pub fn cudaMemRangeGetAttributes(
        data: *mut *mut ::core::ffi::c_void,
        dataSizes: *mut usize,
        attributes: *mut cudaMemRangeAttribute,
        numAttributes: usize,
        devPtr: *const ::core::ffi::c_void,
        count: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n CUDA array \\p dst starting at \\p hOffset rows and \\p wOffset bytes from\n the upper left corner, where \\p kind specifies the direction\n of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n \\param dst     - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src     - Source memory address\n \\param count   - Size in bytes to copy\n \\param kind    - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyHtoA,\n ::cuMemcpyDtoA"]
    pub fn cudaMemcpyToArray(
        dst: cudaArray_t,
        wOffset: usize,
        hOffset: usize,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffset rows\n and \\p wOffset bytes from the upper left corner to the memory area pointed to\n by \\p dst, where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n \\param dst     - Destination memory address\n \\param src     - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param count   - Size in bytes to copy\n \\param kind    - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAtoH,\n ::cuMemcpyAtoD"]
    pub fn cudaMemcpyFromArray(
        dst: *mut ::core::ffi::c_void,
        src: cudaArray_const_t,
        wOffset: usize,
        hOffset: usize,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffsetSrc\n rows and \\p wOffsetSrc bytes from the upper left corner to the CUDA array\n \\p dst starting at \\p hOffsetDst rows and \\p wOffsetDst bytes from the upper\n left corner, where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n \\param dst        - Destination memory address\n \\param wOffsetDst - Destination starting X offset (columns in bytes)\n \\param hOffsetDst - Destination starting Y offset (rows)\n \\param src        - Source memory address\n \\param wOffsetSrc - Source starting X offset (columns in bytes)\n \\param hOffsetSrc - Source starting Y offset (rows)\n \\param count      - Size in bytes to copy\n \\param kind       - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAtoA"]
    pub fn cudaMemcpyArrayToArray(
        dst: cudaArray_t,
        wOffsetDst: usize,
        hOffsetDst: usize,
        src: cudaArray_const_t,
        wOffsetSrc: usize,
        hOffsetSrc: usize,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n CUDA array \\p dst starting at \\p hOffset rows and \\p wOffset bytes from\n the upper left corner, where \\p kind specifies the\n direction of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyToArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If \\p\n kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream\n is non-zero, the copy may overlap with operations in other streams.\n\n \\param dst     - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src     - Source memory address\n \\param count   - Size in bytes to copy\n \\param kind    - Type of transfer\n \\param stream  - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyHtoAAsync,\n ::cuMemcpy2DAsync"]
    pub fn cudaMemcpyToArrayAsync(
        dst: cudaArray_t,
        wOffset: usize,
        hOffset: usize,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffset rows\n and \\p wOffset bytes from the upper left corner to the memory area pointed to\n by \\p dst, where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyFromArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If \\p\n kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream\n is non-zero, the copy may overlap with operations in other streams.\n\n \\param dst     - Destination memory address\n \\param src     - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param count   - Size in bytes to copy\n \\param kind    - Type of transfer\n \\param stream  - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAtoHAsync,\n ::cuMemcpy2DAsync"]
    pub fn cudaMemcpyFromArrayAsync(
        dst: *mut ::core::ffi::c_void,
        src: cudaArray_const_t,
        wOffset: usize,
        hOffset: usize,
        count: usize,
        kind: cudaMemcpyKind,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocates memory with stream ordered semantics\n\n Inserts an allocation operation into \\p hStream.\n A pointer to the allocated memory is returned immediately in *dptr.\n The allocation must not be accessed until the the allocation operation completes.\n The allocation comes from the memory pool associated with the stream's device.\n\n \\note The default memory pool of a device contains device memory from that device.\n \\note Basic stream ordering allows future work submitted into the same stream to use the allocation.\n       Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation\n       operation completes before work submitted in a separate stream runs.\n \\note During stream capture, this function results in the creation of an allocation node.  In this case,\n       the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n       are used to set the node's creation parameters.\n\n \\param[out] devPtr  - Returned device pointer\n \\param[in] size     - Number of bytes to allocate\n \\param[in] hStream  - The stream establishing the stream ordering contract and the memory pool to allocate from\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported,\n ::cudaErrorOutOfMemory,\n \\notefnerr\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuMemAllocAsync,\n \\ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream)  \"cudaMallocAsync (C++ API)\",\n ::cudaMallocFromPoolAsync, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute, ::cudaMemPoolGetAttribute"]
    pub fn cudaMallocAsync(
        devPtr: *mut *mut ::core::ffi::c_void,
        size: usize,
        hStream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Frees memory with stream ordered semantics\n\n Inserts a free operation into \\p hStream.\n The allocation must not be accessed after stream execution reaches the free.\n After this API returns, accessing the memory from any subsequent work launched on the GPU\n or querying its pointer attributes results in undefined behavior.\n\n \\note During stream capture, this function results in the creation of a free node and\n       must therefore be passed the address of a graph allocation.\n\n \\param dptr - memory to free\n \\param hStream - The stream establishing the stream ordering promise\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuMemFreeAsync, ::cudaMallocAsync"]
    pub fn cudaFreeAsync(devPtr: *mut ::core::ffi::c_void, hStream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Tries to release memory back to the OS\n\n Releases memory back to the OS until the pool contains fewer than minBytesToKeep\n reserved bytes, or there is no more memory that the allocator can safely release.\n The allocator cannot release OS allocations that back outstanding asynchronous allocations.\n The OS allocations may happen at different granularity from the user allocations.\n\n \\note: Allocations that have not been freed count as outstanding.\n \\note: Allocations that have been asynchronously freed but whose completion has\n        not been observed on the host (eg. by a synchronize) can count as outstanding.\n\n \\param[in] pool           - The memory pool to trim\n \\param[in] minBytesToKeep - If the pool has less than minBytesToKeep reserved,\n the TrimTo operation is a no-op.  Otherwise the pool will be guaranteed to have\n at least minBytesToKeep bytes reserved after the operation.\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_callback\n\n \\sa ::cuMemPoolTrimTo, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"]
    pub fn cudaMemPoolTrimTo(memPool: cudaMemPool_t, minBytesToKeep: usize) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets attributes of a memory pool\n\n Supported attributes are:\n - ::cudaMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n                    Amount of reserved memory in bytes to hold onto before trying\n                    to release memory back to the OS. When more than the release\n                    threshold bytes of memory are held by the memory pool, the\n                    allocator will try to release memory back to the OS on the\n                    next call to stream, event or context synchronize. (default 0)\n - ::cudaMemPoolReuseFollowEventDependencies: (value type = int)\n                    Allow ::cudaMallocAsync to use memory asynchronously freed\n                    in another stream as long as a stream ordering dependency\n                    of the allocating stream on the free action exists.\n                    Cuda events and null stream interactions can create the required\n                    stream ordered dependencies. (default enabled)\n - ::cudaMemPoolReuseAllowOpportunistic: (value type = int)\n                    Allow reuse of already completed frees when there is no dependency\n                    between the free and allocation. (default enabled)\n - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int)\n                    Allow ::cudaMallocAsync to insert new stream dependencies\n                    in order to establish the stream ordering required to reuse\n                    a piece of memory released by ::cudaFreeAsync (default enabled).\n - ::cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t)\n                    Reset the high watermark that tracks the amount of backing memory that was\n                    allocated for the memory pool. It is illegal to set this attribute to a non-zero value.\n - ::cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t)\n                    Reset the high watermark that tracks the amount of used memory that was\n                    allocated for the memory pool. It is illegal to set this attribute to a non-zero value.\n\n \\param[in] pool  - The memory pool to modify\n \\param[in] attr  - The attribute to modify\n \\param[in] value - Pointer to the value to assign\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_callback\n\n \\sa ::cuMemPoolSetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate\n"]
    pub fn cudaMemPoolSetAttribute(
        memPool: cudaMemPool_t,
        attr: cudaMemPoolAttr,
        value: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets attributes of a memory pool\n\n Supported attributes are:\n - ::cudaMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n                    Amount of reserved memory in bytes to hold onto before trying\n                    to release memory back to the OS. When more than the release\n                    threshold bytes of memory are held by the memory pool, the\n                    allocator will try to release memory back to the OS on the\n                    next call to stream, event or context synchronize. (default 0)\n - ::cudaMemPoolReuseFollowEventDependencies: (value type = int)\n                    Allow ::cudaMallocAsync to use memory asynchronously freed\n                    in another stream as long as a stream ordering dependency\n                    of the allocating stream on the free action exists.\n                    Cuda events and null stream interactions can create the required\n                    stream ordered dependencies. (default enabled)\n - ::cudaMemPoolReuseAllowOpportunistic: (value type = int)\n                    Allow reuse of already completed frees when there is no dependency\n                    between the free and allocation. (default enabled)\n - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int)\n                    Allow ::cudaMallocAsync to insert new stream dependencies\n                    in order to establish the stream ordering required to reuse\n                    a piece of memory released by ::cudaFreeAsync (default enabled).\n - ::cudaMemPoolAttrReservedMemCurrent: (value type = cuuint64_t)\n                    Amount of backing memory currently allocated for the mempool.\n - ::cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t)\n                    High watermark of backing memory allocated for the mempool since\n                    the last time it was reset.\n - ::cudaMemPoolAttrUsedMemCurrent: (value type = cuuint64_t)\n                    Amount of memory from the pool that is currently in use by the application.\n - ::cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t)\n                    High watermark of the amount of memory from the pool that was in use by the\n                    application since the last time it was reset.\n\n \\param[in] pool  - The memory pool to get attributes of\n \\param[in] attr  - The attribute to get\n \\param[in] value - Retrieved value\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_callback\n\n \\sa ::cuMemPoolGetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate\n"]
    pub fn cudaMemPoolGetAttribute(
        memPool: cudaMemPool_t,
        attr: cudaMemPoolAttr,
        value: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Controls visibility of pools between devices\n\n \\param[in] pool  - The pool being modified\n \\param[in] map   - Array of access descriptors. Each descriptor instructs the access to enable for a single gpu\n \\param[in] count - Number of descriptors in the map array.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa ::cuMemPoolSetAccess, ::cudaMemPoolGetAccess, ::cudaMallocAsync, cudaFreeAsync"]
    pub fn cudaMemPoolSetAccess(
        memPool: cudaMemPool_t,
        descList: *const cudaMemAccessDesc,
        count: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the accessibility of a pool from a device\n\n Returns the accessibility of the pool's memory from the specified location.\n\n \\param[out] flags   - the accessibility of the pool from the specified location\n \\param[in] memPool  - the pool being queried\n \\param[in] location - the location accessing the pool\n\n \\sa ::cuMemPoolGetAccess, ::cudaMemPoolSetAccess"]
    pub fn cudaMemPoolGetAccess(
        flags: *mut cudaMemAccessFlags,
        memPool: cudaMemPool_t,
        location: *mut cudaMemLocation,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a memory pool\n\n Creates a CUDA memory pool and returns the handle in \\p pool.  The \\p poolProps determines\n the properties of the pool such as the backing device and IPC capabilities.\n\n To create a memory pool for host memory not targeting a specific NUMA node, applications must set\n set ::cudaMemPoolProps::cudaMemLocation::type to ::cudaMemLocationTypeHost.\n ::cudaMemPoolProps::cudaMemLocation::id is ignored for such pools.\n Pools created with the type ::cudaMemLocationTypeHost are not IPC capable and\n ::cudaMemPoolProps::handleTypes must be 0, any other values will result in\n ::cudaErrorInvalidValue.\n To create a memory pool targeting a specific host NUMA node, applications must\n set ::cudaMemPoolProps::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and\n ::cudaMemPoolProps::cudaMemLocation::id must specify the NUMA ID of the host memory node.\n Specifying ::cudaMemLocationTypeHostNumaCurrent as the\n ::cudaMemPoolProps::cudaMemLocation::type will result in ::cudaErrorInvalidValue.\n By default, the pool's memory will be accessible from the device it is allocated on.\n In the case of pools created with ::cudaMemLocationTypeHostNuma or\n ::cudaMemLocationTypeHost, their default accessibility will be from the host\n CPU.\n Applications can control the maximum size of the pool by specifying a non-zero value for ::cudaMemPoolProps::maxSize.\n If set to 0, the maximum size of the pool will default to a system dependent value.\n\n Applications that intend to use ::CU_MEM_HANDLE_TYPE_FABRIC based memory sharing must ensure:\n (1) `nvidia-caps-imex-channels` character device is created by the driver and is listed under /proc/devices\n (2) have at least one IMEX channel file accessible by the user launching the application.\n\n When exporter and importer CUDA processes have been granted access to the same IMEX channel, they can securely\n share memory.\n\n The IMEX channel security model works on a per user basis. Which means all processes under a user can share\n memory if the user has access to a valid IMEX channel. When multi-user isolation is desired, a separate IMEX\n channel is required for each user.\n\n These channel files exist in /dev/nvidia-caps-imex-channels/channel* and can be created using standard OS\n native calls like mknod on Linux. For example: To create channel0 with the major number from /proc/devices\n users can execute the following command: `mknod /dev/nvidia-caps-imex-channels/channel0 c <major number> 0`\n\n \\note Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n\n \\sa ::cuMemPoolCreate, ::cudaDeviceSetMemPool, ::cudaMallocFromPoolAsync, ::cudaMemPoolExportToShareableHandle, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool\n"]
    pub fn cudaMemPoolCreate(
        memPool: *mut cudaMemPool_t,
        poolProps: *const cudaMemPoolProps,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys the specified memory pool\n\n If any pointers obtained from this pool haven't been freed or\n the pool has free operations that haven't completed\n when ::cudaMemPoolDestroy is invoked, the function will return immediately and the\n resources associated with the pool will be released automatically\n once there are no more outstanding allocations.\n\n Destroying the current mempool of a device sets the default mempool of\n that device as the current mempool for that device.\n\n \\note A device's default memory pool cannot be destroyed.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa cuMemPoolDestroy, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"]
    pub fn cudaMemPoolDestroy(memPool: cudaMemPool_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the default memory pool for a given location and allocation type\n\n The memory location can be of one of ::cudaMemLocationTypeDevice, ::cudaMemLocationTypeHost or\n ::cudaMemLocationTypeHostNuma. The allocation type can be one of ::cudaMemAllocationTypePinned or\n ::cudaMemAllocationTypeManaged. When the allocation type is ::cudaMemAllocationTypeManaged,\n the location type can also be ::cudaMemLocationTypeNone to indicate no preferred location\n for the managed memory pool. In all other cases, the call return ::cudaErrorInvalidValue\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported,\n \\notefnerr\n\n \\sa ::cuMemAllocAsync, ::cuMemPoolTrimTo, ::cuMemPoolGetAttribute, ::cuMemPoolSetAttribute, cuMemPoolSetAccess, ::cuMemGetMemPool, ::cuMemPoolCreate"]
    pub fn cudaMemGetDefaultMemPool(
        memPool: *mut cudaMemPool_t,
        location: *mut cudaMemLocation,
        type_: cudaMemAllocationType,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets the current memory pool for a given memory location and allocation type\n\n The memory location can be of one of ::cudaMemLocationTypeDevice, ::cudaMemLocationTypeHost or\n ::cudaMemLocationTypeHostNuma. The allocation type can be one of ::cudaMemAllocationTypePinned or\n ::cudaMemAllocationTypeManaged. When the allocation type is ::cudaMemAllocationTypeManaged,\n the location type can also be ::cudaMemLocationTypeNone to indicate no preferred location\n for the managed memory pool. In all other cases, the call return ::cudaErrorInvalidValue\n\n Returns the last pool provided to ::cudaMemSetMemPool or ::cudaDeviceSetMemPool for this location and allocation type\n or the location's default memory pool if ::cudaMemSetMemPool or ::cudaDeviceSetMemPool for that allocType and location\n has never been called.\n By default the current mempool of a location is the default mempool for a device that can be obtained via cudaMemGetDefaultMemPool\n Otherwise the returned pool must have been set with ::cudaDeviceSetMemPool.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa ::cuDeviceGetDefaultMemPool, ::cuMemPoolCreate, ::cuDeviceSetMemPool, ::cuMemSetMemPool"]
    pub fn cudaMemGetMemPool(
        memPool: *mut cudaMemPool_t,
        location: *mut cudaMemLocation,
        type_: cudaMemAllocationType,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the current memory pool for a memory location and allocation type\n\n The memory location can be of one of ::cudaMemLocationTypeDevice, ::cudaMemLocationTypeHost or\n ::cudaMemLocationTypeHostNuma. The allocation type can be one of ::cudaMemAllocationTypePinned or\n ::cudaMemAllocationTypeManaged. When the allocation type is ::cudaMemAllocationTypeManaged,\n the location type can also be ::cudaMemLocationTypeNone to indicate no preferred location\n for the managed memory pool. In all other cases, the call return ::cudaErrorInvalidValue\n\n When a memory pool is set as the current memory pool, the location parameter should be the same as the location of the pool.\n If the location type or index don't match, the call returns ::cudaErrorInvalidValue.\n The type of memory pool should also match the parameter allocType. Else the call returns ::cudaErrorInvalidValue.\n By default, a memory location's current memory pool is its default memory pool.\n If the location type is ::cudaMemLocationTypeDevice and the allocation type is ::cudaMemAllocationTypePinned, then\n this API is the equivalent of calling ::cudaDeviceSetMemPool with the location id as the device.\n For further details on the implications, please refer to the documentation for ::cudaDeviceSetMemPool.\n\n \\note Use ::cudaMallocFromPoolAsync to specify asynchronous allocations from a device different\n than the one the stream runs on.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa ::cuDeviceGetDefaultMemPool, ::cuDeviceGetMemPool, ::cuMemGetMemPool, ::cuMemPoolCreate, ::cuMemPoolDestroy, ::cuMemAllocFromPoolAsync"]
    pub fn cudaMemSetMemPool(
        location: *mut cudaMemLocation,
        type_: cudaMemAllocationType,
        memPool: cudaMemPool_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Allocates memory from a specified pool with stream ordered semantics.\n\n Inserts an allocation operation into \\p hStream.\n A pointer to the allocated memory is returned immediately in *dptr.\n The allocation must not be accessed until the the allocation operation completes.\n The allocation comes from the specified memory pool.\n\n \\note\n    -  The specified memory pool may be from a device different than that of the specified \\p hStream.\n\n    -  Basic stream ordering allows future work submitted into the same stream to use the allocation.\n       Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation\n       operation completes before work submitted in a separate stream runs.\n\n \\note During stream capture, this function results in the creation of an allocation node.  In this case,\n       the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n       are used to set the node's creation parameters.\n\n \\param[out] ptr     - Returned device pointer\n \\param[in] bytesize - Number of bytes to allocate\n \\param[in] memPool  - The pool to allocate from\n \\param[in] stream   - The stream establishing the stream ordering semantic\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemAllocFromPoolAsync,\n \\ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream)  \"cudaMallocAsync (C++ API)\",\n ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute"]
    pub fn cudaMallocFromPoolAsync(
        ptr: *mut *mut ::core::ffi::c_void,
        size: usize,
        memPool: cudaMemPool_t,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Exports a memory pool to the requested handle type.\n\n Given an IPC capable mempool, create an OS handle to share the pool with another process.\n A recipient process can convert the shareable handle into a mempool with ::cudaMemPoolImportFromShareableHandle.\n Individual pointers can then be shared with the ::cudaMemPoolExportPointer and ::cudaMemPoolImportPointer APIs.\n The implementation of what the shareable handle is and how it can be transferred is defined by the requested\n handle type.\n\n \\note: To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than cudaMemHandleTypeNone.\n\n \\param[out] handle_out  - pointer to the location in which to store the requested handle\n \\param[in] pool         - pool to export\n \\param[in] handleType   - the type of handle to create\n \\param[in] flags        - must be 0\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer"]
    pub fn cudaMemPoolExportToShareableHandle(
        shareableHandle: *mut ::core::ffi::c_void,
        memPool: cudaMemPool_t,
        handleType: cudaMemAllocationHandleType,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief imports a memory pool from a shared handle.\n\n Specific allocations can be imported from the imported pool with ::cudaMemPoolImportPointer.\n\n \\note Imported memory pools do not support creating new allocations.\n       As such imported memory pools may not be used in ::cudaDeviceSetMemPool\n       or ::cudaMallocFromPoolAsync calls.\n\n \\param[out] pool_out    - Returned memory pool\n \\param[in] handle       - OS handle of the pool to open\n \\param[in] handleType   - The type of handle being imported\n \\param[in] flags        - must be 0\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemPoolImportFromShareableHandle, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer"]
    pub fn cudaMemPoolImportFromShareableHandle(
        memPool: *mut cudaMemPool_t,
        shareableHandle: *mut ::core::ffi::c_void,
        handleType: cudaMemAllocationHandleType,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Export data to share a memory pool allocation between processes.\n\n Constructs \\p shareData_out for sharing a specific allocation from an already shared memory pool.\n The recipient process can import the allocation with the ::cudaMemPoolImportPointer api.\n The data is not a handle and may be shared through any IPC mechanism.\n\n \\param[out] shareData_out - Returned export data\n \\param[in] ptr            - pointer to memory being exported\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemPoolExportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolImportPointer"]
    pub fn cudaMemPoolExportPointer(
        exportData: *mut cudaMemPoolPtrExportData,
        ptr: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Import a memory pool allocation from another process.\n\n Returns in \\p ptr_out a pointer to the imported memory.\n The imported memory must not be accessed before the allocation operation completes\n in the exporting process. The imported memory must be freed from all importing processes before\n being freed in the exporting process. The pointer may be freed with cudaFree\n or cudaFreeAsync.  If ::cudaFreeAsync is used, the free must be completed\n on the importing process before the free operation on the exporting process.\n\n \\note The ::cudaFreeAsync api may be used in the exporting process before\n       the ::cudaFreeAsync operation completes in its stream as long as the\n       ::cudaFreeAsync in the exporting process specifies a stream with\n       a stream dependency on the importing process's ::cudaFreeAsync.\n\n \\param[out] ptr_out  - pointer to imported memory\n \\param[in] pool      - pool from which to import\n \\param[in] shareData - data specifying the memory to import\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemPoolImportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer"]
    pub fn cudaMemPoolImportPointer(
        ptr: *mut *mut ::core::ffi::c_void,
        memPool: cudaMemPool_t,
        exportData: *mut cudaMemPoolPtrExportData,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns attributes about a specified pointer\n\n Returns in \\p *attributes the attributes of the pointer \\p ptr.\n If pointer was not allocated in, mapped by or registered with context\n supporting unified addressing ::cudaErrorInvalidValue is returned.\n\n \\note In CUDA 11.0 forward passing host pointer will return ::cudaMemoryTypeUnregistered\n in ::cudaPointerAttributes::type and call will return ::cudaSuccess.\n\n The ::cudaPointerAttributes structure is defined as:\n \\code\nstruct cudaPointerAttributes {\nenum cudaMemoryType type;\nint device;\nvoid *devicePointer;\nvoid *hostPointer;\n}\n\\endcode\n In this structure, the individual fields mean\n\n - \\ref ::cudaPointerAttributes::type identifies type of memory. It can be\n    ::cudaMemoryTypeUnregistered for unregistered host memory,\n    ::cudaMemoryTypeHost for registered host memory, ::cudaMemoryTypeDevice for device\n    memory or  ::cudaMemoryTypeManaged for managed memory.\n\n - \\ref ::cudaPointerAttributes::device \"device\" is the device against which\n   \\p ptr was allocated.  If \\p ptr has memory type ::cudaMemoryTypeDevice\n   then this identifies the device on which the memory referred to by \\p ptr\n   physically resides.  If \\p ptr has memory type ::cudaMemoryTypeHost then this\n   identifies the device which was current when the allocation was made\n   (and if that device is deinitialized then this allocation will vanish\n   with that device's state).\n\n - \\ref ::cudaPointerAttributes::devicePointer \"devicePointer\" is\n   the device pointer alias through which the memory referred to by \\p ptr\n   may be accessed on the current device.\n   If the memory referred to by \\p ptr cannot be accessed directly by the\n   current device then this is NULL.\n\n - \\ref ::cudaPointerAttributes::hostPointer \"hostPointer\" is\n   the host pointer alias through which the memory referred to by \\p ptr\n   may be accessed on the host.\n   If the memory referred to by \\p ptr cannot be accessed directly by the\n   host then this is NULL.\n\n \\param attributes - Attributes for the specified pointer\n \\param ptr        - Pointer to get attributes for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice,\n ::cudaChooseDevice,\n ::cudaInitDevice,\n ::cuPointerGetAttributes"]
    pub fn cudaPointerGetAttributes(
        attributes: *mut cudaPointerAttributes,
        ptr: *const ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries if a device may directly access a peer device's memory.\n\n Returns in \\p *canAccessPeer a value of 1 if device \\p device is capable of\n directly accessing memory from \\p peerDevice and 0 otherwise.  If direct\n access of \\p peerDevice from \\p device is possible, then access may be\n enabled by calling ::cudaDeviceEnablePeerAccess().\n\n \\param canAccessPeer - Returned access capability\n \\param device        - Device from which allocations on \\p peerDevice are to\n                        be directly accessed.\n \\param peerDevice    - Device on which the allocations to be directly accessed\n                        by \\p device reside.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceEnablePeerAccess,\n ::cudaDeviceDisablePeerAccess,\n ::cuDeviceCanAccessPeer"]
    pub fn cudaDeviceCanAccessPeer(
        canAccessPeer: *mut ::core::ffi::c_int,
        device: ::core::ffi::c_int,
        peerDevice: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Enables direct access to memory allocations on a peer device.\n\n On success, all allocations from \\p peerDevice will immediately be accessible by\n the current device.  They will remain accessible until access is explicitly\n disabled using ::cudaDeviceDisablePeerAccess() or either device is reset using\n ::cudaDeviceReset().\n\n Note that access granted by this call is unidirectional and that in order to access\n memory on the current device from \\p peerDevice, a separate symmetric call\n to ::cudaDeviceEnablePeerAccess() is required.\n\n Note that there are both device-wide and system-wide limitations per system\n configuration, as noted in the CUDA Programming Guide under the section\n \"Peer-to-Peer Memory Access\".\n\n Returns ::cudaErrorInvalidDevice if ::cudaDeviceCanAccessPeer() indicates\n that the current device cannot directly access memory from \\p peerDevice.\n\n Returns ::cudaErrorPeerAccessAlreadyEnabled if direct access of\n \\p peerDevice from the current device has already been enabled.\n\n Returns ::cudaErrorInvalidValue if \\p flags is not 0.\n\n \\param peerDevice  - Peer device to enable direct access to from the current device\n \\param flags       - Reserved for future use and must be set to 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorPeerAccessAlreadyEnabled,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceCanAccessPeer,\n ::cudaDeviceDisablePeerAccess,\n ::cuCtxEnablePeerAccess"]
    pub fn cudaDeviceEnablePeerAccess(
        peerDevice: ::core::ffi::c_int,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Disables direct access to memory allocations on a peer device.\n\n Returns ::cudaErrorPeerAccessNotEnabled if direct access to memory on\n \\p peerDevice has not yet been enabled from the current device.\n\n \\param peerDevice - Peer device to disable direct access to\n\n \\return\n ::cudaSuccess,\n ::cudaErrorPeerAccessNotEnabled,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceCanAccessPeer,\n ::cudaDeviceEnablePeerAccess,\n ::cuCtxDisablePeerAccess"]
    pub fn cudaDeviceDisablePeerAccess(peerDevice: ::core::ffi::c_int) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Unregisters a graphics resource for access by CUDA\n\n Unregisters the graphics resource \\p resource so it is not accessible by\n CUDA unless registered again.\n\n If \\p resource is invalid then ::cudaErrorInvalidResourceHandle is\n returned.\n\n \\param resource - Resource to unregister\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphicsD3D9RegisterResource,\n ::cudaGraphicsD3D10RegisterResource,\n ::cudaGraphicsD3D11RegisterResource,\n ::cudaGraphicsGLRegisterBuffer,\n ::cudaGraphicsGLRegisterImage,\n ::cuGraphicsUnregisterResource"]
    pub fn cudaGraphicsUnregisterResource(resource: cudaGraphicsResource_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Set usage flags for mapping a graphics resource\n\n Set \\p flags for mapping the graphics resource \\p resource.\n\n Changes to \\p flags will take effect the next time \\p resource is mapped.\n The \\p flags argument may be any of the following:\n - ::cudaGraphicsMapFlagsNone: Specifies no hints about how \\p resource will\n     be used. It is therefore assumed that CUDA may read from or write to \\p resource.\n - ::cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to \\p resource.\n - ::cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not read from \\p resource and will\n   write over the entire contents of \\p resource, so none of the data\n   previously stored in \\p resource will be preserved.\n\n If \\p resource is presently mapped for access by CUDA then ::cudaErrorUnknown is returned.\n If \\p flags is not one of the above values then ::cudaErrorInvalidValue is returned.\n\n \\param resource - Registered resource to set flags for\n \\param flags    - Parameters for resource mapping\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsMapResources,\n ::cuGraphicsResourceSetMapFlags"]
    pub fn cudaGraphicsResourceSetMapFlags(
        resource: cudaGraphicsResource_t,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Map graphics resources for access by CUDA\n\n Maps the \\p count graphics resources in \\p resources for access by CUDA.\n\n The resources in \\p resources may be accessed by CUDA until they\n are unmapped. The graphics API from which \\p resources were registered\n should not access any resources while they are mapped by CUDA. If an\n application does so, the results are undefined.\n\n This function provides the synchronization guarantee that any graphics calls\n issued before ::cudaGraphicsMapResources() will complete before any subsequent CUDA\n work issued in \\p stream begins.\n\n If \\p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle\n is returned. If any of \\p resources are presently mapped for access by\n CUDA then ::cudaErrorUnknown is returned.\n\n \\param count     - Number of resources to map\n \\param resources - Resources to map for CUDA\n \\param stream    - Stream for synchronization\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsResourceGetMappedPointer,\n ::cudaGraphicsSubResourceGetMappedArray,\n ::cudaGraphicsUnmapResources,\n ::cuGraphicsMapResources"]
    pub fn cudaGraphicsMapResources(
        count: ::core::ffi::c_int,
        resources: *mut cudaGraphicsResource_t,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Unmap graphics resources.\n\n Unmaps the \\p count graphics resources in \\p resources.\n\n Once unmapped, the resources in \\p resources may not be accessed by CUDA\n until they are mapped again.\n\n This function provides the synchronization guarantee that any CUDA work issued\n in \\p stream before ::cudaGraphicsUnmapResources() will complete before any\n subsequently issued graphics work begins.\n\n If \\p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle\n is returned. If any of \\p resources are not presently mapped for access by\n CUDA then ::cudaErrorUnknown is returned.\n\n \\param count     - Number of resources to unmap\n \\param resources - Resources to unmap\n \\param stream    - Stream for synchronization\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsMapResources,\n ::cuGraphicsUnmapResources"]
    pub fn cudaGraphicsUnmapResources(
        count: ::core::ffi::c_int,
        resources: *mut cudaGraphicsResource_t,
        stream: cudaStream_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Get an device pointer through which to access a mapped graphics resource.\n\n Returns in \\p *devPtr a pointer through which the mapped graphics resource\n \\p resource may be accessed.\n Returns in \\p *size the size of the memory in bytes which may be accessed from that pointer.\n The value set in \\p devPtr may change every time that \\p resource is mapped.\n\n If \\p resource is not a buffer then it cannot be accessed via a pointer and\n ::cudaErrorUnknown is returned.\n If \\p resource is not mapped then ::cudaErrorUnknown is returned.\n *\n \\param devPtr     - Returned pointer through which \\p resource may be accessed\n \\param size       - Returned size of the buffer accessible starting at \\p *devPtr\n \\param resource   - Mapped resource to access\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsMapResources,\n ::cudaGraphicsSubResourceGetMappedArray,\n ::cuGraphicsResourceGetMappedPointer"]
    pub fn cudaGraphicsResourceGetMappedPointer(
        devPtr: *mut *mut ::core::ffi::c_void,
        size: *mut usize,
        resource: cudaGraphicsResource_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Get an array through which to access a subresource of a mapped graphics resource.\n\n Returns in \\p *array an array through which the subresource of the mapped\n graphics resource \\p resource which corresponds to array index \\p arrayIndex\n and mipmap level \\p mipLevel may be accessed.  The value set in \\p array may\n change every time that \\p resource is mapped.\n\n If \\p resource is not a texture then it cannot be accessed via an array and\n ::cudaErrorUnknown is returned.\n If \\p arrayIndex is not a valid array index for \\p resource then\n ::cudaErrorInvalidValue is returned.\n If \\p mipLevel is not a valid mipmap level for \\p resource then\n ::cudaErrorInvalidValue is returned.\n If \\p resource is not mapped then ::cudaErrorUnknown is returned.\n\n \\param array       - Returned array through which a subresource of \\p resource may be accessed\n \\param resource    - Mapped resource to access\n \\param arrayIndex  - Array index for array textures or cubemap face\n                      index as defined by ::cudaGraphicsCubeFace for\n                      cubemap textures for the subresource to access\n \\param mipLevel    - Mipmap level for the subresource to access\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsResourceGetMappedPointer,\n ::cuGraphicsSubResourceGetMappedArray"]
    pub fn cudaGraphicsSubResourceGetMappedArray(
        array: *mut cudaArray_t,
        resource: cudaGraphicsResource_t,
        arrayIndex: ::core::ffi::c_uint,
        mipLevel: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Get a mipmapped array through which to access a mapped graphics resource.\n\n Returns in \\p *mipmappedArray a mipmapped array through which the mapped\n graphics resource \\p resource may be accessed. The value set in \\p mipmappedArray may\n change every time that \\p resource is mapped.\n\n If \\p resource is not a texture then it cannot be accessed via an array and\n ::cudaErrorUnknown is returned.\n If \\p resource is not mapped then ::cudaErrorUnknown is returned.\n\n \\param mipmappedArray - Returned mipmapped array through which \\p resource may be accessed\n \\param resource       - Mapped resource to access\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsResourceGetMappedPointer,\n ::cuGraphicsResourceGetMappedMipmappedArray"]
    pub fn cudaGraphicsResourceGetMappedMipmappedArray(
        mipmappedArray: *mut cudaMipmappedArray_t,
        resource: cudaGraphicsResource_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Get the channel descriptor of an array\n\n Returns in \\p *desc the channel descriptor of the CUDA array \\p array.\n\n \\param desc  - Channel format\n \\param array - Memory array on device\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\",\n ::cudaCreateTextureObject, ::cudaCreateSurfaceObject"]
    pub fn cudaGetChannelDesc(
        desc: *mut cudaChannelFormatDesc,
        array: cudaArray_const_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a channel descriptor using the specified format\n\n Returns a channel descriptor with format \\p f and number of bits of each\n component \\p x, \\p y, \\p z, and \\p w.  The ::cudaChannelFormatDesc is\n defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n \\endcode\n\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n \\param x - X component\n \\param y - Y component\n \\param z - Z component\n \\param w - W component\n \\param f - Channel format\n\n \\return\n Channel descriptor with format \\p f\n\n \\sa \\ref ::cudaCreateChannelDesc(void) \"cudaCreateChannelDesc (C++ API)\",\n ::cudaGetChannelDesc, ::cudaCreateTextureObject, ::cudaCreateSurfaceObject"]
    pub fn cudaCreateChannelDesc(
        x: ::core::ffi::c_int,
        y: ::core::ffi::c_int,
        z: ::core::ffi::c_int,
        w: ::core::ffi::c_int,
        f: cudaChannelFormatKind,
    ) -> cudaChannelFormatDesc;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a texture object\n\n Creates a texture object and returns it in \\p pTexObject. \\p pResDesc describes\n the data to texture from. \\p pTexDesc describes how the data should be sampled.\n \\p pResViewDesc is an optional argument that specifies an alternate format for\n the data described by \\p pResDesc, and also describes the subresource region\n to restrict access to when texturing. \\p pResViewDesc can only be specified if\n the type of resource is a CUDA array or a CUDA mipmapped array not in a block\n compressed format.\n\n Texture objects are only supported on devices of compute capability 3.0 or higher.\n Additionally, a texture object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n The ::cudaResourceDesc structure is defined as:\n \\code\nstruct cudaResourceDesc {\nenum cudaResourceType resType;\n\nunion {\nstruct {\ncudaArray_t array;\n} array;\nstruct {\ncudaMipmappedArray_t mipmap;\n} mipmap;\nstruct {\nvoid *devPtr;\nstruct cudaChannelFormatDesc desc;\nsize_t sizeInBytes;\n} linear;\nstruct {\nvoid *devPtr;\nstruct cudaChannelFormatDesc desc;\nsize_t width;\nsize_t height;\nsize_t pitchInBytes;\n} pitch2D;\n} res;\n};\n \\endcode\n where:\n - ::cudaResourceDesc::resType specifies the type of resource to texture from.\n CUresourceType is defined as:\n \\code\nenum cudaResourceType {\ncudaResourceTypeArray          = 0x00,\ncudaResourceTypeMipmappedArray = 0x01,\ncudaResourceTypeLinear         = 0x02,\ncudaResourceTypePitch2D        = 0x03\n};\n \\endcode\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypeArray, ::cudaResourceDesc::res::array::array\n must be set to a valid CUDA array handle.\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypeMipmappedArray, ::cudaResourceDesc::res::mipmap::mipmap\n must be set to a valid CUDA mipmapped array handle and ::cudaTextureDesc::normalizedCoords must be set to true.\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypeLinear, ::cudaResourceDesc::res::linear::devPtr\n must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment.\n ::cudaResourceDesc::res::linear::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::linear::sizeInBytes\n specifies the size of the array in bytes. The total number of elements in the linear address range cannot exceed\n ::cudaDeviceGetTexture1DLinearMaxWidth(). The number of elements is computed as (sizeInBytes / sizeof(desc)).\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypePitch2D, ::cudaResourceDesc::res::pitch2D::devPtr\n must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment.\n ::cudaResourceDesc::res::pitch2D::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::pitch2D::width\n and ::cudaResourceDesc::res::pitch2D::height specify the width and height of the array in elements, and cannot exceed\n ::cudaDeviceProp::maxTexture2DLinear[0] and ::cudaDeviceProp::maxTexture2DLinear[1] respectively.\n ::cudaResourceDesc::res::pitch2D::pitchInBytes specifies the pitch between two rows in bytes and has to be aligned to\n ::cudaDeviceProp::texturePitchAlignment. Pitch cannot exceed ::cudaDeviceProp::maxTexture2DLinear[2].\n\n\n The ::cudaTextureDesc struct is defined as\n \\code\nstruct cudaTextureDesc {\nenum cudaTextureAddressMode addressMode[3];\nenum cudaTextureFilterMode  filterMode;\nenum cudaTextureReadMode    readMode;\nint                         sRGB;\nfloat                       borderColor[4];\nint                         normalizedCoords;\nunsigned int                maxAnisotropy;\nenum cudaTextureFilterMode  mipmapFilterMode;\nfloat                       mipmapLevelBias;\nfloat                       minMipmapLevelClamp;\nfloat                       maxMipmapLevelClamp;\nint                         disableTrilinearOptimization;\nint                         seamlessCubemap;\n};\n \\endcode\n where\n - ::cudaTextureDesc::addressMode specifies the addressing mode for each dimension of the texture data. ::cudaTextureAddressMode is defined as:\n   \\code\nenum cudaTextureAddressMode {\ncudaAddressModeWrap   = 0,\ncudaAddressModeClamp  = 1,\ncudaAddressModeMirror = 2,\ncudaAddressModeBorder = 3\n};\n   \\endcode\n   This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear. Also, if ::cudaTextureDesc::normalizedCoords\n   is set to zero, ::cudaAddressModeWrap and ::cudaAddressModeMirror won't be supported and will be switched to ::cudaAddressModeClamp.\n\n - ::cudaTextureDesc::filterMode specifies the filtering mode to be used when fetching from the texture. ::cudaTextureFilterMode is defined as:\n   \\code\nenum cudaTextureFilterMode {\ncudaFilterModePoint  = 0,\ncudaFilterModeLinear = 1\n};\n   \\endcode\n   This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear.\n\n - ::cudaTextureDesc::readMode specifies whether integer data should be converted to floating point or not. ::cudaTextureReadMode is defined as:\n   \\code\nenum cudaTextureReadMode {\ncudaReadModeElementType     = 0,\ncudaReadModeNormalizedFloat = 1\n};\n   \\endcode\n   Note that this applies only to 8-bit and 16-bit integer formats. 32-bit integer format would not be promoted, regardless of\n   whether or not this ::cudaTextureDesc::readMode is set ::cudaReadModeNormalizedFloat is specified.\n\n - ::cudaTextureDesc::sRGB specifies whether sRGB to linear conversion should be performed during texture fetch.\n\n - ::cudaTextureDesc::borderColor specifies the float values of color. where:\n   ::cudaTextureDesc::borderColor[0] contains value of 'R',\n   ::cudaTextureDesc::borderColor[1] contains value of 'G',\n   ::cudaTextureDesc::borderColor[2] contains value of 'B',\n   ::cudaTextureDesc::borderColor[3] contains value of 'A'\n   Note that application using integer border color values will need to <reinterpret_cast> these values to float.\n   The values are set only when the addressing mode specified by ::cudaTextureDesc::addressMode is cudaAddressModeBorder.\n\n - ::cudaTextureDesc::normalizedCoords specifies whether the texture coordinates will be normalized or not.\n\n - ::cudaTextureDesc::maxAnisotropy specifies the maximum anistropy ratio to be used when doing anisotropic filtering. This value will be\n   clamped to the range [1,16].\n\n - ::cudaTextureDesc::mipmapFilterMode specifies the filter mode when the calculated mipmap level lies between two defined mipmap levels.\n\n - ::cudaTextureDesc::mipmapLevelBias specifies the offset to be applied to the calculated mipmap level.\n\n - ::cudaTextureDesc::minMipmapLevelClamp specifies the lower end of the mipmap level range to clamp access to.\n\n - ::cudaTextureDesc::maxMipmapLevelClamp specifies the upper end of the mipmap level range to clamp access to.\n\n - ::cudaTextureDesc::disableTrilinearOptimization specifies whether the trilinear filtering optimizations will be disabled.\n\n - ::cudaTextureDesc::seamlessCubemap specifies whether seamless cube map filtering is enabled. This flag can only be specified if the\n   underlying resource is a CUDA array or a CUDA mipmapped array that was created with the flag ::cudaArrayCubemap.\n   When seamless cube map filtering is enabled, texture address modes specified by ::cudaTextureDesc::addressMode are ignored.\n   Instead, if the ::cudaTextureDesc::filterMode is set to ::cudaFilterModePoint the address mode ::cudaAddressModeClamp will be applied for all dimensions.\n   If the ::cudaTextureDesc::filterMode is set to ::cudaFilterModeLinear seamless cube map filtering will be performed when sampling along the cube face borders.\n\n The ::cudaResourceViewDesc struct is defined as\n \\code\nstruct cudaResourceViewDesc {\nenum cudaResourceViewFormat format;\nsize_t                      width;\nsize_t                      height;\nsize_t                      depth;\nunsigned int                firstMipmapLevel;\nunsigned int                lastMipmapLevel;\nunsigned int                firstLayer;\nunsigned int                lastLayer;\n};\n \\endcode\n where:\n - ::cudaResourceViewDesc::format specifies how the data contained in the CUDA array or CUDA mipmapped array should\n   be interpreted. Note that this can incur a change in size of the texture data. If the resource view format is a block\n   compressed format, then the underlying CUDA array or CUDA mipmapped array has to have a 32-bit unsigned integer format\n   with 2 or 4 channels, depending on the block compressed format. For ex., BC1 and BC4 require the underlying CUDA array to have\n   a 32-bit unsigned int with 2 channels. The other BC formats require the underlying resource to have the same 32-bit unsigned int\n   format but with 4 channels.\n\n - ::cudaResourceViewDesc::width specifies the new width of the texture data. If the resource view format is a block\n   compressed format, this value has to be 4 times the original width of the resource. For non block compressed formats,\n   this value has to be equal to that of the original resource.\n\n - ::cudaResourceViewDesc::height specifies the new height of the texture data. If the resource view format is a block\n   compressed format, this value has to be 4 times the original height of the resource. For non block compressed formats,\n   this value has to be equal to that of the original resource.\n\n - ::cudaResourceViewDesc::depth specifies the new depth of the texture data. This value has to be equal to that of the\n   original resource.\n\n - ::cudaResourceViewDesc::firstMipmapLevel specifies the most detailed mipmap level. This will be the new mipmap level zero.\n   For non-mipmapped resources, this value has to be zero.::cudaTextureDesc::minMipmapLevelClamp and ::cudaTextureDesc::maxMipmapLevelClamp\n   will be relative to this value. For ex., if the firstMipmapLevel is set to 2, and a minMipmapLevelClamp of 1.2 is specified,\n   then the actual minimum mipmap level clamp will be 3.2.\n\n - ::cudaResourceViewDesc::lastMipmapLevel specifies the least detailed mipmap level. For non-mipmapped resources, this value\n   has to be zero.\n\n - ::cudaResourceViewDesc::firstLayer specifies the first layer index for layered textures. This will be the new layer zero.\n   For non-layered resources, this value has to be zero.\n\n - ::cudaResourceViewDesc::lastLayer specifies the last layer index for layered textures. For non-layered resources,\n   this value has to be zero.\n\n\n \\param pTexObject   - Texture object to create\n \\param pResDesc     - Resource descriptor\n \\param pTexDesc     - Texture descriptor\n \\param pResViewDesc - Resource view descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDestroyTextureObject,\n ::cuTexObjectCreate"]
    pub fn cudaCreateTextureObject(
        pTexObject: *mut cudaTextureObject_t,
        pResDesc: *const cudaResourceDesc,
        pTexDesc: *const cudaTextureDesc,
        pResViewDesc: *const cudaResourceViewDesc,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys a texture object\n\n Destroys the texture object specified by \\p texObject.\n\n \\param texObject - Texture object to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectDestroy"]
    pub fn cudaDestroyTextureObject(texObject: cudaTextureObject_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a texture object's resource descriptor\n\n Returns the resource descriptor for the texture object specified by \\p texObject.\n\n \\param pResDesc  - Resource descriptor\n \\param texObject - Texture object\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectGetResourceDesc"]
    pub fn cudaGetTextureObjectResourceDesc(
        pResDesc: *mut cudaResourceDesc,
        texObject: cudaTextureObject_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a texture object's texture descriptor\n\n Returns the texture descriptor for the texture object specified by \\p texObject.\n\n \\param pTexDesc  - Texture descriptor\n \\param texObject - Texture object\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectGetTextureDesc"]
    pub fn cudaGetTextureObjectTextureDesc(
        pTexDesc: *mut cudaTextureDesc,
        texObject: cudaTextureObject_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a texture object's resource view descriptor\n\n Returns the resource view descriptor for the texture object specified by \\p texObject.\n If no resource view was specified, ::cudaErrorInvalidValue is returned.\n\n \\param pResViewDesc - Resource view descriptor\n \\param texObject    - Texture object\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectGetResourceViewDesc"]
    pub fn cudaGetTextureObjectResourceViewDesc(
        pResViewDesc: *mut cudaResourceViewDesc,
        texObject: cudaTextureObject_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a surface object\n\n Creates a surface object and returns it in \\p pSurfObject. \\p pResDesc describes\n the data to perform surface load/stores on. ::cudaResourceDesc::resType must be\n ::cudaResourceTypeArray and  ::cudaResourceDesc::res::array::array\n must be set to a valid CUDA array handle.\n\n Surface objects are only supported on devices of compute capability 3.0 or higher.\n Additionally, a surface object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n \\param pSurfObject - Surface object to create\n \\param pResDesc    - Resource descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidChannelDescriptor,\n ::cudaErrorInvalidResourceHandle\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDestroySurfaceObject,\n ::cuSurfObjectCreate"]
    pub fn cudaCreateSurfaceObject(
        pSurfObject: *mut cudaSurfaceObject_t,
        pResDesc: *const cudaResourceDesc,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys a surface object\n\n Destroys the surface object specified by \\p surfObject.\n\n \\param surfObject - Surface object to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaCreateSurfaceObject,\n ::cuSurfObjectDestroy"]
    pub fn cudaDestroySurfaceObject(surfObject: cudaSurfaceObject_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a surface object's resource descriptor\n Returns the resource descriptor for the surface object specified by \\p surfObject.\n\n \\param pResDesc   - Resource descriptor\n \\param surfObject - Surface object\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateSurfaceObject,\n ::cuSurfObjectGetResourceDesc"]
    pub fn cudaGetSurfaceObjectResourceDesc(
        pResDesc: *mut cudaResourceDesc,
        surfObject: cudaSurfaceObject_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the latest version of CUDA supported by the driver\n\n Returns in \\p *driverVersion the latest version of CUDA supported by\n the driver. The version is returned as (1000 &times; major + 10 &times; minor).\n For example, CUDA 9.2 would be represented by 9020. If no driver is installed,\n then 0 is returned as the driver version.\n\n This function automatically returns ::cudaErrorInvalidValue\n if \\p driverVersion is NULL.\n\n \\param driverVersion - Returns the CUDA driver version.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaRuntimeGetVersion,\n ::cuDriverGetVersion"]
    pub fn cudaDriverGetVersion(driverVersion: *mut ::core::ffi::c_int) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the CUDA Runtime version\n\n Returns in \\p *runtimeVersion the version number of the current CUDA\n Runtime instance. The version is returned as\n (1000 &times; major + 10 &times; minor). For example,\n CUDA 9.2 would be represented by 9020.\n\n As of CUDA 12.0, this function no longer initializes CUDA. The purpose\n of this API is solely to return a compile-time constant stating the\n CUDA Toolkit version in the above format.\n\n This function automatically returns ::cudaErrorInvalidValue if\n the \\p runtimeVersion argument is NULL.\n\n \\param runtimeVersion - Returns the CUDA Runtime version.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDriverGetVersion,\n ::cuDriverGetVersion"]
    pub fn cudaRuntimeGetVersion(runtimeVersion: *mut ::core::ffi::c_int) -> cudaError_t;
}
#[doc = " Type of public error reporting callback functions.\n \\param data User parameter provided at registration\n \\param logLevel Severity level of the log message\n \\param message Error log message being reported\n \\param length Length of the message in bytes"]
pub type cudaLogsCallback_t = ::core::option::Option<
    unsafe extern "C" fn(
        data: *mut ::core::ffi::c_void,
        logLevel: cudaLogLevel,
        message: *mut ::core::ffi::c_char,
        length: usize,
    ),
>;
unsafe extern "C" {
    #[doc = " \\brief Register a callback function to receive error log messages\n\n \\param callbackFunc  - The function to register as a callback\n \\param userData      - A generic pointer to user data. This is passed into the callback function.\n \\param callback_out  - Optional location to store the callback handle after it is registered\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,"]
    pub fn cudaLogsRegisterCallback(
        callbackFunc: cudaLogsCallback_t,
        userData: *mut ::core::ffi::c_void,
        callback_out: *mut cudaLogsCallbackHandle,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Unregister a log message callback\n\n \\param callback  - The callback instance to unregister from receiving log messages\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,"]
    pub fn cudaLogsUnregisterCallback(callback: cudaLogsCallbackHandle) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets log iterator to point to the end of log buffer, where the next message would be written.\n\n \\param iterator_out - Location to store an iterator to the current tail of the logs\n \\param flags        - Reserved for future use, must be 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,"]
    pub fn cudaLogsCurrent(
        iterator_out: *mut cudaLogIterator,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Dump accumulated driver logs into a file\n\n Logs generated by the driver are stored in an internal buffer and can be copied out using this API.\n This API dumps all driver logs starting from \\p iterator into \\p pathToFile provided.\n\n \\note \\p iterator is auto-advancing. Dumping logs will update the value of\n       \\p iterator to receive the next generated log.\n\n \\note The driver reserves limited memory for storing logs.\n       The oldest logs may be overwritten and become unrecoverable. An indication will appear in the\n       destination outupt if the logs have been truncated. Call dump after each failed API to mitigate this\n       risk.\n\n \\param iterator   - Optional auto-advancing iterator specifying the starting log to read. NULL value dumps all logs.\n \\param pathToFile - Path to output file for dumping logs\n \\param flags      - Reserved for future use, must be 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,"]
    pub fn cudaLogsDumpToFile(
        iterator: *mut cudaLogIterator,
        pathToFile: *const ::core::ffi::c_char,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Dump accumulated driver logs into a buffer\n\n Logs generated by the driver are stored in an internal buffer and can be copied out using this API.\n This API dumps driver logs from \\p iterator into \\p buffer up to the size specified in \\p *size.\n The driver will always null terminate the buffer but there will not be a null character between log\n entries, only a newline \\\\n. The driver will then return the actual number of bytes written in\n \\p *size, excluding the null terminator. If there are no messages to dump, \\p *size will be set to 0\n and the function will return ::CUDA_SUCCESS.\n If the provided \\p buffer is not large enough to hold any messages, \\p *size will be set to 0 and\n the function will return ::CUDA_ERROR_INVALID_VALUE.\n\n \\note \\p iterator is auto-advancing. Dumping logs will update the value of\n       \\p iterator to receive the next generated log.\n\n \\note The driver reserves limited memory for storing logs. The maximum size of the buffer is 25600 bytes.\n       The oldest logs may be overwritten and become unrecoverable. An indication will appear in the\n       destination outupt if the logs have been truncated. Call dump after each failed API to mitigate this\n       risk.\n\n \\note If the provided value in \\p *size is not large enough to hold all buffered messages, a message will\n       be added at the head of the buffer indicating this. The driver then computes the number of messages\n       it is able to store in \\p buffer and writes it out. The final message in \\p buffer will always be\n       the most recent log message as of when the API is called.\n\n \\param iterator  - Optional auto-advancing iterator specifying the starting log to read. NULL value dumps all logs.\n \\param buffer    - Pointer to dump logs\n \\param size      - See description\n \\param flags     - Reserved for future use, must be 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,"]
    pub fn cudaLogsDumpToMemory(
        iterator: *mut cudaLogIterator,
        buffer: *mut ::core::ffi::c_char,
        size: *mut usize,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a graph\n\n Creates an empty graph, which is returned via \\p pGraph.\n\n \\param pGraph - Returns newly created graph\n \\param flags   - Graph creation flags, must be 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphInstantiate,\n ::cudaGraphDestroy,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphClone"]
    pub fn cudaGraphCreate(pGraph: *mut cudaGraph_t, flags: ::core::ffi::c_uint) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a kernel execution node and adds it to a graph\n\n Creates a new kernel execution node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies and arguments specified in \\p pNodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n The cudaKernelNodeParams structure is defined as:\n\n \\code\n  struct cudaKernelNodeParams\n  {\n      void* func;\n      dim3 gridDim;\n      dim3 blockDim;\n      unsigned int sharedMemBytes;\n      void **kernelParams;\n      void **extra;\n  };\n \\endcode\n\n When the graph is launched, the node will invoke kernel \\p func on a (\\p gridDim.x x\n \\p gridDim.y x \\p gridDim.z) grid of blocks. Each block contains\n (\\p blockDim.x x \\p blockDim.y x \\p blockDim.z) threads.\n\n \\p sharedMem sets the amount of dynamic shared memory that will be\n available to each thread block.\n\n Kernel parameters to \\p func can be specified in one of two ways:\n\n 1) Kernel parameters can be specified via \\p kernelParams. If the kernel has N\n parameters, then \\p kernelParams needs to be an array of N pointers. Each pointer,\n from \\p kernelParams[0] to \\p kernelParams[N-1], points to the region of memory from which the actual\n parameter will be copied. The number of kernel parameters and their offsets and sizes do not need\n to be specified as that information is retrieved directly from the kernel's image.\n\n 2) Kernel parameters can also be packaged by the application into a single buffer that is passed in\n via \\p extra. This places the burden on the application of knowing each kernel\n parameter's size and alignment/padding within the buffer. The \\p extra parameter exists\n to allow this function to take additional less commonly used arguments. \\p extra specifies\n a list of names of extra settings and their corresponding values. Each extra setting name is\n immediately followed by the corresponding value. The list must be terminated with either NULL or\n CU_LAUNCH_PARAM_END.\n\n - ::CU_LAUNCH_PARAM_END, which indicates the end of the \\p extra\n   array;\n - ::CU_LAUNCH_PARAM_BUFFER_POINTER, which specifies that the next\n   value in \\p extra will be a pointer to a buffer\n   containing all the kernel parameters for launching kernel\n   \\p func;\n - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next\n   value in \\p extra will be a pointer to a size_t\n   containing the size of the buffer specified with\n   ::CU_LAUNCH_PARAM_BUFFER_POINTER;\n\n The error ::cudaErrorInvalidValue will be returned if kernel parameters are specified with both\n \\p kernelParams and \\p extra (i.e. both \\p kernelParams and\n \\p extra are non-NULL).\n\n The \\p kernelParams or \\p extra array, as well as the argument values it points to,\n are copied during this call.\n\n \\note Kernels launched using graphs must not use texture and surface references. Reading or\n       writing through any texture or surface reference is undefined behavior.\n       This restriction does not apply to texture and surface objects.\n\n \\param pGraphNode     - Returns newly created node\n \\param graph          - Graph to which to add the node\n \\param pDependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pNodeParams      - Parameters for the GPU execution node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaLaunchKernel,\n ::cudaGraphKernelNodeGetParams,\n ::cudaGraphKernelNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
    pub fn cudaGraphAddKernelNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        pNodeParams: *const cudaKernelNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a kernel node's parameters\n\n Returns the parameters of kernel node \\p node in \\p pNodeParams.\n The \\p kernelParams or \\p extra array returned in \\p pNodeParams,\n as well as the argument values it points to, are owned by the node.\n This memory remains valid until the node is destroyed or its\n parameters are modified, and should not be modified\n directly. Use ::cudaGraphKernelNodeSetParams to update the\n parameters of this node.\n\n The params will contain either \\p kernelParams or \\p extra,\n according to which of these was most recently set on the node.\n\n \\param node        - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaLaunchKernel,\n ::cudaGraphAddKernelNode,\n ::cudaGraphKernelNodeSetParams"]
    pub fn cudaGraphKernelNodeGetParams(
        node: cudaGraphNode_t,
        pNodeParams: *mut cudaKernelNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets a kernel node's parameters\n\n Sets the parameters of kernel node \\p node to \\p pNodeParams.\n\n \\param node        - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorMemoryAllocation\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaLaunchKernel,\n ::cudaGraphAddKernelNode,\n ::cudaGraphKernelNodeGetParams"]
    pub fn cudaGraphKernelNodeSetParams(
        node: cudaGraphNode_t,
        pNodeParams: *const cudaKernelNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Copies attributes from source node to destination node.\n\n Copies attributes from source node \\p hSrc to destination node \\p hDst.\n Both node must have the same context.\n\n \\param[out] hDst Destination node\n \\param[in] hSrc Source node\n For list of attributes see ::cudaKernelNodeAttrID\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidContext\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaGraphKernelNodeCopyAttributes(
        hDst: cudaGraphNode_t,
        hSrc: cudaGraphNode_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Queries node attribute.\n\n Queries attribute \\p attr from node \\p hNode and stores it in corresponding\n member of \\p value_out.\n\n \\param[in] hNode\n \\param[in] attr\n \\param[out] value_out\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaGraphKernelNodeGetAttribute(
        hNode: cudaGraphNode_t,
        attr: cudaLaunchAttributeID,
        value_out: *mut cudaLaunchAttributeValue,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets node attribute.\n\n Sets attribute \\p attr on node \\p hNode from corresponding attribute of\n \\p value.\n\n \\param[out] hNode\n \\param[in] attr\n \\param[out] value\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
    pub fn cudaGraphKernelNodeSetAttribute(
        hNode: cudaGraphNode_t,
        attr: cudaLaunchAttributeID,
        value: *const cudaLaunchAttributeValue,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a memcpy node and adds it to a graph\n\n Creates a new memcpy node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n When the graph is launched, the node will perform the memcpy described by \\p pCopyParams.\n See ::cudaMemcpy3D() for a description of the structure and its restrictions.\n\n Memcpy nodes have some additional restrictions with regards to managed memory, if the\n system contains at least one device which has a zero value for the device attribute\n ::cudaDevAttrConcurrentManagedAccess.\n\n \\param pGraphNode     - Returns newly created node\n \\param graph          - Graph to which to add the node\n \\param pDependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pCopyParams      - Parameters for the memory copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaMemcpy3D,\n ::cudaGraphAddMemcpyNodeToSymbol,\n ::cudaGraphAddMemcpyNodeFromSymbol,\n ::cudaGraphAddMemcpyNode1D,\n ::cudaGraphMemcpyNodeGetParams,\n ::cudaGraphMemcpyNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemsetNode"]
    pub fn cudaGraphAddMemcpyNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        pCopyParams: *const cudaMemcpy3DParms,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddMemcpyNodeToSymbol(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        symbol: *const ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddMemcpyNodeFromSymbol(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        dst: *mut ::core::ffi::c_void,
        symbol: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddMemcpyNode1D(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        dst: *mut ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a memcpy node's parameters\n\n Returns the parameters of memcpy node \\p node in \\p pNodeParams.\n\n \\param node        - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMemcpy3D,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphMemcpyNodeSetParams"]
    pub fn cudaGraphMemcpyNodeGetParams(
        node: cudaGraphNode_t,
        pNodeParams: *mut cudaMemcpy3DParms,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets a memcpy node's parameters\n\n Sets the parameters of memcpy node \\p node to \\p pNodeParams.\n\n \\param node        - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaMemcpy3D,\n ::cudaGraphMemcpyNodeSetParamsToSymbol,\n ::cudaGraphMemcpyNodeSetParamsFromSymbol,\n ::cudaGraphMemcpyNodeSetParams1D,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphMemcpyNodeGetParams"]
    pub fn cudaGraphMemcpyNodeSetParams(
        node: cudaGraphNode_t,
        pNodeParams: *const cudaMemcpy3DParms,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphMemcpyNodeSetParamsToSymbol(
        node: cudaGraphNode_t,
        symbol: *const ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphMemcpyNodeSetParamsFromSymbol(
        node: cudaGraphNode_t,
        dst: *mut ::core::ffi::c_void,
        symbol: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphMemcpyNodeSetParams1D(
        node: cudaGraphNode_t,
        dst: *mut ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a memset node and adds it to a graph\n\n Creates a new memset node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n The element size must be 1, 2, or 4 bytes.\n When the graph is launched, the node will perform the memset described by \\p pMemsetParams.\n\n \\param pGraphNode     - Returns newly created node\n \\param graph          - Graph to which to add the node\n \\param pDependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pMemsetParams    - Parameters for the memory set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaMemset2D,\n ::cudaGraphMemsetNodeGetParams,\n ::cudaGraphMemsetNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode"]
    pub fn cudaGraphAddMemsetNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        pMemsetParams: *const cudaMemsetParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a memset node's parameters\n\n Returns the parameters of memset node \\p node in \\p pNodeParams.\n\n \\param node        - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMemset2D,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphMemsetNodeSetParams"]
    pub fn cudaGraphMemsetNodeGetParams(
        node: cudaGraphNode_t,
        pNodeParams: *mut cudaMemsetParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets a memset node's parameters\n\n Sets the parameters of memset node \\p node to \\p pNodeParams.\n\n \\param node        - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaMemset2D,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphMemsetNodeGetParams"]
    pub fn cudaGraphMemsetNodeSetParams(
        node: cudaGraphNode_t,
        pNodeParams: *const cudaMemsetParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a host execution node and adds it to a graph\n\n Creates a new CPU execution node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies and arguments specified in \\p pNodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n When the graph is launched, the node will invoke the specified CPU function.\n Host nodes are not supported under MPS with pre-Volta GPUs.\n\n \\param pGraphNode     - Returns newly created node\n \\param graph          - Graph to which to add the node\n \\param pDependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pNodeParams      - Parameters for the host node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaLaunchHostFunc,\n ::cudaGraphHostNodeGetParams,\n ::cudaGraphHostNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
    pub fn cudaGraphAddHostNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        pNodeParams: *const cudaHostNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a host node's parameters\n\n Returns the parameters of host node \\p node in \\p pNodeParams.\n\n \\param node        - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaLaunchHostFunc,\n ::cudaGraphAddHostNode,\n ::cudaGraphHostNodeSetParams"]
    pub fn cudaGraphHostNodeGetParams(
        node: cudaGraphNode_t,
        pNodeParams: *mut cudaHostNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets a host node's parameters\n\n Sets the parameters of host node \\p node to \\p nodeParams.\n\n \\param node        - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaLaunchHostFunc,\n ::cudaGraphAddHostNode,\n ::cudaGraphHostNodeGetParams"]
    pub fn cudaGraphHostNodeSetParams(
        node: cudaGraphNode_t,
        pNodeParams: *const cudaHostNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates a child graph node and adds it to a graph\n\n Creates a new node which executes an embedded graph, and adds it to \\p graph with\n \\p numDependencies dependencies specified via \\p pDependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n If \\p childGraph contains allocation nodes, free nodes, or conditional nodes, this call will\n return an error.\n\n The node executes an embedded child graph. The child graph is cloned in this call.\n\n \\param pGraphNode     - Returns newly created node\n \\param graph          - Graph to which to add the node\n \\param pDependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param childGraph      - The graph to clone into this node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphChildGraphNodeGetGraph,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphClone"]
    pub fn cudaGraphAddChildGraphNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        childGraph: cudaGraph_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Gets a handle to the embedded graph of a child graph node\n\n Gets a handle to the embedded graph in a child graph node. This call\n does not clone the graph. Changes to the graph will be reflected in\n the node, and the node retains ownership of the graph.\n\n Allocation and free nodes cannot be added to the returned graph.\n Attempting to do so will return an error.\n\n \\param node   - Node to get the embedded graph for\n \\param pGraph - Location to store a handle to the graph\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphNodeFindInClone"]
    pub fn cudaGraphChildGraphNodeGetGraph(
        node: cudaGraphNode_t,
        pGraph: *mut cudaGraph_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates an empty node and adds it to a graph\n\n Creates a new node which performs no operation, and adds it to \\p graph with\n \\p numDependencies dependencies specified via \\p pDependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n An empty node performs no operation during execution, but can be used for\n transitive ordering. For example, a phased execution graph with 2 groups of n\n nodes with a barrier between them can be represented using an empty node and\n 2*n dependency edges, rather than no empty node and n^2 dependency edges.\n\n \\param pGraphNode     - Returns newly created node\n \\param graph          - Graph to which to add the node\n \\param pDependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
    pub fn cudaGraphAddEmptyNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddEventRecordNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        event: cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphEventRecordNodeGetEvent(
        node: cudaGraphNode_t,
        event_out: *mut cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphEventRecordNodeSetEvent(
        node: cudaGraphNode_t,
        event: cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddEventWaitNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        event: cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphEventWaitNodeGetEvent(
        node: cudaGraphNode_t,
        event_out: *mut cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphEventWaitNodeSetEvent(node: cudaGraphNode_t, event: cudaEvent_t)
        -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddExternalSemaphoresSignalNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        nodeParams: *const cudaExternalSemaphoreSignalNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExternalSemaphoresSignalNodeGetParams(
        hNode: cudaGraphNode_t,
        params_out: *mut cudaExternalSemaphoreSignalNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExternalSemaphoresSignalNodeSetParams(
        hNode: cudaGraphNode_t,
        nodeParams: *const cudaExternalSemaphoreSignalNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddExternalSemaphoresWaitNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        nodeParams: *const cudaExternalSemaphoreWaitNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExternalSemaphoresWaitNodeGetParams(
        hNode: cudaGraphNode_t,
        params_out: *mut cudaExternalSemaphoreWaitNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExternalSemaphoresWaitNodeSetParams(
        hNode: cudaGraphNode_t,
        nodeParams: *const cudaExternalSemaphoreWaitNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddMemAllocNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        nodeParams: *mut cudaMemAllocNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphMemAllocNodeGetParams(
        node: cudaGraphNode_t,
        params_out: *mut cudaMemAllocNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphAddMemFreeNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        numDependencies: usize,
        dptr: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphMemFreeNodeGetParams(
        node: cudaGraphNode_t,
        dptr_out: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaDeviceGraphMemTrim(device: ::core::ffi::c_int) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaDeviceGetGraphMemAttribute(
        device: ::core::ffi::c_int,
        attr: cudaGraphMemAttributeType,
        value: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaDeviceSetGraphMemAttribute(
        device: ::core::ffi::c_int,
        attr: cudaGraphMemAttributeType,
        value: *mut ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Clones a graph\n\n This function creates a copy of \\p originalGraph and returns it in \\p pGraphClone.\n All parameters are copied into the cloned graph. The original graph may be modified\n after this call without affecting the clone.\n\n Child graph nodes in the original graph are recursively copied into the clone.\n\n \\note: Cloning is not supported for graphs which contain memory allocation nodes,\n        memory free nodes, or conditional nodes.\n\n \\param pGraphClone  - Returns newly created cloned graph\n \\param originalGraph - Graph to clone\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphNodeFindInClone"]
    pub fn cudaGraphClone(pGraphClone: *mut cudaGraph_t, originalGraph: cudaGraph_t)
        -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Finds a cloned version of a node\n\n This function returns the node in \\p clonedGraph corresponding to \\p originalNode\n in the original graph.\n\n \\p clonedGraph must have been cloned from \\p originalGraph via ::cudaGraphClone.\n \\p originalNode must have been in \\p originalGraph at the time of the call to\n ::cudaGraphClone, and the corresponding cloned node in \\p clonedGraph must not have\n been removed. The cloned node is then returned via \\p pClonedNode.\n\n \\param pNode  - Returns handle to the cloned node\n \\param originalNode - Handle to the original node\n \\param clonedGraph - Cloned graph to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphClone"]
    pub fn cudaGraphNodeFindInClone(
        pNode: *mut cudaGraphNode_t,
        originalNode: cudaGraphNode_t,
        clonedGraph: cudaGraph_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a node's type\n\n Returns the node type of \\p node in \\p pType.\n\n \\param node - Node to query\n \\param pType  - Pointer to return the node type\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphChildGraphNodeGetGraph,\n ::cudaGraphKernelNodeGetParams,\n ::cudaGraphKernelNodeSetParams,\n ::cudaGraphHostNodeGetParams,\n ::cudaGraphHostNodeSetParams,\n ::cudaGraphMemcpyNodeGetParams,\n ::cudaGraphMemcpyNodeSetParams,\n ::cudaGraphMemsetNodeGetParams,\n ::cudaGraphMemsetNodeSetParams"]
    pub fn cudaGraphNodeGetType(
        node: cudaGraphNode_t,
        pType: *mut cudaGraphNodeType,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a graph's nodes\n\n Returns a list of \\p graph's nodes. \\p nodes may be NULL, in which case this\n function will return the number of nodes in \\p numNodes. Otherwise,\n \\p numNodes entries will be filled in. If \\p numNodes is higher than the actual\n number of nodes, the remaining entries in \\p nodes will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p numNodes.\n\n \\param graph    - Graph to query\n \\param nodes    - Pointer to return the nodes\n \\param numNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetType,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
    pub fn cudaGraphGetNodes(
        graph: cudaGraph_t,
        nodes: *mut cudaGraphNode_t,
        numNodes: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a graph's root nodes\n\n Returns a list of \\p graph's root nodes. \\p pRootNodes may be NULL, in which case this\n function will return the number of root nodes in \\p pNumRootNodes. Otherwise,\n \\p pNumRootNodes entries will be filled in. If \\p pNumRootNodes is higher than the actual\n number of root nodes, the remaining entries in \\p pRootNodes will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p pNumRootNodes.\n\n \\param graph       - Graph to query\n \\param pRootNodes    - Pointer to return the root nodes\n \\param pNumRootNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphGetNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetType,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
    pub fn cudaGraphGetRootNodes(
        graph: cudaGraph_t,
        pRootNodes: *mut cudaGraphNode_t,
        pNumRootNodes: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a graph's dependency edges\n\n Returns a list of \\p graph's dependency edges. Edges are returned via corresponding\n indices in \\p from, \\p to and \\p edgeData; that is, the node in \\p to[i] has a\n dependency on the node in \\p from[i] with data \\p edgeData[i]. \\p from and \\p to may\n both be NULL, in which case this function only returns the number of edges in\n \\p numEdges. Otherwise, \\p numEdges entries will be filled in. If \\p numEdges is higher\n than the actual number of edges, the remaining entries in \\p from and \\p to will be\n set to NULL, and the number of edges actually returned will be written to \\p numEdges.\n \\p edgeData may alone be NULL, in which case the edges must all have default (zeroed)\n edge data. Attempting a losst query via NULL \\p edgeData will result in\n ::cudaErrorLossyQuery. If \\p edgeData is non-NULL then \\p from and \\p to must be as\n well.\n\n \\param graph    - Graph to get the edges from\n \\param from     - Location to return edge endpoints\n \\param to       - Location to return edge endpoints\n \\param edgeData - Optional location to return edge data\n \\param numEdges - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorLossyQuery,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
    pub fn cudaGraphGetEdges(
        graph: cudaGraph_t,
        from: *mut cudaGraphNode_t,
        to: *mut cudaGraphNode_t,
        edgeData: *mut cudaGraphEdgeData,
        numEdges: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a node's dependencies\n\n Returns a list of \\p node's dependencies. \\p pDependencies may be NULL, in which case this\n function will return the number of dependencies in \\p pNumDependencies. Otherwise,\n \\p pNumDependencies entries will be filled in. If \\p pNumDependencies is higher than the actual\n number of dependencies, the remaining entries in \\p pDependencies will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p pNumDependencies.\n\n Note that if an edge has non-zero (non-default) edge data and \\p edgeData is NULL,\n this API will return ::cudaErrorLossyQuery. If \\p edgeData is non-NULL, then\n \\p pDependencies must be as well.\n\n \\param node             - Node to query\n \\param pDependencies    - Pointer to return the dependencies\n \\param edgeData         - Optional array to return edge data for each dependency\n \\param pNumDependencies - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorLossyQuery,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeGetDependentNodes,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies"]
    pub fn cudaGraphNodeGetDependencies(
        node: cudaGraphNode_t,
        pDependencies: *mut cudaGraphNode_t,
        edgeData: *mut cudaGraphEdgeData,
        pNumDependencies: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a node's dependent nodes\n\n Returns a list of \\p node's dependent nodes. \\p pDependentNodes may be NULL, in which\n case this function will return the number of dependent nodes in \\p pNumDependentNodes.\n Otherwise, \\p pNumDependentNodes entries will be filled in. If \\p pNumDependentNodes is\n higher than the actual number of dependent nodes, the remaining entries in\n \\p pDependentNodes will be set to NULL, and the number of nodes actually obtained will\n be returned in \\p pNumDependentNodes.\n\n Note that if an edge has non-zero (non-default) edge data and \\p edgeData is NULL,\n this API will return ::cudaErrorLossyQuery. If \\p edgeData is non-NULL, then\n \\p pDependentNodes must be as well.\n\n \\param node               - Node to query\n \\param pDependentNodes    - Pointer to return the dependent nodes\n \\param edgeData           - Optional pointer to return edge data for dependent nodes\n \\param pNumDependentNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorLossyQuery,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies"]
    pub fn cudaGraphNodeGetDependentNodes(
        node: cudaGraphNode_t,
        pDependentNodes: *mut cudaGraphNode_t,
        edgeData: *mut cudaGraphEdgeData,
        pNumDependentNodes: *mut usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Adds dependency edges to a graph.\n\n The number of dependencies to be added is defined by \\p numDependencies\n Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency.\n Each node in \\p pFrom and \\p pTo must belong to \\p graph.\n\n If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored.\n Specifying an existing dependency will return an error.\n\n \\param graph - Graph to which dependencies are added\n \\param from - Array of nodes that provide the dependencies\n \\param to - Array of dependent nodes\n \\param edgeData - Optional array of edge data. If NULL, default (zeroed) edge data is assumed.\n \\param numDependencies - Number of dependencies to be added\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphRemoveDependencies,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
    pub fn cudaGraphAddDependencies(
        graph: cudaGraph_t,
        from: *const cudaGraphNode_t,
        to: *const cudaGraphNode_t,
        edgeData: *const cudaGraphEdgeData,
        numDependencies: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Removes dependency edges from a graph.\n\n The number of \\p pDependencies to be removed is defined by \\p numDependencies.\n Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency.\n Each node in \\p pFrom and \\p pTo must belong to \\p graph.\n\n If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored.\n Specifying an edge that does not exist in the graph, with data matching\n \\p edgeData, results in an error. \\p edgeData is nullable, which is equivalent\n to passing default (zeroed) data for each edge.\n\n \\param graph - Graph from which to remove dependencies\n \\param from - Array of nodes that provide the dependencies\n \\param to - Array of dependent nodes\n \\param edgeData - Optional array of edge data. If NULL, edge data is assumed to\n                   be default (zeroed).\n \\param numDependencies - Number of dependencies to be removed\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddDependencies,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
    pub fn cudaGraphRemoveDependencies(
        graph: cudaGraph_t,
        from: *const cudaGraphNode_t,
        to: *const cudaGraphNode_t,
        edgeData: *const cudaGraphEdgeData,
        numDependencies: usize,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Remove a node from the graph\n\n Removes \\p node from its graph. This operation also severs any dependencies of other nodes\n on \\p node and vice versa.\n\n Dependencies cannot be removed from graphs which contain allocation or free nodes.\n Any attempt to do so will return an error.\n\n \\param node  - Node to remove\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
    pub fn cudaGraphDestroyNode(node: cudaGraphNode_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates an executable graph from a graph\n\n Instantiates \\p graph as an executable graph. The graph is validated for any\n structural constraints or intra-node constraints which were not previously\n validated. If instantiation is successful, a handle to the instantiated graph\n is returned in \\p pGraphExec.\n\n The \\p flags parameter controls the behavior of instantiation and subsequent\n graph launches.  Valid flags are:\n\n - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a\n graph containing memory allocation nodes to automatically free any\n unfreed memory allocations before the graph is relaunched.\n\n - ::cudaGraphInstantiateFlagDeviceLaunch, which configures the graph for launch\n from the device. If this flag is passed, the executable graph handle returned can be\n used to launch the graph from both the host and device. This flag cannot be used in\n conjunction with ::cudaGraphInstantiateFlagAutoFreeOnLaunch.\n\n - ::cudaGraphInstantiateFlagUseNodePriority, which causes the graph\n to use the priorities from the per-node attributes rather than the priority\n of the launch stream during execution. Note that priorities are only available\n on kernel nodes, and are copied from stream priority during stream capture.\n\n If \\p graph contains any allocation or free nodes, there can be at most one\n executable graph in existence for that graph at a time. An attempt to\n instantiate a second executable graph before destroying the first with\n ::cudaGraphExecDestroy will result in an error.\n The same also applies if \\p graph contains any device-updatable kernel nodes.\n\n Graphs instantiated for launch on the device have additional restrictions which do not\n apply to host graphs:\n\n - The graph's nodes must reside on a single device.\n - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes.\n - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node.\n   Operation-specific restrictions are outlined below.\n - Kernel nodes:\n   - Use of CUDA Dynamic Parallelism is not permitted.\n   - Cooperative launches are permitted as long as MPS is not in use.\n - Memcpy nodes:\n   - Only copies involving device memory and/or pinned device-mapped host memory are permitted.\n   - Copies involving CUDA arrays are not permitted.\n   - Both operands must be accessible from the current device, and the current device must\n     match the device of other nodes in the graph.\n\n If \\p graph is not instantiated for launch on the device but contains kernels which\n call device-side cudaGraphLaunch() from multiple devices, this will result in an error.\n\n \\param pGraphExec - Returns instantiated graph\n \\param graph      - Graph to instantiate\n \\param flags      - Flags to control instantiation.  See ::CUgraphInstantiate_flags.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiateWithFlags,\n ::cudaGraphCreate,\n ::cudaGraphUpload,\n ::cudaGraphLaunch,\n ::cudaGraphExecDestroy"]
    pub fn cudaGraphInstantiate(
        pGraphExec: *mut cudaGraphExec_t,
        graph: cudaGraph_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphInstantiateWithFlags(
        pGraphExec: *mut cudaGraphExec_t,
        graph: cudaGraph_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Creates an executable graph from a graph\n\n Instantiates \\p graph as an executable graph according to the \\p instantiateParams structure.\n The graph is validated for any structural constraints or intra-node constraints\n which were not previously validated. If instantiation is successful, a handle to\n the instantiated graph is returned in \\p pGraphExec.\n\n \\p instantiateParams controls the behavior of instantiation and subsequent\n graph launches, as well as returning more detailed information in the event of an error.\n ::cudaGraphInstantiateParams is defined as:\n\n \\code\ntypedef struct {\nunsigned long long flags;\ncudaStream_t uploadStream;\ncudaGraphNode_t errNode_out;\ncudaGraphInstantiateResult result_out;\n} cudaGraphInstantiateParams;\n \\endcode\n\n The \\p flags field controls the behavior of instantiation and subsequent\n graph launches. Valid flags are:\n\n - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a\n graph containing memory allocation nodes to automatically free any\n unfreed memory allocations before the graph is relaunched.\n\n - ::cudaGraphInstantiateFlagUpload, which will perform an upload of the graph\n into \\p uploadStream once the graph has been instantiated.\n\n - ::cudaGraphInstantiateFlagDeviceLaunch, which configures the graph for launch\n from the device. If this flag is passed, the executable graph handle returned can be\n used to launch the graph from both the host and device. This flag can only be used\n on platforms which support unified addressing. This flag cannot be used in\n conjunction with ::cudaGraphInstantiateFlagAutoFreeOnLaunch.\n\n - ::cudaGraphInstantiateFlagUseNodePriority, which causes the graph\n to use the priorities from the per-node attributes rather than the priority\n of the launch stream during execution. Note that priorities are only available\n on kernel nodes, and are copied from stream priority during stream capture.\n\n If \\p graph contains any allocation or free nodes, there can be at most one\n executable graph in existence for that graph at a time. An attempt to instantiate a\n second executable graph before destroying the first with ::cudaGraphExecDestroy will\n result in an error.\n The same also applies if \\p graph contains any device-updatable kernel nodes.\n\n If \\p graph contains kernels which call device-side cudaGraphLaunch() from multiple\n devices, this will result in an error.\n\n Graphs instantiated for launch on the device have additional restrictions which do not\n apply to host graphs:\n\n - The graph's nodes must reside on a single device.\n - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes.\n - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node.\n   Operation-specific restrictions are outlined below.\n - Kernel nodes:\n   - Use of CUDA Dynamic Parallelism is not permitted.\n   - Cooperative launches are permitted as long as MPS is not in use.\n - Memcpy nodes:\n   - Only copies involving device memory and/or pinned device-mapped host memory are permitted.\n   - Copies involving CUDA arrays are not permitted.\n   - Both operands must be accessible from the current device, and the current device must\n     match the device of other nodes in the graph.\n\n In the event of an error, the \\p result_out and \\p errNode_out fields will contain more\n information about the nature of the error. Possible error reporting includes:\n\n - ::cudaGraphInstantiateError, if passed an invalid value or if an unexpected error occurred\n   which is described by the return value of the function. \\p errNode_out will be set to NULL.\n - ::cudaGraphInstantiateInvalidStructure, if the graph structure is invalid. \\p errNode_out\n   will be set to one of the offending nodes.\n - ::cudaGraphInstantiateNodeOperationNotSupported, if the graph is instantiated for device\n   launch but contains a node of an unsupported node type, or a node which performs unsupported\n   operations, such as use of CUDA dynamic parallelism within a kernel node. \\p errNode_out will\n   be set to this node.\n - ::cudaGraphInstantiateMultipleDevicesNotSupported, if the graph is instantiated for device\n   launch but a node’s device differs from that of another node. This error can also be returned\n   if a graph is not instantiated for device launch and it contains kernels which call device-side\n   cudaGraphLaunch() from multiple devices. \\p errNode_out will be set to this node.\n\n If instantiation is successful, \\p result_out will be set to ::cudaGraphInstantiateSuccess,\n and \\p hErrNode_out will be set to NULL.\n\n \\param pGraphExec       - Returns instantiated graph\n \\param graph            - Graph to instantiate\n \\param instantiateParams - Instantiation parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphInstantiate,\n ::cudaGraphInstantiateWithFlags,\n ::cudaGraphExecDestroy"]
    pub fn cudaGraphInstantiateWithParams(
        pGraphExec: *mut cudaGraphExec_t,
        graph: cudaGraph_t,
        instantiateParams: *mut cudaGraphInstantiateParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Query the instantiation flags of an executable graph\n\n Returns the flags that were passed to instantiation for the given executable graph.\n ::cudaGraphInstantiateFlagUpload will not be returned by this API as it does\n not affect the resulting executable graph.\n\n \\param graphExec - The executable graph to query\n \\param flags     - Returns the instantiation flags\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiate,\n ::cudaGraphInstantiateWithFlags,\n ::cudaGraphInstantiateWithParams"]
    pub fn cudaGraphExecGetFlags(
        graphExec: cudaGraphExec_t,
        flags: *mut ::core::ffi::c_ulonglong,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the parameters for a kernel node in the given graphExec\n\n Sets the parameters of a kernel node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p node in the\n non-executable graph, from which the executable graph was instantiated.\n\n \\p node must not have been removed from the original graph. All \\p nodeParams\n fields may change, but the following restrictions apply to \\p func updates:\n\n   - The owning device of the function cannot change.\n   - A node whose function originally did not use CUDA dynamic parallelism cannot be updated\n     to a function which uses CDP\n   - A node whose function originally did not make device-side update calls cannot be updated\n     to a function which makes device-side update calls.\n   - If \\p hGraphExec was not instantiated for device launch, a node whose function originally\n     did not use device-side cudaGraphLaunch() cannot be updated to a function which uses\n     device-side cudaGraphLaunch() unless the node resides on the same device as nodes which\n     contained such calls at instantiate-time. If no such calls were present at instantiation,\n     these updates cannot be performed at all.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p node is also not modified by this call.\n\n If \\p node is a device-updatable kernel node, the next upload/launch of \\p hGraphExec\n will overwrite any previous device-side updates. Additionally, applying host updates to a\n device-updatable kernel node while it is being updated from the device will result in\n undefined behavior.\n\n \\param hGraphExec  - The executable graph in which to set the specified node\n \\param node        - kernel node from the graph from which graphExec was instantiated\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_cudaKernel_t\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddKernelNode,\n ::cudaGraphKernelNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParams,\n ::cudaGraphExecMemsetNodeSetParams,\n ::cudaGraphExecHostNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
    pub fn cudaGraphExecKernelNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        pNodeParams: *const cudaKernelNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the parameters for a memcpy node in the given graphExec.\n\n Updates the work represented by \\p node in \\p hGraphExec as though \\p node had\n contained \\p pNodeParams at instantiation.  \\p node must remain in the graph which was\n used to instantiate \\p hGraphExec.  Changed edges to and from \\p node are ignored.\n\n The source and destination memory in \\p pNodeParams must be allocated from the same\n contexts as the original source and destination memory.  Both the instantiation-time\n memory operands and the memory operands in \\p pNodeParams must be 1-dimensional.\n Zero-length operations are not supported.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  \\p node is also\n not modified by this call.\n\n Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or\n either the original or new memory operands are multidimensional.\n\n \\param hGraphExec  - The executable graph in which to set the specified node\n \\param node        - Memcpy node from the graph which was used to instantiate graphExec\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphMemcpyNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParamsToSymbol,\n ::cudaGraphExecMemcpyNodeSetParamsFromSymbol,\n ::cudaGraphExecMemcpyNodeSetParams1D,\n ::cudaGraphExecKernelNodeSetParams,\n ::cudaGraphExecMemsetNodeSetParams,\n ::cudaGraphExecHostNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
    pub fn cudaGraphExecMemcpyNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        pNodeParams: *const cudaMemcpy3DParms,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecMemcpyNodeSetParamsToSymbol(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        symbol: *const ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecMemcpyNodeSetParamsFromSymbol(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        dst: *mut ::core::ffi::c_void,
        symbol: *const ::core::ffi::c_void,
        count: usize,
        offset: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecMemcpyNodeSetParams1D(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        dst: *mut ::core::ffi::c_void,
        src: *const ::core::ffi::c_void,
        count: usize,
        kind: cudaMemcpyKind,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the parameters for a memset node in the given graphExec.\n\n Updates the work represented by \\p node in \\p hGraphExec as though \\p node had\n contained \\p pNodeParams at instantiation.  \\p node must remain in the graph which was\n used to instantiate \\p hGraphExec.  Changed edges to and from \\p node are ignored.\n\n Zero sized operations are not supported.\n\n The new destination pointer in \\p pNodeParams must be to the same kind of allocation\n as the original destination pointer and have the same context association and device mapping\n as the original destination pointer.\n\n Both the value and pointer address may be updated.\n Changing other aspects of the memset (width, height, element size or pitch) may cause the update to be rejected.\n Specifically, for 2d memsets, all dimension changes are rejected.\n For 1d memsets, changes in height are explicitly rejected and other changes are opportunistically allowed\n if the resulting work maps onto the work resources already allocated for the node.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  \\p node is also\n not modified by this call.\n\n \\param hGraphExec  - The executable graph in which to set the specified node\n \\param node        - Memset node from the graph which was used to instantiate graphExec\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphMemsetNodeSetParams,\n ::cudaGraphExecKernelNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParams,\n ::cudaGraphExecHostNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
    pub fn cudaGraphExecMemsetNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        pNodeParams: *const cudaMemsetParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets the parameters for a host node in the given graphExec.\n\n Updates the work represented by \\p node in \\p hGraphExec as though \\p node had\n contained \\p pNodeParams at instantiation.  \\p node must remain in the graph which was\n used to instantiate \\p hGraphExec.  Changed edges to and from \\p node are ignored.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  \\p node is also\n not modified by this call.\n\n \\param hGraphExec  - The executable graph in which to set the specified node\n \\param node        - Host node from the graph which was used to instantiate graphExec\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddHostNode,\n ::cudaGraphHostNodeSetParams,\n ::cudaGraphExecKernelNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParams,\n ::cudaGraphExecMemsetNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
    pub fn cudaGraphExecHostNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        pNodeParams: *const cudaHostNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecChildGraphNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        childGraph: cudaGraph_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecEventRecordNodeSetEvent(
        hGraphExec: cudaGraphExec_t,
        hNode: cudaGraphNode_t,
        event: cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecEventWaitNodeSetEvent(
        hGraphExec: cudaGraphExec_t,
        hNode: cudaGraphNode_t,
        event: cudaEvent_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecExternalSemaphoresSignalNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        hNode: cudaGraphNode_t,
        nodeParams: *const cudaExternalSemaphoreSignalNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphExecExternalSemaphoresWaitNodeSetParams(
        hGraphExec: cudaGraphExec_t,
        hNode: cudaGraphNode_t,
        nodeParams: *const cudaExternalSemaphoreWaitNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphNodeSetEnabled(
        hGraphExec: cudaGraphExec_t,
        hNode: cudaGraphNode_t,
        isEnabled: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphNodeGetEnabled(
        hGraphExec: cudaGraphExec_t,
        hNode: cudaGraphNode_t,
        isEnabled: *mut ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Check whether an executable graph can be updated with a graph and perform the update if possible\n\n Updates the node parameters in the instantiated graph specified by \\p hGraphExec with the\n node parameters in a topologically identical graph specified by \\p hGraph.\n\n Limitations:\n\n - Kernel nodes:\n   - The owning context of the function cannot change.\n   - A node whose function originally did not use CUDA dynamic parallelism cannot be updated\n     to a function which uses CDP.\n   - A node whose function originally did not make device-side update calls cannot be updated\n     to a function which makes device-side update calls.\n   - A cooperative node cannot be updated to a non-cooperative node, and vice-versa.\n   - If the graph was instantiated with cudaGraphInstantiateFlagUseNodePriority, the\n     priority attribute cannot change. Equality is checked on the originally requested\n     priority values, before they are clamped to the device's supported range.\n   - If \\p hGraphExec was not instantiated for device launch, a node whose function originally\n     did not use device-side cudaGraphLaunch() cannot be updated to a function which uses\n     device-side cudaGraphLaunch() unless the node resides on the same device as nodes which\n     contained such calls at instantiate-time. If no such calls were present at instantiation,\n     these updates cannot be performed at all.\n   - Neither \\p hGraph nor \\p hGraphExec may contain device-updatable kernel nodes.\n - Memset and memcpy nodes:\n   - The CUDA device(s) to which the operand(s) was allocated/mapped cannot change.\n   - The source/destination memory must be allocated from the same contexts as the original\n     source/destination memory.\n   - For 2d memsets, only address and assigned value may be updated.\n   - For 1d memsets, updating dimensions is also allowed, but may fail if the resulting operation doesn't\n     map onto the work resources already allocated for the node.\n - Additional memcpy node restrictions:\n   - Changing either the source or destination memory type(i.e. CU_MEMORYTYPE_DEVICE,\n     CU_MEMORYTYPE_ARRAY, etc.) is not supported.\n - Conditional nodes:\n   - Changing node parameters is not supported.\n   - Changing parameters of nodes within the conditional body graph is subject to the rules above.\n   - Conditional handle flags and default values are updated as part of the graph update.\n\n Note:  The API may add further restrictions in future releases.  The return code should always be checked.\n\n cudaGraphExecUpdate sets the result member of \\p resultInfo to cudaGraphExecUpdateErrorTopologyChanged\n under the following conditions:\n - The count of nodes directly in \\p hGraphExec and \\p hGraph differ, in which case resultInfo->errorNode\n   is set to NULL.\n - \\p hGraph has more exit nodes than \\p hGraph, in which case resultInfo->errorNode is set to one of\n   the exit nodes in hGraph.\n - A node in \\p hGraph has a different number of dependencies than the node from \\p hGraphExec it is paired with,\n   in which case resultInfo->errorNode is set to the node from \\p hGraph.\n - A node in \\p hGraph has a dependency that does not match with the corresponding dependency of the paired node\n   from \\p hGraphExec. resultInfo->errorNode will be set to the node from \\p hGraph. resultInfo->errorFromNode\n   will be set to the mismatched dependency. The dependencies are paired based on edge order and a dependency\n   does not match when the nodes are already paired based on other edges examined in the graph.\n\n cudaGraphExecUpdate sets \\p the result member of \\p resultInfo to:\n - cudaGraphExecUpdateError if passed an invalid value.\n - cudaGraphExecUpdateErrorTopologyChanged if the graph topology changed\n - cudaGraphExecUpdateErrorNodeTypeChanged if the type of a node changed, in which case\n   \\p hErrorNode_out is set to the node from \\p hGraph.\n - cudaGraphExecUpdateErrorFunctionChanged if the function of a kernel node changed (CUDA driver < 11.2)\n - cudaGraphExecUpdateErrorUnsupportedFunctionChange if the func field of a kernel changed in an\n   unsupported way(see note above), in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - cudaGraphExecUpdateErrorParametersChanged if any parameters to a node changed in a way\n   that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - cudaGraphExecUpdateErrorAttributesChanged if any attributes of a node changed in a way\n   that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - cudaGraphExecUpdateErrorNotSupported if something about a node is unsupported, like\n   the node's type or configuration, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n\n If the update fails for a reason not listed above, the result member of \\p resultInfo will be set\n to cudaGraphExecUpdateError. If the update succeeds, the result member will be set to cudaGraphExecUpdateSuccess.\n\n cudaGraphExecUpdate returns cudaSuccess when the updated was performed successfully.  It returns\n cudaErrorGraphExecUpdateFailure if the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update.\n\n \\param hGraphExec The instantiated graph to be updated\n \\param hGraph The graph containing the updated parameters\n\\param resultInfo the error info structure\n\n \\return\n ::cudaSuccess,\n ::cudaErrorGraphExecUpdateFailure,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiate"]
    pub fn cudaGraphExecUpdate(
        hGraphExec: cudaGraphExec_t,
        hGraph: cudaGraph_t,
        resultInfo: *mut cudaGraphExecUpdateResultInfo,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGraphUpload(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Launches an executable graph in a stream\n\n Executes \\p graphExec in \\p stream. Only one instance of \\p graphExec may be executing\n at a time. Each launch is ordered behind both any previous work in \\p stream\n and any previous launches of \\p graphExec. To execute a graph concurrently, it must be\n instantiated multiple times into multiple executable graphs.\n\n If any allocations created by \\p graphExec remain unfreed (from a previous launch) and\n \\p graphExec was not instantiated with ::cudaGraphInstantiateFlagAutoFreeOnLaunch,\n the launch will fail with ::cudaErrorInvalidValue.\n\n \\param graphExec - Executable graph to launch\n \\param stream    - Stream in which to launch the graph\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiate,\n ::cudaGraphUpload,\n ::cudaGraphExecDestroy"]
    pub fn cudaGraphLaunch(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys an executable graph\n\n Destroys the executable graph specified by \\p graphExec.\n\n \\param graphExec - Executable graph to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphInstantiate,\n ::cudaGraphUpload,\n ::cudaGraphLaunch"]
    pub fn cudaGraphExecDestroy(graphExec: cudaGraphExec_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Destroys a graph\n\n Destroys the graph specified by \\p graph, as well as all of its nodes.\n\n \\param graph - Graph to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphCreate"]
    pub fn cudaGraphDestroy(graph: cudaGraph_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Write a DOT file describing graph structure\n\n Using the provided \\p graph, write to \\p path a DOT formatted description of the graph.\n By default this includes the graph topology, node types, node id, kernel names and memcpy direction.\n \\p flags can be specified to write more detailed information about each node type such as\n parameter values, kernel attributes, node and function handles.\n\n \\param graph - The graph to create a DOT file from\n \\param path  - The path to write the DOT file to\n \\param flags - Flags from cudaGraphDebugDotFlags for specifying which additional node information to write\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOperatingSystem"]
    pub fn cudaGraphDebugDotPrint(
        graph: cudaGraph_t,
        path: *const ::core::ffi::c_char,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Create a user object\n\n Create a user object with the specified destructor callback and initial reference count. The\n initial references are owned by the caller.\n\n Destructor callbacks cannot make CUDA API calls and should avoid blocking behavior, as they\n are executed by a shared internal thread. Another thread may be signaled to perform such\n actions, if it does not block forward progress of tasks scheduled through CUDA.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param object_out      - Location to return the user object handle\n \\param ptr             - The pointer to pass to the destroy function\n \\param destroy         - Callback to free the user object when it is no longer in use\n \\param initialRefcount - The initial refcount to create the object with, typically 1. The\n                          initial references are owned by the calling thread.\n \\param flags           - Currently it is required to pass ::cudaUserObjectNoDestructorSync,\n                          which is the only defined flag. This indicates that the destroy\n                          callback cannot be waited on by any CUDA API. Users requiring\n                          synchronization of the callback should signal its completion\n                          manually.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectRetain,\n ::cudaUserObjectRelease,\n ::cudaGraphRetainUserObject,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
    pub fn cudaUserObjectCreate(
        object_out: *mut cudaUserObject_t,
        ptr: *mut ::core::ffi::c_void,
        destroy: cudaHostFn_t,
        initialRefcount: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Retain a reference to a user object\n\n Retains new references to a user object. The new references are owned by the caller.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param object - The object to retain\n \\param count  - The number of references to retain, typically 1. Must be nonzero\n                 and not larger than INT_MAX.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate,\n ::cudaUserObjectRelease,\n ::cudaGraphRetainUserObject,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
    pub fn cudaUserObjectRetain(
        object: cudaUserObject_t,
        count: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Release a reference to a user object\n\n Releases user object references owned by the caller. The object's destructor is invoked if\n the reference count reaches zero.\n\n It is undefined behavior to release references not owned by the caller, or to use a user\n object handle after all references are released.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param object - The object to release\n \\param count  - The number of references to release, typically 1. Must be nonzero\n                 and not larger than INT_MAX.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate,\n ::cudaUserObjectRetain,\n ::cudaGraphRetainUserObject,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
    pub fn cudaUserObjectRelease(
        object: cudaUserObject_t,
        count: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Retain a reference to a user object from a graph\n\n Creates or moves user object references that will be owned by a CUDA graph.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param graph  - The graph to associate the reference with\n \\param object - The user object to retain a reference for\n \\param count  - The number of references to add to the graph, typically 1. Must be\n                 nonzero and not larger than INT_MAX.\n \\param flags  - The optional flag ::cudaGraphUserObjectMove transfers references\n                 from the calling thread, rather than create new references. Pass 0\n                 to create new references.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate\n ::cudaUserObjectRetain,\n ::cudaUserObjectRelease,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
    pub fn cudaGraphRetainUserObject(
        graph: cudaGraph_t,
        object: cudaUserObject_t,
        count: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Release a user object reference from a graph\n\n Releases user object references owned by a graph.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param graph  - The graph that will release the reference\n \\param object - The user object to release a reference for\n \\param count  - The number of references to release, typically 1. Must be nonzero\n                 and not larger than INT_MAX.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate\n ::cudaUserObjectRetain,\n ::cudaUserObjectRelease,\n ::cudaGraphRetainUserObject,\n ::cudaGraphCreate"]
    pub fn cudaGraphReleaseUserObject(
        graph: cudaGraph_t,
        object: cudaUserObject_t,
        count: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Adds a node of arbitrary type to a graph\n\n Creates a new node in \\p graph described by \\p nodeParams with \\p numDependencies\n dependencies specified via \\p pDependencies. \\p numDependencies may be 0.\n \\p pDependencies may be null if \\p numDependencies is 0. \\p pDependencies may not have\n any duplicate entries.\n\n \\p nodeParams is a tagged union. The node type should be specified in the \\p type field,\n and type-specific parameters in the corresponding union member. All unused bytes - that\n is, \\p reserved0 and all bytes past the utilized union member - must be set to zero.\n It is recommended to use brace initialization or memset to ensure all bytes are\n initialized.\n\n Note that for some node types, \\p nodeParams may contain \"out parameters\" which are\n modified during the call, such as \\p nodeParams->alloc.dptr.\n\n A handle to the new node will be returned in \\p phGraphNode.\n\n \\param pGraphNode      - Returns newly created node\n \\param graph           - Graph to which to add the node\n \\param pDependencies   - Dependencies of the node\n \\param dependencyData  - Optional edge data for the dependencies. If NULL, the data is\n                          assumed to be default (zeroed) for all dependencies.\n \\param numDependencies - Number of dependencies\n \\param nodeParams      - Specification of the node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphNodeSetParams,\n ::cudaGraphExecNodeSetParams"]
    pub fn cudaGraphAddNode(
        pGraphNode: *mut cudaGraphNode_t,
        graph: cudaGraph_t,
        pDependencies: *const cudaGraphNode_t,
        dependencyData: *const cudaGraphEdgeData,
        numDependencies: usize,
        nodeParams: *mut cudaGraphNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Update's a graph node's parameters\n\n Sets the parameters of graph node \\p node to \\p nodeParams. The node type specified by\n \\p nodeParams->type must match the type of \\p node. \\p nodeParams must be fully\n initialized and all unused bytes (reserved, padding) zeroed.\n\n Modifying parameters is not supported for node types cudaGraphNodeTypeMemAlloc and\n cudaGraphNodeTypeMemFree.\n\n \\param node       - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphExecNodeSetParams"]
    pub fn cudaGraphNodeSetParams(
        node: cudaGraphNode_t,
        nodeParams: *mut cudaGraphNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Update's a graph node's parameters in an instantiated graph\n\n Sets the parameters of a node in an executable graph \\p graphExec. The node is identified\n by the corresponding node \\p node in the non-executable graph from which the executable\n graph was instantiated. \\p node must not have been removed from the original graph.\n\n The modifications only affect future launches of \\p graphExec. Already\n enqueued or running launches of \\p graphExec are not affected by this call.\n \\p node is also not modified by this call.\n\n Allowed changes to parameters on executable graphs are as follows:\n <table>\n   <tr><th>Node type<th>Allowed changes\n   <tr><td>kernel<td>See ::cudaGraphExecKernelNodeSetParams\n   <tr><td>memcpy<td>Addresses for 1-dimensional copies if allocated in same context; see ::cudaGraphExecMemcpyNodeSetParams\n   <tr><td>memset<td>Addresses for 1-dimensional memsets if allocated in same context; see ::cudaGraphExecMemsetNodeSetParams\n   <tr><td>host<td>Unrestricted\n   <tr><td>child graph<td>Topology must match and restrictions apply recursively; see ::cudaGraphExecUpdate\n   <tr><td>event wait<td>Unrestricted\n   <tr><td>event record<td>Unrestricted\n   <tr><td>external semaphore signal<td>Number of semaphore operations cannot change\n   <tr><td>external semaphore wait<td>Number of semaphore operations cannot change\n   <tr><td>memory allocation<td>API unsupported\n   <tr><td>memory free<td>API unsupported\n </table>\n\n \\param graphExec  - The executable graph in which to update the specified node\n \\param node       - Corresponding node from the graph from which graphExec was instantiated\n \\param nodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphNodeSetParams\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
    pub fn cudaGraphExecNodeSetParams(
        graphExec: cudaGraphExec_t,
        node: cudaGraphNode_t,
        nodeParams: *mut cudaGraphNodeParams,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Create a conditional handle\n\n Creates a conditional handle associated with \\p hGraph.\n\n The conditional handle must be associated with a conditional node in this graph or one of its children.\n\n Handles not associated with a conditional node may cause graph instantiation to fail.\n\n \\param pHandle_out        - Pointer used to return the handle to the caller.\n \\param hGraph             - Graph which will contain the conditional node using this handle.\n \\param defaultLaunchValue - Optional initial value for the conditional variable.\n                             Applied at the beginning of each graph execution if cudaGraphCondAssignDefault is set in \\p flags.\n \\param flags              - Currently must be cudaGraphCondAssignDefault or 0.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddNode,"]
    pub fn cudaGraphConditionalHandleCreate(
        pHandle_out: *mut cudaGraphConditionalHandle,
        graph: cudaGraph_t,
        defaultLaunchValue: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGetDriverEntryPoint(
        symbol: *const ::core::ffi::c_char,
        funcPtr: *mut *mut ::core::ffi::c_void,
        flags: ::core::ffi::c_ulonglong,
        driverStatus: *mut cudaDriverEntryPointQueryResult,
    ) -> cudaError_t;
}
unsafe extern "C" {
    pub fn cudaGetDriverEntryPointByVersion(
        symbol: *const ::core::ffi::c_char,
        funcPtr: *mut *mut ::core::ffi::c_void,
        cudaVersion: ::core::ffi::c_uint,
        flags: ::core::ffi::c_ulonglong,
        driverStatus: *mut cudaDriverEntryPointQueryResult,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Load a library with specified code and options\n\n Takes a pointer \\p code and loads the corresponding library \\p library based on\n the application defined library loading mode:\n - If module loading is set to EAGER, via the environment variables described in \"Module loading\",\n   \\p library is loaded eagerly into all contexts at the time of the call and future contexts\n   at the time of creation until the library is unloaded with ::cudaLibraryUnload().\n - If the environment variables are set to LAZY, \\p library\n   is not immediately loaded onto all existent contexts and will only be\n   loaded when a function is needed for that context, such as a kernel launch.\n\n These environment variables are described in the CUDA programming guide under the\n \"CUDA environment variables\" section.\n\n The \\p code may be a \\e cubin or \\e fatbin as output by \\b nvcc,\n or a NULL-terminated \\e PTX, either as output by \\b nvcc or hand-written.\n A fatbin should also contain relocatable code when doing separate compilation.\n Please also see the documentation for nvrtc (https://docs.nvidia.com/cuda/nvrtc/index.html),\n nvjitlink (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin\n (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information on generating\n loadable code at runtime.\n\n Options are passed as an array via \\p jitOptions and any corresponding parameters are passed in\n \\p jitOptionsValues. The number of total JIT options is supplied via \\p numJitOptions.\n Any outputs will be returned via \\p jitOptionsValues.\n\n Library load options are passed as an array via \\p libraryOptions and any corresponding parameters are passed in\n \\p libraryOptionValues. The number of total library load options is supplied via \\p numLibraryOptions.\n\n \\param library             - Returned library\n \\param code                - Code to load\n \\param jitOptions          - Options for JIT\n \\param jitOptionsValues    - Option values for JIT\n \\param numJitOptions       - Number of options\n \\param libraryOptions      - Options for loading\n \\param libraryOptionValues - Option values for loading\n \\param numLibraryOptions   - Number of options for loading\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorInitializationError,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorSharedObjectSymbolNotFound,\n ::cudaErrorSharedObjectInitFailed,\n ::cudaErrorJitCompilerNotFound\n\n \\sa ::cudaLibraryLoadFromFile,\n ::cudaLibraryUnload,\n ::cuLibraryLoadData"]
    pub fn cudaLibraryLoadData(
        library: *mut cudaLibrary_t,
        code: *const ::core::ffi::c_void,
        jitOptions: *mut cudaJitOption,
        jitOptionsValues: *mut *mut ::core::ffi::c_void,
        numJitOptions: ::core::ffi::c_uint,
        libraryOptions: *mut cudaLibraryOption,
        libraryOptionValues: *mut *mut ::core::ffi::c_void,
        numLibraryOptions: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Load a library with specified file and options\n\n Takes a pointer \\p code and loads the corresponding library \\p library based on\n the application defined library loading mode:\n - If module loading is set to EAGER, via the environment variables described in \"Module loading\",\n   \\p library is loaded eagerly into all contexts at the time of the call and future contexts\n   at the time of creation until the library is unloaded with ::cudaLibraryUnload().\n - If the environment variables are set to LAZY, \\p library\n   is not immediately loaded onto all existent contexts and will only be\n   loaded when a function is needed for that context, such as a kernel launch.\n\n These environment variables are described in the CUDA programming guide under the\n \"CUDA environment variables\" section.\n\n The file should be a \\e cubin file as output by \\b nvcc, or a \\e PTX file either\n as output by \\b nvcc or handwritten, or a \\e fatbin file as output by \\b nvcc.\n A fatbin should also contain relocatable code when doing separate compilation.\n Please also see the documentation for nvrtc (https://docs.nvidia.com/cuda/nvrtc/index.html),\n nvjitlink (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin\n (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information on generating\n loadable code at runtime.\n\n Options are passed as an array via \\p jitOptions and any corresponding parameters are\n passed in \\p jitOptionsValues. The number of total options is supplied via \\p numJitOptions.\n Any outputs will be returned via \\p jitOptionsValues.\n\n Library load options are passed as an array via \\p libraryOptions and any corresponding parameters are passed in\n \\p libraryOptionValues. The number of total library load options is supplied via \\p numLibraryOptions.\n\n \\param library             - Returned library\n \\param fileName            - File to load from\n \\param jitOptions          - Options for JIT\n \\param jitOptionsValues    - Option values for JIT\n \\param numJitOptions       - Number of options\n \\param libraryOptions      - Options for loading\n \\param libraryOptionValues - Option values for loading\n \\param numLibraryOptions   - Number of options for loading\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorInitializationError,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorSharedObjectSymbolNotFound,\n ::cudaErrorSharedObjectInitFailed,\n ::cudaErrorJitCompilerNotFound\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryUnload,\n ::cuLibraryLoadFromFile"]
    pub fn cudaLibraryLoadFromFile(
        library: *mut cudaLibrary_t,
        fileName: *const ::core::ffi::c_char,
        jitOptions: *mut cudaJitOption,
        jitOptionsValues: *mut *mut ::core::ffi::c_void,
        numJitOptions: ::core::ffi::c_uint,
        libraryOptions: *mut cudaLibraryOption,
        libraryOptionValues: *mut *mut ::core::ffi::c_void,
        numLibraryOptions: ::core::ffi::c_uint,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Unloads a library\n\n Unloads the library specified with \\p library\n\n \\param library - Library to unload\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryLoadFromFile,\n ::cuLibraryUnload"]
    pub fn cudaLibraryUnload(library: cudaLibrary_t) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a kernel handle\n\n Returns in \\p pKernel the handle of the kernel with name \\p name located in library \\p library.\n If kernel handle is not found, the call returns ::cudaErrorSymbolNotFound.\n\n \\param pKernel - Returned kernel handle\n \\param library - Library to retrieve kernel from\n \\param name - Name of kernel to retrieve\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorSymbolNotFound\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryLoadFromFile,\n ::cudaLibraryUnload,\n ::cuLibraryGetKernel"]
    pub fn cudaLibraryGetKernel(
        pKernel: *mut cudaKernel_t,
        library: cudaLibrary_t,
        name: *const ::core::ffi::c_char,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a global device pointer\n\n Returns in \\p *dptr and \\p *bytes the base pointer and size of the global with\n name \\p name for the requested library \\p library and the current device.\n If no global for the requested name \\p name exists, the call returns ::cudaErrorSymbolNotFound.\n One of the parameters \\p dptr or \\p bytes (not both) can be NULL in which\n case it is ignored. The returned \\p dptr cannot be passed to the Symbol APIs\n such as ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol, ::cudaGetSymbolAddress, or\n ::cudaGetSymbolSize.\n\n \\param dptr - Returned global device pointer for the requested library\n \\param bytes - Returned global size in bytes\n \\param library - Library to retrieve global from\n \\param name - Name of global to retrieve\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorSymbolNotFound\n ::cudaErrorDeviceUninitialized,\n ::cudaErrorContextIsDestroyed\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryLoadFromFile,\n ::cudaLibraryUnload,\n ::cudaLibraryGetManaged,\n ::cuLibraryGetGlobal"]
    pub fn cudaLibraryGetGlobal(
        dptr: *mut *mut ::core::ffi::c_void,
        bytes: *mut usize,
        library: cudaLibrary_t,
        name: *const ::core::ffi::c_char,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a pointer to managed memory\n\n Returns in \\p *dptr and \\p *bytes the base pointer and size of the managed memory with\n name \\p name for the requested library \\p library. If no managed memory with the\n requested name \\p name exists, the call returns ::cudaErrorSymbolNotFound. One of the parameters\n \\p dptr or \\p bytes (not both) can be NULL in which case it is ignored.\n Note that managed memory for library \\p library is shared across devices and is registered\n when the library is loaded. The returned \\p dptr cannot be passed to the Symbol APIs\n such as ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol, ::cudaGetSymbolAddress, or\n ::cudaGetSymbolSize.\n\n \\param dptr - Returned pointer to the managed memory\n \\param bytes - Returned memory size in bytes\n \\param library - Library to retrieve managed memory from\n \\param name - Name of managed memory to retrieve\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorSymbolNotFound\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryLoadFromFile,\n ::cudaLibraryUnload,\n ::cudaLibraryGetGlobal,\n ::cuLibraryGetManaged"]
    pub fn cudaLibraryGetManaged(
        dptr: *mut *mut ::core::ffi::c_void,
        bytes: *mut usize,
        library: cudaLibrary_t,
        name: *const ::core::ffi::c_char,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns a pointer to a unified function\n\n Returns in \\p *fptr the function pointer to a unified function denoted by \\p symbol.\n If no unified function with name \\p symbol exists, the call returns ::cudaErrorSymbolNotFound.\n If there is no device with attribute ::cudaDeviceProp::unifiedFunctionPointers present in the system,\n the call may return ::cudaErrorSymbolNotFound.\n\n \\param fptr - Returned pointer to a unified function\n \\param library - Library to retrieve function pointer memory from\n \\param symbol - Name of function pointer to retrieve\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorSymbolNotFound\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryLoadFromFile,\n ::cudaLibraryUnload,\n ::cuLibraryGetUnifiedFunction"]
    pub fn cudaLibraryGetUnifiedFunction(
        fptr: *mut *mut ::core::ffi::c_void,
        library: cudaLibrary_t,
        symbol: *const ::core::ffi::c_char,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Returns the number of kernels within a library\n\n Returns in \\p count the number of kernels in \\p lib.\n\n \\param count - Number of kernels found within the library\n \\param lib - Library to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n\n \\sa ::cudaLibraryEnumerateKernels,\n ::cudaLibraryLoadFromFile,\n ::cudaLibraryLoadData,\n ::cuLibraryGetKernelCount"]
    pub fn cudaLibraryGetKernelCount(
        count: *mut ::core::ffi::c_uint,
        lib: cudaLibrary_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Retrieve the kernel handles within a library.\n\n Returns in \\p kernels a maximum number of \\p numKernels kernel handles within \\p lib.\n The returned kernel handle becomes invalid when the library is unloaded.\n\n \\param kernels - Buffer where the kernel handles are returned to\n \\param numKernels - Maximum number of kernel handles may be returned to the buffer\n \\param lib - Library to query from\n\n \\return\n ::cudaSuccess,\n ::cudaErrorCudartUnloading,\n ::cudaErrorInitializationError,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n\n \\sa ::cudaLibraryGetKernelCount,\n ::cuLibraryEnumerateKernels"]
    pub fn cudaLibraryEnumerateKernels(
        kernels: *mut cudaKernel_t,
        numKernels: ::core::ffi::c_uint,
        lib: cudaLibrary_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Sets information about a kernel\n\n This call sets the value of a specified attribute \\p attr on the kernel \\p kernel\n for the requested device \\p device to an integer value specified by \\p value.\n This function returns ::cudaSuccess if the new value of the attribute could be\n successfully set. If the set fails, this call will return an error.\n Not all attributes can have values set. Attempting to set a value on a read-only\n attribute will result in an error (::cudaErrorInvalidValue)\n\n Note that attributes set using ::cudaFuncSetAttribute() will override the attribute\n set by this API irrespective of whether the call to ::cudaFuncSetAttribute() is made\n before or after this API call. Because of this and the stricter locking requirements\n mentioned below it is suggested that this call be used during the initialization path\n and not on each thread accessing \\p kernel such as on kernel launches or on the\n critical path.\n\n Valid values for \\p attr are:\n - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes\n   cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture.\n - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources,\n   this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor.\n   This is only a hint, and the driver can choose a different ratio if required to execute the function.\n - ::cudaFuncAttributeRequiredClusterWidth: The required cluster width in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return cudaErrorNotPermitted.\n - ::cudaFuncAttributeRequiredClusterHeight: The required cluster height in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return cudaErrorNotPermitted.\n - ::cudaFuncAttributeRequiredClusterDepth: The required cluster depth in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return cudaErrorNotPermitted.\n - ::cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates whether the\n   function can be launched with non-portable cluster size. 1 is allowed, 0 is\n   disallowed.\n - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block\n   scheduling policy of a function. The value type is cudaClusterSchedulingPolicy.\n\n \\note The API has stricter locking requirements in comparison to its legacy counterpart\n ::cudaFuncSetAttribute() due to device-wide semantics. If multiple threads are trying to\n set the same attribute on the same device simultaneously, the attribute setting will depend\n on the interleavings chosen by the OS scheduler and memory consistency.\n\n \\param kernel  - Kernel to set attribute of\n \\param attr - Attribute requested\n \\param value - Value to set\n \\param device - Device to set attribute of\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue\n\n \\sa ::cudaLibraryLoadData,\n ::cudaLibraryLoadFromFile,\n ::cudaLibraryUnload,\n ::cudaLibraryGetKernel,\n ::cudaLaunchKernel,\n ::cudaFuncSetAttribute,\n ::cuKernelSetAttribute"]
    pub fn cudaKernelSetAttributeForDevice(
        kernel: cudaKernel_t,
        attr: cudaFuncAttribute,
        value: ::core::ffi::c_int,
        device: ::core::ffi::c_int,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\cond impl_private"]
    pub fn cudaGetExportTable(
        ppExportTable: *mut *const ::core::ffi::c_void,
        pExportTableId: *const cudaUUID_t,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Get pointer to device entry function that matches entry function \\p symbolPtr\n\n Returns in \\p functionPtr the device entry function corresponding to the symbol \\p symbolPtr.\n\n \\param functionPtr     - Returns the device entry function\n \\param symbolPtr       - Pointer to device entry function to search for\n\n \\return\n ::cudaSuccess\n"]
    pub fn cudaGetFuncBySymbol(
        functionPtr: *mut cudaFunction_t,
        symbolPtr: *const ::core::ffi::c_void,
    ) -> cudaError_t;
}
unsafe extern "C" {
    #[doc = " \\brief Get pointer to device kernel that matches entry function \\p entryFuncAddr\n\n Returns in \\p kernelPtr the device kernel corresponding to the entry function \\p entryFuncAddr.\n\n Note that it is possible that there are multiple symbols belonging to different\n translation units with the same \\p entryFuncAddr registered with this CUDA Runtime\n and so the order which the translation units are loaded and registered with the\n CUDA Runtime can lead to differing return pointers in \\p kernelPtr .\n Suggested methods of ensuring uniqueness are to limit visibility of __global__\n device functions by using static or hidden visibility attribute in the\n respective translation units.\n\n \\param kernelPtr          - Returns the device kernel\n \\param entryFuncAddr      - Address of device entry function to search kernel for\n\n \\return\n ::cudaSuccess\n\n \\sa\n \\ref ::cudaGetKernel(cudaKernel_t *kernelPtr, const T *entryFuncAddr) \"cudaGetKernel (C++ API)\""]
    pub fn cudaGetKernel(
        kernelPtr: *mut cudaKernel_t,
        entryFuncAddr: *const ::core::ffi::c_void,
    ) -> cudaError_t;
}
