#[allow(unused_imports)]
use crate::objc::*;
#[allow(unused_imports)]
use crate::CoreFoundation::*;
#[allow(unused_imports)]
use crate::CoreGraphics::*;
#[allow(unused_imports)]
use crate::Foundation::*;
#[allow(unused_imports)]
use crate::Metal::*;
#[allow(unused_imports)]
use crate::ModelIO::*;

#[allow(unused_imports)]
use objc2::msg_send;
pub type simd_uchar16 = [::std::os::raw::c_uchar; 16usize];
pub type simd_short2 = [::std::os::raw::c_short; 2usize];
pub type simd_ushort2 = [::std::os::raw::c_ushort; 2usize];
pub type simd_ushort4 = [::std::os::raw::c_ushort; 4usize];
pub type vector_uchar16 = simd_uchar16;
pub type vector_short2 = simd_short2;
pub type vector_ushort2 = simd_ushort2;
pub type vector_ushort4 = simd_ushort4;
pub type MPSKernelOptions = NSUInteger;
pub type MPSImageEdgeMode = NSUInteger;
pub type MPSImageFeatureChannelFormat = NSUInteger;
pub type MPSFloatDataTypeBit = u32;
pub type MPSFloatDataTypeShift = u32;
pub type MPSDataType = u32;
pub type MPSAliasingStrategy = NSUInteger;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSOffset {
    pub x: NSInteger,
    pub y: NSInteger,
    pub z: NSInteger,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSOrigin {
    pub x: f64,
    pub y: f64,
    pub z: f64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSSize {
    pub width: f64,
    pub height: f64,
    pub depth: f64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSDimensionSlice {
    pub start: NSUInteger,
    pub length: NSUInteger,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRegion {
    pub origin: MPSOrigin,
    pub size: MPSSize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSScaleTransform {
    pub scaleX: f64,
    pub scaleY: f64,
    pub translateX: f64,
    pub translateY: f64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageCoordinate {
    pub x: NSUInteger,
    pub y: NSUInteger,
    pub channel: NSUInteger,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageRegion {
    pub offset: MPSImageCoordinate,
    pub size: MPSImageCoordinate,
}
pub trait PMPSDeviceProvider: Sized + std::ops::Deref {
    unsafe fn mpsMTLDevice(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mpsMTLDevice)
    }
}
pub type MPSShape = NSArray;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageDescriptor(pub id);
impl std::ops::Deref for MPSImageDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageDescriptor {}
impl MPSImageDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSImageDescriptor {}
impl INSObject for MPSImageDescriptor {}
impl PNSObject for MPSImageDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSImageDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSImageDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSImageDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSImageDescriptor")
        }
    }
}
impl IMPSImageDescriptor for MPSImageDescriptor {}
pub trait IMPSImageDescriptor: Sized + std::ops::Deref {
    unsafe fn copyWithZone_(&self, zone: *mut NSZone) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone)
    }
    unsafe fn width(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, width)
    }
    unsafe fn setWidth_(&self, width: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWidth : width)
    }
    unsafe fn height(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, height)
    }
    unsafe fn setHeight_(&self, height: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHeight : height)
    }
    unsafe fn featureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, featureChannels)
    }
    unsafe fn setFeatureChannels_(&self, featureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFeatureChannels : featureChannels)
    }
    unsafe fn numberOfImages(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfImages)
    }
    unsafe fn setNumberOfImages_(&self, numberOfImages: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNumberOfImages : numberOfImages)
    }
    unsafe fn pixelFormat(&self) -> MTLPixelFormat
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pixelFormat)
    }
    unsafe fn channelFormat(&self) -> MPSImageFeatureChannelFormat
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, channelFormat)
    }
    unsafe fn setChannelFormat_(&self, channelFormat: MPSImageFeatureChannelFormat)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setChannelFormat : channelFormat)
    }
    unsafe fn cpuCacheMode(&self) -> MTLCPUCacheMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cpuCacheMode)
    }
    unsafe fn setCpuCacheMode_(&self, cpuCacheMode: MTLCPUCacheMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCpuCacheMode : cpuCacheMode)
    }
    unsafe fn storageMode(&self) -> MTLStorageMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, storageMode)
    }
    unsafe fn setStorageMode_(&self, storageMode: MTLStorageMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStorageMode : storageMode)
    }
    unsafe fn usage(&self) -> MTLTextureUsage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, usage)
    }
    unsafe fn setUsage_(&self, usage: MTLTextureUsage)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setUsage : usage)
    }
    unsafe fn imageDescriptorWithChannelFormat_width_height_featureChannels_(
        channelFormat: MPSImageFeatureChannelFormat,
        width: NSUInteger,
        height: NSUInteger,
        featureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageDescriptor").unwrap(), imageDescriptorWithChannelFormat : channelFormat, width : width, height : height, featureChannels : featureChannels)
    }
    unsafe fn imageDescriptorWithChannelFormat_width_height_featureChannels_numberOfImages_usage_(
        channelFormat: MPSImageFeatureChannelFormat,
        width: NSUInteger,
        height: NSUInteger,
        featureChannels: NSUInteger,
        numberOfImages: NSUInteger,
        usage: MTLTextureUsage,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageDescriptor").unwrap(), imageDescriptorWithChannelFormat : channelFormat, width : width, height : height, featureChannels : featureChannels, numberOfImages : numberOfImages, usage : usage)
    }
}
pub type MPSImageBatch = NSArray;
pub trait PMPSImageAllocator: Sized + std::ops::Deref {
    unsafe fn imageForCommandBuffer_imageDescriptor_kernel_(
        &self,
        cmdBuf: *mut u64,
        descriptor: MPSImageDescriptor,
        kernel: MPSKernel,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, imageForCommandBuffer : cmdBuf, imageDescriptor : descriptor, kernel : kernel)
    }
    unsafe fn imageBatchForCommandBuffer_imageDescriptor_kernel_count_(
        &self,
        cmdBuf: *mut u64,
        descriptor: MPSImageDescriptor,
        kernel: MPSKernel,
        count: NSUInteger,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, imageBatchForCommandBuffer : cmdBuf, imageDescriptor : descriptor, kernel : kernel, count : count)
    }
}
pub type MPSPurgeableState = NSUInteger;
pub type MPSDataLayout = NSUInteger;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReadWriteParams {
    pub featureChannelOffset: NSUInteger,
    pub numberOfFeatureChannelsToReadWrite: NSUInteger,
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImage(pub id);
impl std::ops::Deref for MPSImage {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImage {}
impl MPSImage {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImage").unwrap(), alloc) })
    }
}
impl INSObject for MPSImage {}
impl PNSObject for MPSImage {}
impl std::convert::TryFrom<NSObject> for MPSImage {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSImage, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImage").unwrap()) };
        if is_kind_of {
            Ok(MPSImage(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSImage")
        }
    }
}
impl IMPSImage for MPSImage {}
pub trait IMPSImage: Sized + std::ops::Deref {
    unsafe fn initWithDevice_imageDescriptor_(
        &self,
        device: *mut u64,
        imageDescriptor: MPSImageDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, imageDescriptor : imageDescriptor)
    }
    unsafe fn initWithParentImage_sliceRange_featureChannels_(
        &self,
        parent: MPSImage,
        sliceRange: NSRange,
        featureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithParentImage : parent, sliceRange : sliceRange, featureChannels : featureChannels)
    }
    unsafe fn initWithTexture_featureChannels_(
        &self,
        texture: *mut u64,
        featureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithTexture : texture, featureChannels : featureChannels)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn batchRepresentationWithSubRange_(&self, subRange: NSRange) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, batchRepresentationWithSubRange : subRange)
    }
    unsafe fn batchRepresentation(&self) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchRepresentation)
    }
    unsafe fn subImageWithFeatureChannelRange_(&self, range: NSRange) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, subImageWithFeatureChannelRange : range)
    }
    unsafe fn resourceSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resourceSize)
    }
    unsafe fn setPurgeableState_(&self, state: MPSPurgeableState) -> MPSPurgeableState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPurgeableState : state)
    }
    unsafe fn readBytes_dataLayout_bytesPerRow_region_featureChannelInfo_imageIndex_(
        &self,
        dataBytes: *mut ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        bytesPerRow: NSUInteger,
        region: MTLRegion,
        featureChannelInfo: MPSImageReadWriteParams,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, readBytes : dataBytes, dataLayout : dataLayout, bytesPerRow : bytesPerRow, region : region, featureChannelInfo : featureChannelInfo, imageIndex : imageIndex)
    }
    unsafe fn writeBytes_dataLayout_bytesPerRow_region_featureChannelInfo_imageIndex_(
        &self,
        dataBytes: *const ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        bytesPerRow: NSUInteger,
        region: MTLRegion,
        featureChannelInfo: MPSImageReadWriteParams,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, writeBytes : dataBytes, dataLayout : dataLayout, bytesPerRow : bytesPerRow, region : region, featureChannelInfo : featureChannelInfo, imageIndex : imageIndex)
    }
    unsafe fn writeBytes_dataLayout_bytesPerColumn_bytesPerRow_bytesPerImage_region_featureChannelInfo_imageIndex_(
        &self,
        dataBytes: *const ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        bytesPerColumn: NSUInteger,
        bytesPerRow: NSUInteger,
        bytesPerImage: NSUInteger,
        region: MTLRegion,
        featureChannelInfo: MPSImageReadWriteParams,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, writeBytes : dataBytes, dataLayout : dataLayout, bytesPerColumn : bytesPerColumn, bytesPerRow : bytesPerRow, bytesPerImage : bytesPerImage, region : region, featureChannelInfo : featureChannelInfo, imageIndex : imageIndex)
    }
    unsafe fn readBytes_dataLayout_bytesPerRow_bytesPerImage_region_featureChannelInfo_imageIndex_(
        &self,
        dataBytes: *mut ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        bytesPerRow: NSUInteger,
        bytesPerImage: NSUInteger,
        region: MTLRegion,
        featureChannelInfo: MPSImageReadWriteParams,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, readBytes : dataBytes, dataLayout : dataLayout, bytesPerRow : bytesPerRow, bytesPerImage : bytesPerImage, region : region, featureChannelInfo : featureChannelInfo, imageIndex : imageIndex)
    }
    unsafe fn writeBytes_dataLayout_bytesPerRow_bytesPerImage_region_featureChannelInfo_imageIndex_(
        &self,
        dataBytes: *const ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        bytesPerRow: NSUInteger,
        bytesPerImage: NSUInteger,
        region: MTLRegion,
        featureChannelInfo: MPSImageReadWriteParams,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, writeBytes : dataBytes, dataLayout : dataLayout, bytesPerRow : bytesPerRow, bytesPerImage : bytesPerImage, region : region, featureChannelInfo : featureChannelInfo, imageIndex : imageIndex)
    }
    unsafe fn readBytes_dataLayout_imageIndex_(
        &self,
        dataBytes: *mut ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, readBytes : dataBytes, dataLayout : dataLayout, imageIndex : imageIndex)
    }
    unsafe fn writeBytes_dataLayout_imageIndex_(
        &self,
        dataBytes: *const ::std::os::raw::c_void,
        dataLayout: MPSDataLayout,
        imageIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, writeBytes : dataBytes, dataLayout : dataLayout, imageIndex : imageIndex)
    }
    unsafe fn synchronizeOnCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, synchronizeOnCommandBuffer : commandBuffer)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
    unsafe fn width(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, width)
    }
    unsafe fn height(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, height)
    }
    unsafe fn featureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, featureChannels)
    }
    unsafe fn numberOfImages(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfImages)
    }
    unsafe fn textureType(&self) -> MTLTextureType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, textureType)
    }
    unsafe fn pixelFormat(&self) -> MTLPixelFormat
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pixelFormat)
    }
    unsafe fn precision(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, precision)
    }
    unsafe fn usage(&self) -> MTLTextureUsage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, usage)
    }
    unsafe fn featureChannelFormat(&self) -> MPSImageFeatureChannelFormat
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, featureChannelFormat)
    }
    unsafe fn pixelSize(&self) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pixelSize)
    }
    unsafe fn texture(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, texture)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn setLabel_(&self, label: NSString)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabel : label)
    }
    unsafe fn parent(&self) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, parent)
    }
    unsafe fn defaultAllocator() -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImage").unwrap(), defaultAllocator)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSTemporaryImage(pub id);
impl std::ops::Deref for MPSTemporaryImage {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSTemporaryImage {}
impl MPSTemporaryImage {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap(), alloc) })
    }
}
impl IMPSImage for MPSTemporaryImage {}
impl From<MPSTemporaryImage> for MPSImage {
    fn from(child: MPSTemporaryImage) -> MPSImage {
        MPSImage(child.0)
    }
}
impl std::convert::TryFrom<MPSImage> for MPSTemporaryImage {
    type Error = &'static str;
    fn try_from(parent: MPSImage) -> Result<MPSTemporaryImage, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap()) };
        if is_kind_of {
            Ok(MPSTemporaryImage(parent.0))
        } else {
            Err("This MPSImage cannot be downcasted to MPSTemporaryImage")
        }
    }
}
impl INSObject for MPSTemporaryImage {}
impl PNSObject for MPSTemporaryImage {}
impl IMPSTemporaryImage for MPSTemporaryImage {}
pub trait IMPSTemporaryImage: Sized + std::ops::Deref {
    unsafe fn initWithTexture_featureChannels_(
        &self,
        texture: *mut u64,
        featureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithTexture : texture, featureChannels : featureChannels)
    }
    unsafe fn initWithDevice_imageDescriptor_(
        &self,
        device: *mut u64,
        imageDescriptor: MPSImageDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, imageDescriptor : imageDescriptor)
    }
    unsafe fn readCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, readCount)
    }
    unsafe fn setReadCount_(&self, readCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReadCount : readCount)
    }
    unsafe fn defaultAllocator() -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap(), defaultAllocator)
    }
    unsafe fn temporaryImageWithCommandBuffer_imageDescriptor_(
        commandBuffer: *mut u64,
        imageDescriptor: MPSImageDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap(), temporaryImageWithCommandBuffer : commandBuffer, imageDescriptor : imageDescriptor)
    }
    unsafe fn temporaryImageWithCommandBuffer_textureDescriptor_(
        commandBuffer: *mut u64,
        textureDescriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap(), temporaryImageWithCommandBuffer : commandBuffer, textureDescriptor : textureDescriptor)
    }
    unsafe fn temporaryImageWithCommandBuffer_textureDescriptor_featureChannels_(
        commandBuffer: *mut u64,
        textureDescriptor: MTLTextureDescriptor,
        featureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap(), temporaryImageWithCommandBuffer : commandBuffer, textureDescriptor : textureDescriptor, featureChannels : featureChannels)
    }
    unsafe fn prefetchStorageWithCommandBuffer_imageDescriptorList_(
        commandBuffer: *mut u64,
        descriptorList: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryImage").unwrap(), prefetchStorageWithCommandBuffer : commandBuffer, imageDescriptorList : descriptorList)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSPredicate(pub id);
impl std::ops::Deref for MPSPredicate {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSPredicate {}
impl MPSPredicate {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSPredicate").unwrap(), alloc) })
    }
}
impl INSObject for MPSPredicate {}
impl PNSObject for MPSPredicate {}
impl std::convert::TryFrom<NSObject> for MPSPredicate {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSPredicate, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSPredicate").unwrap()) };
        if is_kind_of {
            Ok(MPSPredicate(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSPredicate")
        }
    }
}
impl IMPSPredicate for MPSPredicate {}
pub trait IMPSPredicate: Sized + std::ops::Deref {
    unsafe fn initWithBuffer_offset_(&self, buffer: *mut u64, offset: NSUInteger) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, offset : offset)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn predicateBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, predicateBuffer)
    }
    unsafe fn predicateOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, predicateOffset)
    }
    unsafe fn predicateWithBuffer_offset_(buffer: *mut u64, offset: NSUInteger) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSPredicate").unwrap(), predicateWithBuffer : buffer, offset : offset)
    }
}
pub trait PMPSHeapProvider: Sized + std::ops::Deref {
    unsafe fn newHeapWithDescriptor_(&self, descriptor: MTLHeapDescriptor) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, newHeapWithDescriptor : descriptor)
    }
    unsafe fn retireHeap_cacheDelay_(&self, heap: *mut u64, seconds: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, retireHeap : heap, cacheDelay : seconds)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCommandBuffer(pub id);
impl std::ops::Deref for MPSCommandBuffer {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCommandBuffer {}
impl MPSCommandBuffer {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCommandBuffer").unwrap(), alloc) })
    }
}
impl PMTLCommandBuffer for MPSCommandBuffer {}
impl INSObject for MPSCommandBuffer {}
impl PNSObject for MPSCommandBuffer {}
impl std::convert::TryFrom<NSObject> for MPSCommandBuffer {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSCommandBuffer, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCommandBuffer").unwrap()) };
        if is_kind_of {
            Ok(MPSCommandBuffer(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSCommandBuffer")
        }
    }
}
impl IMPSCommandBuffer for MPSCommandBuffer {}
pub trait IMPSCommandBuffer: Sized + std::ops::Deref {
    unsafe fn initWithCommandBuffer_(&self, commandBuffer: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCommandBuffer : commandBuffer)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn commitAndContinue(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, commitAndContinue)
    }
    unsafe fn prefetchHeapForWorkloadSize_(&self, size: usize)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, prefetchHeapForWorkloadSize : size)
    }
    unsafe fn commandBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, commandBuffer)
    }
    unsafe fn rootCommandBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rootCommandBuffer)
    }
    unsafe fn predicate(&self) -> MPSPredicate
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, predicate)
    }
    unsafe fn setPredicate_(&self, predicate: MPSPredicate)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPredicate : predicate)
    }
    unsafe fn heapProvider(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, heapProvider)
    }
    unsafe fn setHeapProvider_(&self, heapProvider: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHeapProvider : heapProvider)
    }
    unsafe fn commandBufferWithCommandBuffer_(commandBuffer: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCommandBuffer").unwrap(), commandBufferWithCommandBuffer : commandBuffer)
    }
    unsafe fn commandBufferFromCommandQueue_(commandQueue: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCommandBuffer").unwrap(), commandBufferFromCommandQueue : commandQueue)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSKernel(pub id);
impl std::ops::Deref for MPSKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSKernel {}
impl MPSKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKernel").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSKernel {}
impl PNSSecureCoding for MPSKernel {}
impl INSObject for MPSKernel {}
impl PNSObject for MPSKernel {}
impl std::convert::TryFrom<NSObject> for MPSKernel {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSKernel, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSKernel(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSKernel")
        }
    }
}
impl IMPSKernel for MPSKernel {}
pub trait IMPSKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn initWithCoder_(&self, aDecoder: NSCoder) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn options(&self) -> MPSKernelOptions
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, options)
    }
    unsafe fn setOptions_(&self, options: MPSKernelOptions)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOptions : options)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn setLabel_(&self, label: NSString)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabel : label)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixDescriptor(pub id);
impl std::ops::Deref for MPSMatrixDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixDescriptor {}
impl MPSMatrixDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap(), alloc) })
    }
}
impl INSObject for MPSMatrixDescriptor {}
impl PNSObject for MPSMatrixDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSMatrixDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSMatrixDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSMatrixDescriptor")
        }
    }
}
impl IMPSMatrixDescriptor for MPSMatrixDescriptor {}
pub trait IMPSMatrixDescriptor: Sized + std::ops::Deref {
    unsafe fn rows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rows)
    }
    unsafe fn setRows_(&self, rows: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRows : rows)
    }
    unsafe fn columns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, columns)
    }
    unsafe fn setColumns_(&self, columns: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setColumns : columns)
    }
    unsafe fn matrices(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, matrices)
    }
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn setDataType_(&self, dataType: MPSDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDataType : dataType)
    }
    unsafe fn rowBytes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rowBytes)
    }
    unsafe fn setRowBytes_(&self, rowBytes: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRowBytes : rowBytes)
    }
    unsafe fn matrixBytes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, matrixBytes)
    }
    unsafe fn matrixDescriptorWithDimensions_columns_rowBytes_dataType_(
        rows: NSUInteger,
        columns: NSUInteger,
        rowBytes: NSUInteger,
        dataType: MPSDataType,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap(), matrixDescriptorWithDimensions : rows, columns : columns, rowBytes : rowBytes, dataType : dataType)
    }
    unsafe fn matrixDescriptorWithRows_columns_rowBytes_dataType_(
        rows: NSUInteger,
        columns: NSUInteger,
        rowBytes: NSUInteger,
        dataType: MPSDataType,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap(), matrixDescriptorWithRows : rows, columns : columns, rowBytes : rowBytes, dataType : dataType)
    }
    unsafe fn matrixDescriptorWithRows_columns_matrices_rowBytes_matrixBytes_dataType_(
        rows: NSUInteger,
        columns: NSUInteger,
        matrices: NSUInteger,
        rowBytes: NSUInteger,
        matrixBytes: NSUInteger,
        dataType: MPSDataType,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap(), matrixDescriptorWithRows : rows, columns : columns, matrices : matrices, rowBytes : rowBytes, matrixBytes : matrixBytes, dataType : dataType)
    }
    unsafe fn rowBytesFromColumns_dataType_(columns: NSUInteger, dataType: MPSDataType) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap(), rowBytesFromColumns : columns, dataType : dataType)
    }
    unsafe fn rowBytesForColumns_dataType_(columns: NSUInteger, dataType: MPSDataType) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDescriptor").unwrap(), rowBytesForColumns : columns, dataType : dataType)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSVectorDescriptor(pub id);
impl std::ops::Deref for MPSVectorDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSVectorDescriptor {}
impl MPSVectorDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSVectorDescriptor").unwrap(), alloc) })
    }
}
impl INSObject for MPSVectorDescriptor {}
impl PNSObject for MPSVectorDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSVectorDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSVectorDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSVectorDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSVectorDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSVectorDescriptor")
        }
    }
}
impl IMPSVectorDescriptor for MPSVectorDescriptor {}
pub trait IMPSVectorDescriptor: Sized + std::ops::Deref {
    unsafe fn length(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, length)
    }
    unsafe fn setLength_(&self, length: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLength : length)
    }
    unsafe fn vectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vectors)
    }
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn setDataType_(&self, dataType: MPSDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDataType : dataType)
    }
    unsafe fn vectorBytes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vectorBytes)
    }
    unsafe fn vectorDescriptorWithLength_dataType_(
        length: NSUInteger,
        dataType: MPSDataType,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSVectorDescriptor").unwrap(), vectorDescriptorWithLength : length, dataType : dataType)
    }
    unsafe fn vectorDescriptorWithLength_vectors_vectorBytes_dataType_(
        length: NSUInteger,
        vectors: NSUInteger,
        vectorBytes: NSUInteger,
        dataType: MPSDataType,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSVectorDescriptor").unwrap(), vectorDescriptorWithLength : length, vectors : vectors, vectorBytes : vectorBytes, dataType : dataType)
    }
    unsafe fn vectorBytesForLength_dataType_(length: NSUInteger, dataType: MPSDataType) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSVectorDescriptor").unwrap(), vectorBytesForLength : length, dataType : dataType)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrix(pub id);
impl std::ops::Deref for MPSMatrix {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrix {}
impl MPSMatrix {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrix").unwrap(), alloc) })
    }
}
impl INSObject for MPSMatrix {}
impl PNSObject for MPSMatrix {}
impl std::convert::TryFrom<NSObject> for MPSMatrix {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSMatrix, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrix").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrix(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSMatrix")
        }
    }
}
impl IMPSMatrix for MPSMatrix {}
pub trait IMPSMatrix: Sized + std::ops::Deref {
    unsafe fn initWithBuffer_descriptor_(
        &self,
        buffer: *mut u64,
        descriptor: MPSMatrixDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, descriptor : descriptor)
    }
    unsafe fn initWithBuffer_offset_descriptor_(
        &self,
        buffer: *mut u64,
        offset: NSUInteger,
        descriptor: MPSMatrixDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, offset : offset, descriptor : descriptor)
    }
    unsafe fn initWithDevice_descriptor_(
        &self,
        device: *mut u64,
        descriptor: MPSMatrixDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, descriptor : descriptor)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn synchronizeOnCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, synchronizeOnCommandBuffer : commandBuffer)
    }
    unsafe fn resourceSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resourceSize)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
    unsafe fn rows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rows)
    }
    unsafe fn columns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, columns)
    }
    unsafe fn matrices(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, matrices)
    }
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn rowBytes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rowBytes)
    }
    unsafe fn matrixBytes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, matrixBytes)
    }
    unsafe fn offset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, offset)
    }
    unsafe fn data(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, data)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSVector(pub id);
impl std::ops::Deref for MPSVector {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSVector {}
impl MPSVector {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSVector").unwrap(), alloc) })
    }
}
impl INSObject for MPSVector {}
impl PNSObject for MPSVector {}
impl std::convert::TryFrom<NSObject> for MPSVector {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSVector, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSVector").unwrap()) };
        if is_kind_of {
            Ok(MPSVector(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSVector")
        }
    }
}
impl IMPSVector for MPSVector {}
pub trait IMPSVector: Sized + std::ops::Deref {
    unsafe fn initWithBuffer_descriptor_(
        &self,
        buffer: *mut u64,
        descriptor: MPSVectorDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, descriptor : descriptor)
    }
    unsafe fn initWithBuffer_offset_descriptor_(
        &self,
        buffer: *mut u64,
        offset: NSUInteger,
        descriptor: MPSVectorDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, offset : offset, descriptor : descriptor)
    }
    unsafe fn initWithDevice_descriptor_(
        &self,
        device: *mut u64,
        descriptor: MPSVectorDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, descriptor : descriptor)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn synchronizeOnCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, synchronizeOnCommandBuffer : commandBuffer)
    }
    unsafe fn resourceSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resourceSize)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
    unsafe fn length(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, length)
    }
    unsafe fn vectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vectors)
    }
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn vectorBytes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vectorBytes)
    }
    unsafe fn offset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, offset)
    }
    unsafe fn data(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, data)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSTemporaryMatrix(pub id);
impl std::ops::Deref for MPSTemporaryMatrix {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSTemporaryMatrix {}
impl MPSTemporaryMatrix {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryMatrix").unwrap(), alloc) })
    }
}
impl IMPSMatrix for MPSTemporaryMatrix {}
impl From<MPSTemporaryMatrix> for MPSMatrix {
    fn from(child: MPSTemporaryMatrix) -> MPSMatrix {
        MPSMatrix(child.0)
    }
}
impl std::convert::TryFrom<MPSMatrix> for MPSTemporaryMatrix {
    type Error = &'static str;
    fn try_from(parent: MPSMatrix) -> Result<MPSTemporaryMatrix, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSTemporaryMatrix").unwrap()) };
        if is_kind_of {
            Ok(MPSTemporaryMatrix(parent.0))
        } else {
            Err("This MPSMatrix cannot be downcasted to MPSTemporaryMatrix")
        }
    }
}
impl INSObject for MPSTemporaryMatrix {}
impl PNSObject for MPSTemporaryMatrix {}
impl IMPSTemporaryMatrix for MPSTemporaryMatrix {}
pub trait IMPSTemporaryMatrix: Sized + std::ops::Deref {
    unsafe fn initWithBuffer_descriptor_(
        &self,
        buffer: *mut u64,
        descriptor: MPSMatrixDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, descriptor : descriptor)
    }
    unsafe fn readCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, readCount)
    }
    unsafe fn setReadCount_(&self, readCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReadCount : readCount)
    }
    unsafe fn temporaryMatrixWithCommandBuffer_matrixDescriptor_(
        commandBuffer: *mut u64,
        matrixDescriptor: MPSMatrixDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryMatrix").unwrap(), temporaryMatrixWithCommandBuffer : commandBuffer, matrixDescriptor : matrixDescriptor)
    }
    unsafe fn prefetchStorageWithCommandBuffer_matrixDescriptorList_(
        commandBuffer: *mut u64,
        descriptorList: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryMatrix").unwrap(), prefetchStorageWithCommandBuffer : commandBuffer, matrixDescriptorList : descriptorList)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSTemporaryVector(pub id);
impl std::ops::Deref for MPSTemporaryVector {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSTemporaryVector {}
impl MPSTemporaryVector {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryVector").unwrap(), alloc) })
    }
}
impl IMPSVector for MPSTemporaryVector {}
impl From<MPSTemporaryVector> for MPSVector {
    fn from(child: MPSTemporaryVector) -> MPSVector {
        MPSVector(child.0)
    }
}
impl std::convert::TryFrom<MPSVector> for MPSTemporaryVector {
    type Error = &'static str;
    fn try_from(parent: MPSVector) -> Result<MPSTemporaryVector, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSTemporaryVector").unwrap()) };
        if is_kind_of {
            Ok(MPSTemporaryVector(parent.0))
        } else {
            Err("This MPSVector cannot be downcasted to MPSTemporaryVector")
        }
    }
}
impl INSObject for MPSTemporaryVector {}
impl PNSObject for MPSTemporaryVector {}
impl IMPSTemporaryVector for MPSTemporaryVector {}
pub trait IMPSTemporaryVector: Sized + std::ops::Deref {
    unsafe fn initWithBuffer_descriptor_(
        &self,
        buffer: *mut u64,
        descriptor: MPSVectorDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, descriptor : descriptor)
    }
    unsafe fn readCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, readCount)
    }
    unsafe fn setReadCount_(&self, readCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReadCount : readCount)
    }
    unsafe fn temporaryVectorWithCommandBuffer_descriptor_(
        commandBuffer: *mut u64,
        descriptor: MPSVectorDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryVector").unwrap(), temporaryVectorWithCommandBuffer : commandBuffer, descriptor : descriptor)
    }
    unsafe fn prefetchStorageWithCommandBuffer_descriptorList_(
        commandBuffer: *mut u64,
        descriptorList: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryVector").unwrap(), prefetchStorageWithCommandBuffer : commandBuffer, descriptorList : descriptorList)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSStateResourceList(pub id);
impl std::ops::Deref for MPSStateResourceList {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSStateResourceList {}
impl MPSStateResourceList {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSStateResourceList").unwrap(), alloc) })
    }
}
impl INSObject for MPSStateResourceList {}
impl PNSObject for MPSStateResourceList {}
impl std::convert::TryFrom<NSObject> for MPSStateResourceList {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSStateResourceList, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSStateResourceList").unwrap()) };
        if is_kind_of {
            Ok(MPSStateResourceList(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSStateResourceList")
        }
    }
}
impl IMPSStateResourceList for MPSStateResourceList {}
pub trait IMPSStateResourceList: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn appendTexture_(&self, descriptor: MTLTextureDescriptor)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, appendTexture : descriptor)
    }
    unsafe fn appendBuffer_(&self, size: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, appendBuffer : size)
    }
    unsafe fn resourceList() -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSStateResourceList").unwrap(), resourceList)
    }
    unsafe fn resourceListWithTextureDescriptors_(d: MTLTextureDescriptor) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSStateResourceList").unwrap(), resourceListWithTextureDescriptors : d)
    }
    unsafe fn resourceListWithBufferSizes_(firstSize: NSUInteger) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSStateResourceList").unwrap(), resourceListWithBufferSizes : firstSize)
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSStateTextureInfo {
    pub width: NSUInteger,
    pub height: NSUInteger,
    pub depth: NSUInteger,
    pub arrayLength: NSUInteger,
    pub pixelFormat: MTLPixelFormat,
    pub textureType: MTLTextureType,
    pub usage: MTLTextureUsage,
    pub _reserved: [NSUInteger; 4usize],
}
pub type MPSStateResourceType = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSState(pub id);
impl std::ops::Deref for MPSState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSState {}
impl MPSState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSState").unwrap(), alloc) })
    }
}
impl INSObject for MPSState {}
impl PNSObject for MPSState {}
impl std::convert::TryFrom<NSObject> for MPSState {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSState, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSState").unwrap()) };
        if is_kind_of {
            Ok(MPSState(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSState")
        }
    }
}
impl IMPSState for MPSState {}
pub trait IMPSState: Sized + std::ops::Deref {
    unsafe fn initWithDevice_bufferSize_(&self, device: *mut u64, bufferSize: usize) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, bufferSize : bufferSize)
    }
    unsafe fn initWithDevice_textureDescriptor_(
        &self,
        device: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, textureDescriptor : descriptor)
    }
    unsafe fn initWithResource_(&self, resource: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithResource : resource)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDevice_resourceList_(
        &self,
        device: *mut u64,
        resourceList: MPSStateResourceList,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resourceList : resourceList)
    }
    unsafe fn initWithResources_(&self, resources: NSArray) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithResources : resources)
    }
    unsafe fn resourceAtIndex_allocateMemory_(
        &self,
        index: NSUInteger,
        allocateMemory: BOOL,
    ) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resourceAtIndex : index, allocateMemory : allocateMemory)
    }
    unsafe fn bufferSizeAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, bufferSizeAtIndex : index)
    }
    unsafe fn textureInfoAtIndex_(&self, index: NSUInteger) -> MPSStateTextureInfo
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, textureInfoAtIndex : index)
    }
    unsafe fn resourceTypeAtIndex_(&self, index: NSUInteger) -> MPSStateResourceType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resourceTypeAtIndex : index)
    }
    unsafe fn synchronizeOnCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, synchronizeOnCommandBuffer : commandBuffer)
    }
    unsafe fn resourceSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resourceSize)
    }
    unsafe fn destinationImageDescriptorForSourceImages_sourceStates_forKernel_suggestedDescriptor_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
        kernel: MPSKernel,
        inDescriptor: MPSImageDescriptor,
    ) -> MPSImageDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, destinationImageDescriptorForSourceImages : sourceImages, sourceStates : sourceStates, forKernel : kernel, suggestedDescriptor : inDescriptor)
    }
    unsafe fn resourceCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resourceCount)
    }
    unsafe fn readCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, readCount)
    }
    unsafe fn setReadCount_(&self, readCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReadCount : readCount)
    }
    unsafe fn isTemporary(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isTemporary)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn setLabel_(&self, label: NSString)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabel : label)
    }
    unsafe fn resource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resource)
    }
    unsafe fn temporaryStateWithCommandBuffer_bufferSize_(
        cmdBuf: *mut u64,
        bufferSize: usize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, bufferSize : bufferSize)
    }
    unsafe fn temporaryStateWithCommandBuffer_textureDescriptor_(
        cmdBuf: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, textureDescriptor : descriptor)
    }
    unsafe fn temporaryStateWithCommandBuffer_(cmdBuf: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf)
    }
    unsafe fn temporaryStateWithCommandBuffer_resourceList_(
        commandBuffer: *mut u64,
        resourceList: MPSStateResourceList,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSState").unwrap(), temporaryStateWithCommandBuffer : commandBuffer, resourceList : resourceList)
    }
}
pub type MPSStateBatch = NSArray;
pub type MPSDeviceCapsValues = u32;
pub type MPSDeviceCaps = u32;
pub type MPSCustomKernelIndex = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixOffset {
    pub rowOffset: u32,
    pub columnOffset: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntegerDivisionParams {
    pub divisor: u16,
    pub recip: u16,
    pub addend: u16,
    pub shift: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCustomKernelSourceInfo {
    pub kernelOrigin: vector_short2,
    pub kernelPhase: vector_ushort2,
    pub kernelSize: vector_ushort2,
    pub offset: vector_short2,
    pub stride: vector_ushort2,
    pub dilationRate: vector_ushort2,
    pub featureChannelOffset: u16,
    pub featureChannels: u16,
    pub imageArrayOffset: u16,
    pub imageArraySize: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCustomKernelInfo {
    pub clipOrigin: vector_ushort4,
    pub clipSize: vector_ushort4,
    pub destinationFeatureChannels: u16,
    pub destImageArraySize: u16,
    pub sourceImageCount: u16,
    pub threadgroupSize: u16,
    pub subbatchIndex: u16,
    pub subbatchStride: u16,
    pub idiv: MPSIntegerDivisionParams,
}
pub type MPSImageType = u32;
pub type MPSFunctionConstant = i64;
pub type MPSFunctionConstantInMetal = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCustomKernelArgumentCount {
    pub destinationTextureCount: ::std::os::raw::c_ulong,
    pub sourceTextureCount: ::std::os::raw::c_ulong,
    pub broadcastTextureCount: ::std::os::raw::c_ulong,
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSKeyedUnarchiver(pub id);
impl std::ops::Deref for MPSKeyedUnarchiver {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSKeyedUnarchiver {}
impl MPSKeyedUnarchiver {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), alloc) })
    }
}
impl PMPSDeviceProvider for MPSKeyedUnarchiver {}
impl INSKeyedUnarchiver for MPSKeyedUnarchiver {}
impl std::convert::TryFrom<NSKeyedUnarchiver> for MPSKeyedUnarchiver {
    type Error = &'static str;
    fn try_from(parent: NSKeyedUnarchiver) -> Result<MPSKeyedUnarchiver, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap()) };
        if is_kind_of {
            Ok(MPSKeyedUnarchiver(parent.0))
        } else {
            Err("This NSKeyedUnarchiver cannot be downcasted to MPSKeyedUnarchiver")
        }
    }
}
impl INSCoder for MPSKeyedUnarchiver {}
impl INSObject for MPSKeyedUnarchiver {}
impl PNSObject for MPSKeyedUnarchiver {}
impl IMPSKeyedUnarchiver for MPSKeyedUnarchiver {}
pub trait IMPSKeyedUnarchiver: Sized + std::ops::Deref {
    unsafe fn initForReadingFromData_device_error_(
        &self,
        data: NSData,
        device: *mut u64,
        error: *mut NSError,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initForReadingFromData : data, device : device, error : error)
    }
    unsafe fn mpsMTLDevice(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mpsMTLDevice)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initForReadingFromData_error_(
        &self,
        data: NSData,
        error: *mut NSError,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initForReadingFromData : data, error : error)
    }
    unsafe fn initForReadingWithData_(&self, data: NSData) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initForReadingWithData : data)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initForReadingWithData_device_(&self, data: NSData, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initForReadingWithData : data, device : device)
    }
    unsafe fn unarchivedObjectOfClasses_fromData_device_error_(
        classes: NSSet,
        data: NSData,
        device: *mut u64,
        error: *mut NSError,
    ) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchivedObjectOfClasses : classes, fromData : data, device : device, error : error)
    }
    unsafe fn unarchivedObjectOfClass_fromData_device_error_(
        cls: Class,
        data: NSData,
        device: *mut u64,
        error: *mut NSError,
    ) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchivedObjectOfClass : cls, fromData : data, device : device, error : error)
    }
    unsafe fn unarchivedObjectOfClasses_fromData_error_(
        classes: NSSet,
        data: NSData,
        error: *mut NSError,
    ) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchivedObjectOfClasses : classes, fromData : data, error : error)
    }
    unsafe fn unarchivedObjectOfClass_fromData_error_(
        cls: Class,
        data: NSData,
        error: *mut NSError,
    ) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchivedObjectOfClass : cls, fromData : data, error : error)
    }
    unsafe fn unarchiveObjectWithData_(data: NSData) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchiveObjectWithData : data)
    }
    unsafe fn unarchiveObjectWithData_device_(data: NSData, device: *mut u64) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchiveObjectWithData : data, device : device)
    }
    unsafe fn unarchiveTopLevelObjectWithData_error_(data: NSData, error: *mut NSError) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchiveTopLevelObjectWithData : data, error : error)
    }
    unsafe fn unarchiveTopLevelObjectWithData_device_error_(
        data: NSData,
        device: *mut u64,
        error: *mut NSError,
    ) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchiveTopLevelObjectWithData : data, device : device, error : error)
    }
    unsafe fn unarchiveObjectWithFile_(path: NSString) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchiveObjectWithFile : path)
    }
    unsafe fn unarchiveObjectWithFile_device_(path: NSString, device: *mut u64) -> id
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSKeyedUnarchiver").unwrap(), unarchiveObjectWithFile : path, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayDescriptor(pub id);
impl std::ops::Deref for MPSNDArrayDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayDescriptor {}
impl MPSNDArrayDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayDescriptor").unwrap(), alloc) })
    }
}
impl INSObject for MPSNDArrayDescriptor {}
impl PNSObject for MPSNDArrayDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSNDArrayDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNDArrayDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNDArrayDescriptor")
        }
    }
}
impl IMPSNDArrayDescriptor for MPSNDArrayDescriptor {}
pub trait IMPSNDArrayDescriptor: Sized + std::ops::Deref {
    unsafe fn lengthOfDimension_(&self, dimensionIndex: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, lengthOfDimension : dimensionIndex)
    }
    unsafe fn sliceRangeForDimension_(&self, dimensionIndex: NSUInteger) -> MPSDimensionSlice
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, sliceRangeForDimension : dimensionIndex)
    }
    unsafe fn sliceDimension_withSubrange_(
        &self,
        dimensionIndex: NSUInteger,
        subRange: MPSDimensionSlice,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, sliceDimension : dimensionIndex, withSubrange : subRange)
    }
    unsafe fn transposeDimension_withDimension_(
        &self,
        dimensionIndex: NSUInteger,
        dimensionIndex2: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, transposeDimension : dimensionIndex, withDimension : dimensionIndex2)
    }
    unsafe fn permuteWithDimensionOrder_(&self, dimensionOrder: *mut NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, permuteWithDimensionOrder : dimensionOrder)
    }
    unsafe fn dimensionOrder(&self) -> vector_uchar16
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dimensionOrder)
    }
    unsafe fn getShape(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, getShape)
    }
    unsafe fn reshapeWithDimensionCount_dimensionSizes_(
        &self,
        numberOfDimensions: NSUInteger,
        dimensionSizes: *mut NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reshapeWithDimensionCount : numberOfDimensions, dimensionSizes : dimensionSizes)
    }
    unsafe fn reshapeWithShape_(&self, shape: NSArray)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reshapeWithShape : shape)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn setDataType_(&self, dataType: MPSDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDataType : dataType)
    }
    unsafe fn numberOfDimensions(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfDimensions)
    }
    unsafe fn setNumberOfDimensions_(&self, numberOfDimensions: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNumberOfDimensions : numberOfDimensions)
    }
    unsafe fn preferPackedRows(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, preferPackedRows)
    }
    unsafe fn setPreferPackedRows_(&self, preferPackedRows: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPreferPackedRows : preferPackedRows)
    }
    unsafe fn descriptorWithDataType_dimensionCount_dimensionSizes_(
        dataType: MPSDataType,
        numberOfDimensions: NSUInteger,
        dimensionSizes: *mut NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayDescriptor").unwrap(), descriptorWithDataType : dataType, dimensionCount : numberOfDimensions, dimensionSizes : dimensionSizes)
    }
    unsafe fn descriptorWithDataType_shape_(dataType: MPSDataType, shape: NSArray) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayDescriptor").unwrap(), descriptorWithDataType : dataType, shape : shape)
    }
    unsafe fn descriptorWithDataType_dimensionSizes_(
        dataType: MPSDataType,
        dimension0: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayDescriptor").unwrap(), descriptorWithDataType : dataType, dimensionSizes : dimension0)
    }
}
pub trait PMPSNDArrayAllocator: Sized + std::ops::Deref {
    unsafe fn arrayForCommandBuffer_arrayDescriptor_kernel_(
        &self,
        cmdBuf: *mut u64,
        descriptor: MPSNDArrayDescriptor,
        kernel: MPSKernel,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, arrayForCommandBuffer : cmdBuf, arrayDescriptor : descriptor, kernel : kernel)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArray(pub id);
impl std::ops::Deref for MPSNDArray {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArray {}
impl MPSNDArray {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArray").unwrap(), alloc) })
    }
}
impl INSObject for MPSNDArray {}
impl PNSObject for MPSNDArray {}
impl std::convert::TryFrom<NSObject> for MPSNDArray {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNDArray, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArray").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArray(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNDArray")
        }
    }
}
impl IMPSNDArray for MPSNDArray {}
pub trait IMPSNDArray: Sized + std::ops::Deref {
    unsafe fn lengthOfDimension_(&self, dimensionIndex: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, lengthOfDimension : dimensionIndex)
    }
    unsafe fn descriptor(&self) -> MPSNDArrayDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, descriptor)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDevice_descriptor_(
        &self,
        device: *mut u64,
        descriptor: MPSNDArrayDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, descriptor : descriptor)
    }
    unsafe fn initWithDevice_scalar_(&self, device: *mut u64, value: f64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, scalar : value)
    }
    unsafe fn initWithBuffer_offset_descriptor_(
        &self,
        buffer: *mut u64,
        offset: NSUInteger,
        descriptor: MPSNDArrayDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithBuffer : buffer, offset : offset, descriptor : descriptor)
    }
    unsafe fn userBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, userBuffer)
    }
    unsafe fn resourceSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resourceSize)
    }
    unsafe fn arrayViewWithCommandBuffer_descriptor_aliasing_(
        &self,
        cmdBuf: *mut u64,
        descriptor: MPSNDArrayDescriptor,
        aliasing: MPSAliasingStrategy,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, arrayViewWithCommandBuffer : cmdBuf, descriptor : descriptor, aliasing : aliasing)
    }
    unsafe fn arrayViewWithDescriptor_(&self, descriptor: MPSNDArrayDescriptor) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, arrayViewWithDescriptor : descriptor)
    }
    unsafe fn arrayViewWithShape_strides_(&self, shape: NSArray, strides: NSArray) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, arrayViewWithShape : shape, strides : strides)
    }
    unsafe fn arrayViewWithDimensionCount_dimensionSizes_strides_(
        &self,
        numberOfDimensions: NSUInteger,
        dimensionSizes: *const NSUInteger,
        dimStrides: *const NSUInteger,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, arrayViewWithDimensionCount : numberOfDimensions, dimensionSizes : dimensionSizes, strides : dimStrides)
    }
    unsafe fn exportDataWithCommandBuffer_toBuffer_destinationDataType_offset_rowStrides_(
        &self,
        cmdBuf: *mut u64,
        buffer: *mut u64,
        destinationDataType: MPSDataType,
        offset: NSUInteger,
        rowStrides: *mut NSInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, exportDataWithCommandBuffer : cmdBuf, toBuffer : buffer, destinationDataType : destinationDataType, offset : offset, rowStrides : rowStrides)
    }
    unsafe fn importDataWithCommandBuffer_fromBuffer_sourceDataType_offset_rowStrides_(
        &self,
        cmdBuf: *mut u64,
        buffer: *mut u64,
        sourceDataType: MPSDataType,
        offset: NSUInteger,
        rowStrides: *mut NSInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, importDataWithCommandBuffer : cmdBuf, fromBuffer : buffer, sourceDataType : sourceDataType, offset : offset, rowStrides : rowStrides)
    }
    unsafe fn exportDataWithCommandBuffer_toImages_offset_(
        &self,
        cmdBuf: *mut u64,
        images: NSArray,
        offset: MPSImageCoordinate,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, exportDataWithCommandBuffer : cmdBuf, toImages : images, offset : offset)
    }
    unsafe fn importDataWithCommandBuffer_fromImages_offset_(
        &self,
        cmdBuf: *mut u64,
        images: NSArray,
        offset: MPSImageCoordinate,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, importDataWithCommandBuffer : cmdBuf, fromImages : images, offset : offset)
    }
    unsafe fn readBytes_strideBytes_(
        &self,
        buffer: *mut ::std::os::raw::c_void,
        strideBytesPerDimension: *mut NSInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, readBytes : buffer, strideBytes : strideBytesPerDimension)
    }
    unsafe fn writeBytes_strideBytes_(
        &self,
        buffer: *mut ::std::os::raw::c_void,
        strideBytesPerDimension: *mut NSInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, writeBytes : buffer, strideBytes : strideBytesPerDimension)
    }
    unsafe fn synchronizeOnCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, synchronizeOnCommandBuffer : commandBuffer)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn setLabel_(&self, label: NSString)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabel : label)
    }
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn dataTypeSize(&self) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataTypeSize)
    }
    unsafe fn numberOfDimensions(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfDimensions)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
    unsafe fn parent(&self) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, parent)
    }
    unsafe fn defaultAllocator() -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArray").unwrap(), defaultAllocator)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSTemporaryNDArray(pub id);
impl std::ops::Deref for MPSTemporaryNDArray {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSTemporaryNDArray {}
impl MPSTemporaryNDArray {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryNDArray").unwrap(), alloc) })
    }
}
impl IMPSNDArray for MPSTemporaryNDArray {}
impl From<MPSTemporaryNDArray> for MPSNDArray {
    fn from(child: MPSTemporaryNDArray) -> MPSNDArray {
        MPSNDArray(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArray> for MPSTemporaryNDArray {
    type Error = &'static str;
    fn try_from(parent: MPSNDArray) -> Result<MPSTemporaryNDArray, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSTemporaryNDArray").unwrap()) };
        if is_kind_of {
            Ok(MPSTemporaryNDArray(parent.0))
        } else {
            Err("This MPSNDArray cannot be downcasted to MPSTemporaryNDArray")
        }
    }
}
impl INSObject for MPSTemporaryNDArray {}
impl PNSObject for MPSTemporaryNDArray {}
impl IMPSTemporaryNDArray for MPSTemporaryNDArray {}
pub trait IMPSTemporaryNDArray: Sized + std::ops::Deref {
    unsafe fn initWithDevice_descriptor_(
        &self,
        device: *mut u64,
        descriptor: MPSNDArrayDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, descriptor : descriptor)
    }
    unsafe fn readCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, readCount)
    }
    unsafe fn setReadCount_(&self, readCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReadCount : readCount)
    }
    unsafe fn defaultAllocator() -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryNDArray").unwrap(), defaultAllocator)
    }
    unsafe fn temporaryNDArrayWithCommandBuffer_descriptor_(
        commandBuffer: *mut u64,
        descriptor: MPSNDArrayDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporaryNDArray").unwrap(), temporaryNDArrayWithCommandBuffer : commandBuffer, descriptor : descriptor)
    }
}
pub type MPSAlphaType = NSUInteger;
pub type MPSCopyAllocator = *mut ::std::os::raw::c_void;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSUnaryImageKernel(pub id);
impl std::ops::Deref for MPSUnaryImageKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSUnaryImageKernel {}
impl MPSUnaryImageKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSUnaryImageKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSUnaryImageKernel {}
impl PNSCopying for MPSUnaryImageKernel {}
impl PNSSecureCoding for MPSUnaryImageKernel {}
impl From<MPSUnaryImageKernel> for MPSKernel {
    fn from(child: MPSUnaryImageKernel) -> MPSKernel {
        MPSKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSKernel> for MPSUnaryImageKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSUnaryImageKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSUnaryImageKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSUnaryImageKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSUnaryImageKernel")
        }
    }
}
impl INSObject for MPSUnaryImageKernel {}
impl PNSObject for MPSUnaryImageKernel {}
impl IMPSUnaryImageKernel for MPSUnaryImageKernel {}
pub trait IMPSUnaryImageKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_inPlaceTexture_fallbackCopyAllocator_(
        &self,
        commandBuffer: *mut u64,
        texture: *mut *mut u64,
        copyAllocator: MPSCopyAllocator,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inPlaceTexture : texture, fallbackCopyAllocator : copyAllocator)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_destinationTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        destinationTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, destinationTexture : destinationTexture)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationImage : destinationImage)
    }
    unsafe fn sourceRegionForDestinationSize_(&self, destinationSize: MTLSize) -> MPSRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, sourceRegionForDestinationSize : destinationSize)
    }
    unsafe fn offset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, offset)
    }
    unsafe fn setOffset_(&self, offset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOffset : offset)
    }
    unsafe fn clipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRect)
    }
    unsafe fn setClipRect_(&self, clipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRect : clipRect)
    }
    unsafe fn edgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, edgeMode)
    }
    unsafe fn setEdgeMode_(&self, edgeMode: MPSImageEdgeMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEdgeMode : edgeMode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSBinaryImageKernel(pub id);
impl std::ops::Deref for MPSBinaryImageKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSBinaryImageKernel {}
impl MPSBinaryImageKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSBinaryImageKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSBinaryImageKernel {}
impl PNSCopying for MPSBinaryImageKernel {}
impl PNSSecureCoding for MPSBinaryImageKernel {}
impl std::convert::TryFrom<MPSKernel> for MPSBinaryImageKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSBinaryImageKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSBinaryImageKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSBinaryImageKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSBinaryImageKernel")
        }
    }
}
impl INSObject for MPSBinaryImageKernel {}
impl PNSObject for MPSBinaryImageKernel {}
impl IMPSBinaryImageKernel for MPSBinaryImageKernel {}
pub trait IMPSBinaryImageKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_primaryTexture_inPlaceSecondaryTexture_fallbackCopyAllocator_(
        &self,
        commandBuffer: *mut u64,
        primaryTexture: *mut u64,
        inPlaceSecondaryTexture: *mut *mut u64,
        copyAllocator: MPSCopyAllocator,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryTexture : primaryTexture, inPlaceSecondaryTexture : inPlaceSecondaryTexture, fallbackCopyAllocator : copyAllocator)
    }
    unsafe fn encodeToCommandBuffer_inPlacePrimaryTexture_secondaryTexture_fallbackCopyAllocator_(
        &self,
        commandBuffer: *mut u64,
        inPlacePrimaryTexture: *mut *mut u64,
        secondaryTexture: *mut u64,
        copyAllocator: MPSCopyAllocator,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inPlacePrimaryTexture : inPlacePrimaryTexture, secondaryTexture : secondaryTexture, fallbackCopyAllocator : copyAllocator)
    }
    unsafe fn encodeToCommandBuffer_primaryTexture_secondaryTexture_destinationTexture_(
        &self,
        commandBuffer: *mut u64,
        primaryTexture: *mut u64,
        secondaryTexture: *mut u64,
        destinationTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryTexture : primaryTexture, secondaryTexture : secondaryTexture, destinationTexture : destinationTexture)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, destinationImage : destinationImage)
    }
    unsafe fn primarySourceRegionForDestinationSize_(&self, destinationSize: MTLSize) -> MPSRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, primarySourceRegionForDestinationSize : destinationSize)
    }
    unsafe fn secondarySourceRegionForDestinationSize_(&self, destinationSize: MTLSize) -> MPSRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, secondarySourceRegionForDestinationSize : destinationSize)
    }
    unsafe fn primaryOffset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryOffset)
    }
    unsafe fn setPrimaryOffset_(&self, primaryOffset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryOffset : primaryOffset)
    }
    unsafe fn secondaryOffset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryOffset)
    }
    unsafe fn setSecondaryOffset_(&self, secondaryOffset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryOffset : secondaryOffset)
    }
    unsafe fn primaryEdgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryEdgeMode)
    }
    unsafe fn setPrimaryEdgeMode_(&self, primaryEdgeMode: MPSImageEdgeMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryEdgeMode : primaryEdgeMode)
    }
    unsafe fn secondaryEdgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryEdgeMode)
    }
    unsafe fn setSecondaryEdgeMode_(&self, secondaryEdgeMode: MPSImageEdgeMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryEdgeMode : secondaryEdgeMode)
    }
    unsafe fn clipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRect)
    }
    unsafe fn setClipRect_(&self, clipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRect : clipRect)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageConversion(pub id);
impl std::ops::Deref for MPSImageConversion {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageConversion {}
impl MPSImageConversion {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageConversion").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageConversion {}
impl From<MPSImageConversion> for MPSUnaryImageKernel {
    fn from(child: MPSImageConversion) -> MPSUnaryImageKernel {
        MPSUnaryImageKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageConversion {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageConversion, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageConversion").unwrap()) };
        if is_kind_of {
            Ok(MPSImageConversion(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageConversion")
        }
    }
}
impl IMPSKernel for MPSImageConversion {}
impl PNSCopying for MPSImageConversion {}
impl PNSSecureCoding for MPSImageConversion {}
impl INSObject for MPSImageConversion {}
impl PNSObject for MPSImageConversion {}
impl IMPSImageConversion for MPSImageConversion {}
pub trait IMPSImageConversion: Sized + std::ops::Deref {
    unsafe fn initWithDevice_srcAlpha_destAlpha_backgroundColor_conversionInfo_(
        &self,
        device: *mut u64,
        srcAlpha: MPSAlphaType,
        destAlpha: MPSAlphaType,
        backgroundColor: *mut CGFloat,
        conversionInfo: CGColorConversionInfoRef,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, srcAlpha : srcAlpha, destAlpha : destAlpha, backgroundColor : backgroundColor, conversionInfo : conversionInfo)
    }
    unsafe fn sourceAlpha(&self) -> MPSAlphaType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceAlpha)
    }
    unsafe fn destinationAlpha(&self) -> MPSAlphaType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationAlpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageConvolution(pub id);
impl std::ops::Deref for MPSImageConvolution {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageConvolution {}
impl MPSImageConvolution {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageConvolution").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageConvolution {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageConvolution {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageConvolution, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageConvolution").unwrap()) };
        if is_kind_of {
            Ok(MPSImageConvolution(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageConvolution")
        }
    }
}
impl IMPSKernel for MPSImageConvolution {}
impl PNSCopying for MPSImageConvolution {}
impl PNSSecureCoding for MPSImageConvolution {}
impl INSObject for MPSImageConvolution {}
impl PNSObject for MPSImageConvolution {}
impl IMPSImageConvolution for MPSImageConvolution {}
pub trait IMPSImageConvolution: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_weights_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        kernelWeights: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, weights : kernelWeights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageLaplacian(pub id);
impl std::ops::Deref for MPSImageLaplacian {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageLaplacian {}
impl MPSImageLaplacian {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageLaplacian").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageLaplacian {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageLaplacian {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageLaplacian, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageLaplacian").unwrap()) };
        if is_kind_of {
            Ok(MPSImageLaplacian(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageLaplacian")
        }
    }
}
impl IMPSKernel for MPSImageLaplacian {}
impl PNSCopying for MPSImageLaplacian {}
impl PNSSecureCoding for MPSImageLaplacian {}
impl INSObject for MPSImageLaplacian {}
impl PNSObject for MPSImageLaplacian {}
impl IMPSImageLaplacian for MPSImageLaplacian {}
pub trait IMPSImageLaplacian: Sized + std::ops::Deref {
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageBox(pub id);
impl std::ops::Deref for MPSImageBox {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageBox {}
impl MPSImageBox {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageBox").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageBox {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageBox {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageBox, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageBox").unwrap()) };
        if is_kind_of {
            Ok(MPSImageBox(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageBox")
        }
    }
}
impl IMPSKernel for MPSImageBox {}
impl PNSCopying for MPSImageBox {}
impl PNSSecureCoding for MPSImageBox {}
impl INSObject for MPSImageBox {}
impl PNSObject for MPSImageBox {}
impl IMPSImageBox for MPSImageBox {}
pub trait IMPSImageBox: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageTent(pub id);
impl std::ops::Deref for MPSImageTent {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageTent {}
impl MPSImageTent {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageTent").unwrap(), alloc) })
    }
}
impl IMPSImageBox for MPSImageTent {}
impl From<MPSImageTent> for MPSImageBox {
    fn from(child: MPSImageTent) -> MPSImageBox {
        MPSImageBox(child.0)
    }
}
impl std::convert::TryFrom<MPSImageBox> for MPSImageTent {
    type Error = &'static str;
    fn try_from(parent: MPSImageBox) -> Result<MPSImageTent, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageTent").unwrap()) };
        if is_kind_of {
            Ok(MPSImageTent(parent.0))
        } else {
            Err("This MPSImageBox cannot be downcasted to MPSImageTent")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageTent {}
impl IMPSKernel for MPSImageTent {}
impl PNSCopying for MPSImageTent {}
impl PNSSecureCoding for MPSImageTent {}
impl INSObject for MPSImageTent {}
impl PNSObject for MPSImageTent {}
impl IMPSImageTent for MPSImageTent {}
pub trait IMPSImageTent: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageGaussianBlur(pub id);
impl std::ops::Deref for MPSImageGaussianBlur {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageGaussianBlur {}
impl MPSImageGaussianBlur {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageGaussianBlur").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageGaussianBlur {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageGaussianBlur {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageGaussianBlur, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageGaussianBlur").unwrap()) };
        if is_kind_of {
            Ok(MPSImageGaussianBlur(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageGaussianBlur")
        }
    }
}
impl IMPSKernel for MPSImageGaussianBlur {}
impl PNSCopying for MPSImageGaussianBlur {}
impl PNSSecureCoding for MPSImageGaussianBlur {}
impl INSObject for MPSImageGaussianBlur {}
impl PNSObject for MPSImageGaussianBlur {}
impl IMPSImageGaussianBlur for MPSImageGaussianBlur {}
pub trait IMPSImageGaussianBlur: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sigma_(&self, device: *mut u64, sigma: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sigma : sigma)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn sigma(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sigma)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageSobel(pub id);
impl std::ops::Deref for MPSImageSobel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageSobel {}
impl MPSImageSobel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageSobel").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageSobel {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageSobel {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageSobel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageSobel").unwrap()) };
        if is_kind_of {
            Ok(MPSImageSobel(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageSobel")
        }
    }
}
impl IMPSKernel for MPSImageSobel {}
impl PNSCopying for MPSImageSobel {}
impl PNSSecureCoding for MPSImageSobel {}
impl INSObject for MPSImageSobel {}
impl PNSObject for MPSImageSobel {}
impl IMPSImageSobel for MPSImageSobel {}
pub trait IMPSImageSobel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_linearGrayColorTransform_(
        &self,
        device: *mut u64,
        transform: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, linearGrayColorTransform : transform)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn colorTransform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, colorTransform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageCanny(pub id);
impl std::ops::Deref for MPSImageCanny {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageCanny {}
impl MPSImageCanny {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageCanny").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageCanny {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageCanny {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageCanny, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageCanny").unwrap()) };
        if is_kind_of {
            Ok(MPSImageCanny(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageCanny")
        }
    }
}
impl IMPSKernel for MPSImageCanny {}
impl PNSCopying for MPSImageCanny {}
impl PNSSecureCoding for MPSImageCanny {}
impl INSObject for MPSImageCanny {}
impl PNSObject for MPSImageCanny {}
impl IMPSImageCanny for MPSImageCanny {}
pub trait IMPSImageCanny: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_linearToGrayScaleTransform_sigma_(
        &self,
        device: *mut u64,
        transform: *const f32,
        sigma: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, linearToGrayScaleTransform : transform, sigma : sigma)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn colorTransform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, colorTransform)
    }
    unsafe fn sigma(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sigma)
    }
    unsafe fn highThreshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, highThreshold)
    }
    unsafe fn setHighThreshold_(&self, highThreshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHighThreshold : highThreshold)
    }
    unsafe fn lowThreshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lowThreshold)
    }
    unsafe fn setLowThreshold_(&self, lowThreshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLowThreshold : lowThreshold)
    }
    unsafe fn useFastMode(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, useFastMode)
    }
    unsafe fn setUseFastMode_(&self, useFastMode: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setUseFastMode : useFastMode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImagePyramid(pub id);
impl std::ops::Deref for MPSImagePyramid {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImagePyramid {}
impl MPSImagePyramid {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImagePyramid").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImagePyramid {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImagePyramid {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImagePyramid, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImagePyramid").unwrap()) };
        if is_kind_of {
            Ok(MPSImagePyramid(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImagePyramid")
        }
    }
}
impl IMPSKernel for MPSImagePyramid {}
impl PNSCopying for MPSImagePyramid {}
impl PNSSecureCoding for MPSImagePyramid {}
impl INSObject for MPSImagePyramid {}
impl PNSObject for MPSImagePyramid {}
impl IMPSImagePyramid for MPSImagePyramid {}
pub trait IMPSImagePyramid: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_centerWeight_(
        &self,
        device: *mut u64,
        centerWeight: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, centerWeight : centerWeight)
    }
    unsafe fn initWithDevice_kernelWidth_kernelHeight_weights_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        kernelWeights: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, weights : kernelWeights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageGaussianPyramid(pub id);
impl std::ops::Deref for MPSImageGaussianPyramid {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageGaussianPyramid {}
impl MPSImageGaussianPyramid {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageGaussianPyramid").unwrap(), alloc) })
    }
}
impl IMPSImagePyramid for MPSImageGaussianPyramid {}
impl From<MPSImageGaussianPyramid> for MPSImagePyramid {
    fn from(child: MPSImageGaussianPyramid) -> MPSImagePyramid {
        MPSImagePyramid(child.0)
    }
}
impl std::convert::TryFrom<MPSImagePyramid> for MPSImageGaussianPyramid {
    type Error = &'static str;
    fn try_from(parent: MPSImagePyramid) -> Result<MPSImageGaussianPyramid, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageGaussianPyramid").unwrap()) };
        if is_kind_of {
            Ok(MPSImageGaussianPyramid(parent.0))
        } else {
            Err("This MPSImagePyramid cannot be downcasted to MPSImageGaussianPyramid")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageGaussianPyramid {}
impl IMPSKernel for MPSImageGaussianPyramid {}
impl PNSCopying for MPSImageGaussianPyramid {}
impl PNSSecureCoding for MPSImageGaussianPyramid {}
impl INSObject for MPSImageGaussianPyramid {}
impl PNSObject for MPSImageGaussianPyramid {}
impl IMPSImageGaussianPyramid for MPSImageGaussianPyramid {}
pub trait IMPSImageGaussianPyramid: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageLaplacianPyramid(pub id);
impl std::ops::Deref for MPSImageLaplacianPyramid {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageLaplacianPyramid {}
impl MPSImageLaplacianPyramid {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageLaplacianPyramid").unwrap(), alloc) })
    }
}
impl IMPSImagePyramid for MPSImageLaplacianPyramid {}
impl std::convert::TryFrom<MPSImagePyramid> for MPSImageLaplacianPyramid {
    type Error = &'static str;
    fn try_from(parent: MPSImagePyramid) -> Result<MPSImageLaplacianPyramid, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageLaplacianPyramid").unwrap()) };
        if is_kind_of {
            Ok(MPSImageLaplacianPyramid(parent.0))
        } else {
            Err("This MPSImagePyramid cannot be downcasted to MPSImageLaplacianPyramid")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageLaplacianPyramid {}
impl IMPSKernel for MPSImageLaplacianPyramid {}
impl PNSCopying for MPSImageLaplacianPyramid {}
impl PNSSecureCoding for MPSImageLaplacianPyramid {}
impl INSObject for MPSImageLaplacianPyramid {}
impl PNSObject for MPSImageLaplacianPyramid {}
impl IMPSImageLaplacianPyramid for MPSImageLaplacianPyramid {}
pub trait IMPSImageLaplacianPyramid: Sized + std::ops::Deref {
    unsafe fn getLaplacianBias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, getLaplacianBias)
    }
    unsafe fn setLaplacianBias_(&self, laplacianBias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLaplacianBias : laplacianBias)
    }
    unsafe fn getLaplacianScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, getLaplacianScale)
    }
    unsafe fn setLaplacianScale_(&self, laplacianScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLaplacianScale : laplacianScale)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageLaplacianPyramidSubtract(pub id);
impl std::ops::Deref for MPSImageLaplacianPyramidSubtract {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageLaplacianPyramidSubtract {}
impl MPSImageLaplacianPyramidSubtract {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageLaplacianPyramidSubtract").unwrap(), alloc) })
    }
}
impl IMPSImageLaplacianPyramid for MPSImageLaplacianPyramidSubtract {}
impl From<MPSImageLaplacianPyramidSubtract> for MPSImageLaplacianPyramid {
    fn from(child: MPSImageLaplacianPyramidSubtract) -> MPSImageLaplacianPyramid {
        MPSImageLaplacianPyramid(child.0)
    }
}
impl std::convert::TryFrom<MPSImageLaplacianPyramid> for MPSImageLaplacianPyramidSubtract {
    type Error = &'static str;
    fn try_from(
        parent: MPSImageLaplacianPyramid,
    ) -> Result<MPSImageLaplacianPyramidSubtract, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageLaplacianPyramidSubtract").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageLaplacianPyramidSubtract(parent.0))
        } else {
            Err ("This MPSImageLaplacianPyramid cannot be downcasted to MPSImageLaplacianPyramidSubtract" ,)
        }
    }
}
impl IMPSImagePyramid for MPSImageLaplacianPyramidSubtract {}
impl IMPSUnaryImageKernel for MPSImageLaplacianPyramidSubtract {}
impl IMPSKernel for MPSImageLaplacianPyramidSubtract {}
impl PNSCopying for MPSImageLaplacianPyramidSubtract {}
impl PNSSecureCoding for MPSImageLaplacianPyramidSubtract {}
impl INSObject for MPSImageLaplacianPyramidSubtract {}
impl PNSObject for MPSImageLaplacianPyramidSubtract {}
impl IMPSImageLaplacianPyramidSubtract for MPSImageLaplacianPyramidSubtract {}
pub trait IMPSImageLaplacianPyramidSubtract: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageLaplacianPyramidAdd(pub id);
impl std::ops::Deref for MPSImageLaplacianPyramidAdd {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageLaplacianPyramidAdd {}
impl MPSImageLaplacianPyramidAdd {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageLaplacianPyramidAdd").unwrap(), alloc) })
    }
}
impl IMPSImageLaplacianPyramid for MPSImageLaplacianPyramidAdd {}
impl std::convert::TryFrom<MPSImageLaplacianPyramid> for MPSImageLaplacianPyramidAdd {
    type Error = &'static str;
    fn try_from(
        parent: MPSImageLaplacianPyramid,
    ) -> Result<MPSImageLaplacianPyramidAdd, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageLaplacianPyramidAdd").unwrap()) };
        if is_kind_of {
            Ok(MPSImageLaplacianPyramidAdd(parent.0))
        } else {
            Err("This MPSImageLaplacianPyramid cannot be downcasted to MPSImageLaplacianPyramidAdd")
        }
    }
}
impl IMPSImagePyramid for MPSImageLaplacianPyramidAdd {}
impl IMPSUnaryImageKernel for MPSImageLaplacianPyramidAdd {}
impl IMPSKernel for MPSImageLaplacianPyramidAdd {}
impl PNSCopying for MPSImageLaplacianPyramidAdd {}
impl PNSSecureCoding for MPSImageLaplacianPyramidAdd {}
impl INSObject for MPSImageLaplacianPyramidAdd {}
impl PNSObject for MPSImageLaplacianPyramidAdd {}
impl IMPSImageLaplacianPyramidAdd for MPSImageLaplacianPyramidAdd {}
pub trait IMPSImageLaplacianPyramidAdd: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixUnaryKernel(pub id);
impl std::ops::Deref for MPSMatrixUnaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixUnaryKernel {}
impl MPSMatrixUnaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixUnaryKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixUnaryKernel {}
impl PNSCopying for MPSMatrixUnaryKernel {}
impl PNSSecureCoding for MPSMatrixUnaryKernel {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixUnaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixUnaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixUnaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixUnaryKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixUnaryKernel")
        }
    }
}
impl INSObject for MPSMatrixUnaryKernel {}
impl PNSObject for MPSMatrixUnaryKernel {}
impl IMPSMatrixUnaryKernel for MPSMatrixUnaryKernel {}
pub trait IMPSMatrixUnaryKernel: Sized + std::ops::Deref {
    unsafe fn sourceMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceMatrixOrigin)
    }
    unsafe fn setSourceMatrixOrigin_(&self, sourceMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceMatrixOrigin : sourceMatrixOrigin)
    }
    unsafe fn resultMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultMatrixOrigin)
    }
    unsafe fn setResultMatrixOrigin_(&self, resultMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setResultMatrixOrigin : resultMatrixOrigin)
    }
    unsafe fn batchStart(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchStart)
    }
    unsafe fn setBatchStart_(&self, batchStart: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchStart : batchStart)
    }
    unsafe fn batchSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchSize)
    }
    unsafe fn setBatchSize_(&self, batchSize: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchSize : batchSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixBinaryKernel(pub id);
impl std::ops::Deref for MPSMatrixBinaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixBinaryKernel {}
impl MPSMatrixBinaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixBinaryKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixBinaryKernel {}
impl PNSCopying for MPSMatrixBinaryKernel {}
impl PNSSecureCoding for MPSMatrixBinaryKernel {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixBinaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixBinaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixBinaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixBinaryKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixBinaryKernel")
        }
    }
}
impl INSObject for MPSMatrixBinaryKernel {}
impl PNSObject for MPSMatrixBinaryKernel {}
impl IMPSMatrixBinaryKernel for MPSMatrixBinaryKernel {}
pub trait IMPSMatrixBinaryKernel: Sized + std::ops::Deref {
    unsafe fn primarySourceMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primarySourceMatrixOrigin)
    }
    unsafe fn setPrimarySourceMatrixOrigin_(&self, primarySourceMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimarySourceMatrixOrigin : primarySourceMatrixOrigin)
    }
    unsafe fn secondarySourceMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondarySourceMatrixOrigin)
    }
    unsafe fn setSecondarySourceMatrixOrigin_(&self, secondarySourceMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondarySourceMatrixOrigin : secondarySourceMatrixOrigin)
    }
    unsafe fn resultMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultMatrixOrigin)
    }
    unsafe fn setResultMatrixOrigin_(&self, resultMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setResultMatrixOrigin : resultMatrixOrigin)
    }
    unsafe fn batchStart(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchStart)
    }
    unsafe fn setBatchStart_(&self, batchStart: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchStart : batchStart)
    }
    unsafe fn batchSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchSize)
    }
    unsafe fn setBatchSize_(&self, batchSize: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchSize : batchSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixMultiplication(pub id);
impl std::ops::Deref for MPSMatrixMultiplication {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixMultiplication {}
impl MPSMatrixMultiplication {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixMultiplication").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixMultiplication {}
impl PNSCopying for MPSMatrixMultiplication {}
impl PNSSecureCoding for MPSMatrixMultiplication {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixMultiplication {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixMultiplication, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixMultiplication").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixMultiplication(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixMultiplication")
        }
    }
}
impl INSObject for MPSMatrixMultiplication {}
impl PNSObject for MPSMatrixMultiplication {}
impl IMPSMatrixMultiplication for MPSMatrixMultiplication {}
pub trait IMPSMatrixMultiplication: Sized + std::ops::Deref {
    unsafe fn initWithDevice_transposeLeft_transposeRight_resultRows_resultColumns_interiorColumns_alpha_beta_(
        &self,
        device: *mut u64,
        transposeLeft: BOOL,
        transposeRight: BOOL,
        resultRows: NSUInteger,
        resultColumns: NSUInteger,
        interiorColumns: NSUInteger,
        alpha: f64,
        beta: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, transposeLeft : transposeLeft, transposeRight : transposeRight, resultRows : resultRows, resultColumns : resultColumns, interiorColumns : interiorColumns, alpha : alpha, beta : beta)
    }
    unsafe fn initWithDevice_resultRows_resultColumns_interiorColumns_(
        &self,
        device: *mut u64,
        resultRows: NSUInteger,
        resultColumns: NSUInteger,
        interiorColumns: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resultRows : resultRows, resultColumns : resultColumns, interiorColumns : interiorColumns)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_leftMatrix_rightMatrix_resultMatrix_(
        &self,
        commandBuffer: *mut u64,
        leftMatrix: MPSMatrix,
        rightMatrix: MPSMatrix,
        resultMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, leftMatrix : leftMatrix, rightMatrix : rightMatrix, resultMatrix : resultMatrix)
    }
    unsafe fn resultMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultMatrixOrigin)
    }
    unsafe fn setResultMatrixOrigin_(&self, resultMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setResultMatrixOrigin : resultMatrixOrigin)
    }
    unsafe fn leftMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, leftMatrixOrigin)
    }
    unsafe fn setLeftMatrixOrigin_(&self, leftMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLeftMatrixOrigin : leftMatrixOrigin)
    }
    unsafe fn rightMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rightMatrixOrigin)
    }
    unsafe fn setRightMatrixOrigin_(&self, rightMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRightMatrixOrigin : rightMatrixOrigin)
    }
    unsafe fn batchStart(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchStart)
    }
    unsafe fn setBatchStart_(&self, batchStart: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchStart : batchStart)
    }
    unsafe fn batchSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchSize)
    }
    unsafe fn setBatchSize_(&self, batchSize: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchSize : batchSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixVectorMultiplication(pub id);
impl std::ops::Deref for MPSMatrixVectorMultiplication {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixVectorMultiplication {}
impl MPSMatrixVectorMultiplication {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixVectorMultiplication").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixVectorMultiplication {}
impl From<MPSMatrixVectorMultiplication> for MPSMatrixBinaryKernel {
    fn from(child: MPSMatrixVectorMultiplication) -> MPSMatrixBinaryKernel {
        MPSMatrixBinaryKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixVectorMultiplication {
    type Error = &'static str;
    fn try_from(
        parent: MPSMatrixBinaryKernel,
    ) -> Result<MPSMatrixVectorMultiplication, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixVectorMultiplication").unwrap())
        };
        if is_kind_of {
            Ok(MPSMatrixVectorMultiplication(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixVectorMultiplication")
        }
    }
}
impl IMPSKernel for MPSMatrixVectorMultiplication {}
impl PNSCopying for MPSMatrixVectorMultiplication {}
impl PNSSecureCoding for MPSMatrixVectorMultiplication {}
impl INSObject for MPSMatrixVectorMultiplication {}
impl PNSObject for MPSMatrixVectorMultiplication {}
impl IMPSMatrixVectorMultiplication for MPSMatrixVectorMultiplication {}
pub trait IMPSMatrixVectorMultiplication: Sized + std::ops::Deref {
    unsafe fn initWithDevice_transpose_rows_columns_alpha_beta_(
        &self,
        device: *mut u64,
        transpose: BOOL,
        rows: NSUInteger,
        columns: NSUInteger,
        alpha: f64,
        beta: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, transpose : transpose, rows : rows, columns : columns, alpha : alpha, beta : beta)
    }
    unsafe fn initWithDevice_rows_columns_(
        &self,
        device: *mut u64,
        rows: NSUInteger,
        columns: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rows : rows, columns : columns)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_inputMatrix_inputVector_resultVector_(
        &self,
        commandBuffer: *mut u64,
        inputMatrix: MPSMatrix,
        inputVector: MPSVector,
        resultVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputMatrix : inputMatrix, inputVector : inputVector, resultVector : resultVector)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixSolveTriangular(pub id);
impl std::ops::Deref for MPSMatrixSolveTriangular {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixSolveTriangular {}
impl MPSMatrixSolveTriangular {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixSolveTriangular").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixSolveTriangular {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixSolveTriangular {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixBinaryKernel) -> Result<MPSMatrixSolveTriangular, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixSolveTriangular").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixSolveTriangular(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixSolveTriangular")
        }
    }
}
impl IMPSKernel for MPSMatrixSolveTriangular {}
impl PNSCopying for MPSMatrixSolveTriangular {}
impl PNSSecureCoding for MPSMatrixSolveTriangular {}
impl INSObject for MPSMatrixSolveTriangular {}
impl PNSObject for MPSMatrixSolveTriangular {}
impl IMPSMatrixSolveTriangular for MPSMatrixSolveTriangular {}
pub trait IMPSMatrixSolveTriangular: Sized + std::ops::Deref {
    unsafe fn initWithDevice_right_upper_transpose_unit_order_numberOfRightHandSides_alpha_(
        &self,
        device: *mut u64,
        right: BOOL,
        upper: BOOL,
        transpose: BOOL,
        unit: BOOL,
        order: NSUInteger,
        numberOfRightHandSides: NSUInteger,
        alpha: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, right : right, upper : upper, transpose : transpose, unit : unit, order : order, numberOfRightHandSides : numberOfRightHandSides, alpha : alpha)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrix_rightHandSideMatrix_solutionMatrix_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        rightHandSideMatrix: MPSMatrix,
        solutionMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, rightHandSideMatrix : rightHandSideMatrix, solutionMatrix : solutionMatrix)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixSolveLU(pub id);
impl std::ops::Deref for MPSMatrixSolveLU {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixSolveLU {}
impl MPSMatrixSolveLU {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixSolveLU").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixSolveLU {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixSolveLU {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixBinaryKernel) -> Result<MPSMatrixSolveLU, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixSolveLU").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixSolveLU(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixSolveLU")
        }
    }
}
impl IMPSKernel for MPSMatrixSolveLU {}
impl PNSCopying for MPSMatrixSolveLU {}
impl PNSSecureCoding for MPSMatrixSolveLU {}
impl INSObject for MPSMatrixSolveLU {}
impl PNSObject for MPSMatrixSolveLU {}
impl IMPSMatrixSolveLU for MPSMatrixSolveLU {}
pub trait IMPSMatrixSolveLU: Sized + std::ops::Deref {
    unsafe fn initWithDevice_transpose_order_numberOfRightHandSides_(
        &self,
        device: *mut u64,
        transpose: BOOL,
        order: NSUInteger,
        numberOfRightHandSides: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, transpose : transpose, order : order, numberOfRightHandSides : numberOfRightHandSides)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrix_rightHandSideMatrix_pivotIndices_solutionMatrix_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        rightHandSideMatrix: MPSMatrix,
        pivotIndices: MPSMatrix,
        solutionMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, rightHandSideMatrix : rightHandSideMatrix, pivotIndices : pivotIndices, solutionMatrix : solutionMatrix)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixSolveCholesky(pub id);
impl std::ops::Deref for MPSMatrixSolveCholesky {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixSolveCholesky {}
impl MPSMatrixSolveCholesky {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixSolveCholesky").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixSolveCholesky {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixSolveCholesky {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixBinaryKernel) -> Result<MPSMatrixSolveCholesky, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixSolveCholesky").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixSolveCholesky(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixSolveCholesky")
        }
    }
}
impl IMPSKernel for MPSMatrixSolveCholesky {}
impl PNSCopying for MPSMatrixSolveCholesky {}
impl PNSSecureCoding for MPSMatrixSolveCholesky {}
impl INSObject for MPSMatrixSolveCholesky {}
impl PNSObject for MPSMatrixSolveCholesky {}
impl IMPSMatrixSolveCholesky for MPSMatrixSolveCholesky {}
pub trait IMPSMatrixSolveCholesky: Sized + std::ops::Deref {
    unsafe fn initWithDevice_upper_order_numberOfRightHandSides_(
        &self,
        device: *mut u64,
        upper: BOOL,
        order: NSUInteger,
        numberOfRightHandSides: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, upper : upper, order : order, numberOfRightHandSides : numberOfRightHandSides)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrix_rightHandSideMatrix_solutionMatrix_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        rightHandSideMatrix: MPSMatrix,
        solutionMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, rightHandSideMatrix : rightHandSideMatrix, solutionMatrix : solutionMatrix)
    }
}
pub type MPSMatrixDecompositionStatus = ::std::os::raw::c_int;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixDecompositionLU(pub id);
impl std::ops::Deref for MPSMatrixDecompositionLU {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixDecompositionLU {}
impl MPSMatrixDecompositionLU {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDecompositionLU").unwrap(), alloc) })
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixDecompositionLU {}
impl From<MPSMatrixDecompositionLU> for MPSMatrixUnaryKernel {
    fn from(child: MPSMatrixDecompositionLU) -> MPSMatrixUnaryKernel {
        MPSMatrixUnaryKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSMatrixUnaryKernel> for MPSMatrixDecompositionLU {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixUnaryKernel) -> Result<MPSMatrixDecompositionLU, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixDecompositionLU").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixDecompositionLU(parent.0))
        } else {
            Err("This MPSMatrixUnaryKernel cannot be downcasted to MPSMatrixDecompositionLU")
        }
    }
}
impl IMPSKernel for MPSMatrixDecompositionLU {}
impl PNSCopying for MPSMatrixDecompositionLU {}
impl PNSSecureCoding for MPSMatrixDecompositionLU {}
impl INSObject for MPSMatrixDecompositionLU {}
impl PNSObject for MPSMatrixDecompositionLU {}
impl IMPSMatrixDecompositionLU for MPSMatrixDecompositionLU {}
pub trait IMPSMatrixDecompositionLU: Sized + std::ops::Deref {
    unsafe fn initWithDevice_rows_columns_(
        &self,
        device: *mut u64,
        rows: NSUInteger,
        columns: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rows : rows, columns : columns)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrix_resultMatrix_pivotIndices_status_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        resultMatrix: MPSMatrix,
        pivotIndices: MPSMatrix,
        status: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, resultMatrix : resultMatrix, pivotIndices : pivotIndices, status : status)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixDecompositionCholesky(pub id);
impl std::ops::Deref for MPSMatrixDecompositionCholesky {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixDecompositionCholesky {}
impl MPSMatrixDecompositionCholesky {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixDecompositionCholesky").unwrap(), alloc) })
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixDecompositionCholesky {}
impl std::convert::TryFrom<MPSMatrixUnaryKernel> for MPSMatrixDecompositionCholesky {
    type Error = &'static str;
    fn try_from(
        parent: MPSMatrixUnaryKernel,
    ) -> Result<MPSMatrixDecompositionCholesky, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixDecompositionCholesky").unwrap())
        };
        if is_kind_of {
            Ok(MPSMatrixDecompositionCholesky(parent.0))
        } else {
            Err("This MPSMatrixUnaryKernel cannot be downcasted to MPSMatrixDecompositionCholesky")
        }
    }
}
impl IMPSKernel for MPSMatrixDecompositionCholesky {}
impl PNSCopying for MPSMatrixDecompositionCholesky {}
impl PNSSecureCoding for MPSMatrixDecompositionCholesky {}
impl INSObject for MPSMatrixDecompositionCholesky {}
impl PNSObject for MPSMatrixDecompositionCholesky {}
impl IMPSMatrixDecompositionCholesky for MPSMatrixDecompositionCholesky {}
pub trait IMPSMatrixDecompositionCholesky: Sized + std::ops::Deref {
    unsafe fn initWithDevice_lower_order_(
        &self,
        device: *mut u64,
        lower: BOOL,
        order: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lower : lower, order : order)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrix_resultMatrix_status_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        resultMatrix: MPSMatrix,
        status: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, resultMatrix : resultMatrix, status : status)
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixCopyOffsets {
    pub sourceRowOffset: u32,
    pub sourceColumnOffset: u32,
    pub destinationRowOffset: u32,
    pub destinationColumnOffset: u32,
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixCopyDescriptor(pub id);
impl std::ops::Deref for MPSMatrixCopyDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixCopyDescriptor {}
impl MPSMatrixCopyDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixCopyDescriptor").unwrap(), alloc) })
    }
}
impl INSObject for MPSMatrixCopyDescriptor {}
impl PNSObject for MPSMatrixCopyDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSMatrixCopyDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSMatrixCopyDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixCopyDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixCopyDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSMatrixCopyDescriptor")
        }
    }
}
impl IMPSMatrixCopyDescriptor for MPSMatrixCopyDescriptor {}
pub trait IMPSMatrixCopyDescriptor: Sized + std::ops::Deref {
    unsafe fn initWithDevice_count_(&self, device: *mut u64, count: NSUInteger) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, count : count)
    }
    unsafe fn setCopyOperationAtIndex_sourceMatrix_destinationMatrix_offsets_(
        &self,
        index: NSUInteger,
        sourceMatrix: MPSMatrix,
        destinationMatrix: MPSMatrix,
        offsets: MPSMatrixCopyOffsets,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCopyOperationAtIndex : index, sourceMatrix : sourceMatrix, destinationMatrix : destinationMatrix, offsets : offsets)
    }
    unsafe fn initWithSourceMatrices_destinationMatrices_offsetVector_offset_(
        &self,
        sourceMatrices: NSArray,
        destinationMatrices: NSArray,
        offsets: MPSVector,
        byteOffset: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceMatrices : sourceMatrices, destinationMatrices : destinationMatrices, offsetVector : offsets, offset : byteOffset)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn descriptorWithSourceMatrix_destinationMatrix_offsets_(
        sourceMatrix: MPSMatrix,
        destinationMatrix: MPSMatrix,
        offsets: MPSMatrixCopyOffsets,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixCopyDescriptor").unwrap(), descriptorWithSourceMatrix : sourceMatrix, destinationMatrix : destinationMatrix, offsets : offsets)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixCopy(pub id);
impl std::ops::Deref for MPSMatrixCopy {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixCopy {}
impl MPSMatrixCopy {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixCopy").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixCopy {}
impl PNSCopying for MPSMatrixCopy {}
impl PNSSecureCoding for MPSMatrixCopy {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixCopy {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixCopy, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixCopy").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixCopy(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixCopy")
        }
    }
}
impl INSObject for MPSMatrixCopy {}
impl PNSObject for MPSMatrixCopy {}
impl IMPSMatrixCopy for MPSMatrixCopy {}
pub trait IMPSMatrixCopy: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_copyRows_copyColumns_sourcesAreTransposed_destinationsAreTransposed_(
        &self,
        device: *mut u64,
        copyRows: NSUInteger,
        copyColumns: NSUInteger,
        sourcesAreTransposed: BOOL,
        destinationsAreTransposed: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, copyRows : copyRows, copyColumns : copyColumns, sourcesAreTransposed : sourcesAreTransposed, destinationsAreTransposed : destinationsAreTransposed)
    }
    unsafe fn encodeToCommandBuffer_copyDescriptor_(
        &self,
        commandBuffer: *mut u64,
        copyDescriptor: MPSMatrixCopyDescriptor,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, copyDescriptor : copyDescriptor)
    }
    unsafe fn encodeToCommandBuffer_copyDescriptor_rowPermuteIndices_rowPermuteOffset_columnPermuteIndices_columnPermuteOffset_(
        &self,
        commandBuffer: *mut u64,
        copyDescriptor: MPSMatrixCopyDescriptor,
        rowPermuteIndices: MPSVector,
        rowPermuteOffset: NSUInteger,
        columnPermuteIndices: MPSVector,
        columnPermuteOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, copyDescriptor : copyDescriptor, rowPermuteIndices : rowPermuteIndices, rowPermuteOffset : rowPermuteOffset, columnPermuteIndices : columnPermuteIndices, columnPermuteOffset : columnPermuteOffset)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyRows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, copyRows)
    }
    unsafe fn copyColumns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, copyColumns)
    }
    unsafe fn sourcesAreTransposed(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourcesAreTransposed)
    }
    unsafe fn destinationsAreTransposed(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationsAreTransposed)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixSoftMax(pub id);
impl std::ops::Deref for MPSMatrixSoftMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixSoftMax {}
impl MPSMatrixSoftMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixSoftMax").unwrap(), alloc) })
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixSoftMax {}
impl std::convert::TryFrom<MPSMatrixUnaryKernel> for MPSMatrixSoftMax {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixUnaryKernel) -> Result<MPSMatrixSoftMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixSoftMax").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixSoftMax(parent.0))
        } else {
            Err("This MPSMatrixUnaryKernel cannot be downcasted to MPSMatrixSoftMax")
        }
    }
}
impl IMPSKernel for MPSMatrixSoftMax {}
impl PNSCopying for MPSMatrixSoftMax {}
impl PNSSecureCoding for MPSMatrixSoftMax {}
impl INSObject for MPSMatrixSoftMax {}
impl PNSObject for MPSMatrixSoftMax {}
impl IMPSMatrixSoftMax for MPSMatrixSoftMax {}
pub trait IMPSMatrixSoftMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_inputMatrix_resultMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputMatrix: MPSMatrix,
        resultMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputMatrix : inputMatrix, resultMatrix : resultMatrix)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceRows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceRows)
    }
    unsafe fn setSourceRows_(&self, sourceRows: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceRows : sourceRows)
    }
    unsafe fn sourceColumns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceColumns)
    }
    unsafe fn setSourceColumns_(&self, sourceColumns: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceColumns : sourceColumns)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixLogSoftMax(pub id);
impl std::ops::Deref for MPSMatrixLogSoftMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixLogSoftMax {}
impl MPSMatrixLogSoftMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixLogSoftMax").unwrap(), alloc) })
    }
}
impl IMPSMatrixSoftMax for MPSMatrixLogSoftMax {}
impl From<MPSMatrixLogSoftMax> for MPSMatrixSoftMax {
    fn from(child: MPSMatrixLogSoftMax) -> MPSMatrixSoftMax {
        MPSMatrixSoftMax(child.0)
    }
}
impl std::convert::TryFrom<MPSMatrixSoftMax> for MPSMatrixLogSoftMax {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixSoftMax) -> Result<MPSMatrixLogSoftMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixLogSoftMax").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixLogSoftMax(parent.0))
        } else {
            Err("This MPSMatrixSoftMax cannot be downcasted to MPSMatrixLogSoftMax")
        }
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixLogSoftMax {}
impl IMPSKernel for MPSMatrixLogSoftMax {}
impl PNSCopying for MPSMatrixLogSoftMax {}
impl PNSSecureCoding for MPSMatrixLogSoftMax {}
impl INSObject for MPSMatrixLogSoftMax {}
impl PNSObject for MPSMatrixLogSoftMax {}
impl IMPSMatrixLogSoftMax for MPSMatrixLogSoftMax {}
pub trait IMPSMatrixLogSoftMax: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixSoftMaxGradient(pub id);
impl std::ops::Deref for MPSMatrixSoftMaxGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixSoftMaxGradient {}
impl MPSMatrixSoftMaxGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixSoftMaxGradient").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixSoftMaxGradient {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixSoftMaxGradient {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixBinaryKernel) -> Result<MPSMatrixSoftMaxGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixSoftMaxGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixSoftMaxGradient(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixSoftMaxGradient")
        }
    }
}
impl IMPSKernel for MPSMatrixSoftMaxGradient {}
impl PNSCopying for MPSMatrixSoftMaxGradient {}
impl PNSSecureCoding for MPSMatrixSoftMaxGradient {}
impl INSObject for MPSMatrixSoftMaxGradient {}
impl PNSObject for MPSMatrixSoftMaxGradient {}
impl IMPSMatrixSoftMaxGradient for MPSMatrixSoftMaxGradient {}
pub trait IMPSMatrixSoftMaxGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_gradientMatrix_forwardOutputMatrix_resultMatrix_(
        &self,
        commandBuffer: *mut u64,
        gradientMatrix: MPSMatrix,
        forwardOutputMatrix: MPSMatrix,
        resultMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, gradientMatrix : gradientMatrix, forwardOutputMatrix : forwardOutputMatrix, resultMatrix : resultMatrix)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceRows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceRows)
    }
    unsafe fn setSourceRows_(&self, sourceRows: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceRows : sourceRows)
    }
    unsafe fn sourceColumns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceColumns)
    }
    unsafe fn setSourceColumns_(&self, sourceColumns: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceColumns : sourceColumns)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixLogSoftMaxGradient(pub id);
impl std::ops::Deref for MPSMatrixLogSoftMaxGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixLogSoftMaxGradient {}
impl MPSMatrixLogSoftMaxGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixLogSoftMaxGradient").unwrap(), alloc) })
    }
}
impl IMPSMatrixSoftMaxGradient for MPSMatrixLogSoftMaxGradient {}
impl From<MPSMatrixLogSoftMaxGradient> for MPSMatrixSoftMaxGradient {
    fn from(child: MPSMatrixLogSoftMaxGradient) -> MPSMatrixSoftMaxGradient {
        MPSMatrixSoftMaxGradient(child.0)
    }
}
impl std::convert::TryFrom<MPSMatrixSoftMaxGradient> for MPSMatrixLogSoftMaxGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSMatrixSoftMaxGradient,
    ) -> Result<MPSMatrixLogSoftMaxGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixLogSoftMaxGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixLogSoftMaxGradient(parent.0))
        } else {
            Err("This MPSMatrixSoftMaxGradient cannot be downcasted to MPSMatrixLogSoftMaxGradient")
        }
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixLogSoftMaxGradient {}
impl IMPSKernel for MPSMatrixLogSoftMaxGradient {}
impl PNSCopying for MPSMatrixLogSoftMaxGradient {}
impl PNSSecureCoding for MPSMatrixLogSoftMaxGradient {}
impl INSObject for MPSMatrixLogSoftMaxGradient {}
impl PNSObject for MPSMatrixLogSoftMaxGradient {}
impl IMPSMatrixLogSoftMaxGradient for MPSMatrixLogSoftMaxGradient {}
pub trait IMPSMatrixLogSoftMaxGradient: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixFindTopK(pub id);
impl std::ops::Deref for MPSMatrixFindTopK {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixFindTopK {}
impl MPSMatrixFindTopK {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixFindTopK").unwrap(), alloc) })
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixFindTopK {}
impl std::convert::TryFrom<MPSMatrixUnaryKernel> for MPSMatrixFindTopK {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixUnaryKernel) -> Result<MPSMatrixFindTopK, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixFindTopK").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixFindTopK(parent.0))
        } else {
            Err("This MPSMatrixUnaryKernel cannot be downcasted to MPSMatrixFindTopK")
        }
    }
}
impl IMPSKernel for MPSMatrixFindTopK {}
impl PNSCopying for MPSMatrixFindTopK {}
impl PNSSecureCoding for MPSMatrixFindTopK {}
impl INSObject for MPSMatrixFindTopK {}
impl PNSObject for MPSMatrixFindTopK {}
impl IMPSMatrixFindTopK for MPSMatrixFindTopK {}
pub trait IMPSMatrixFindTopK: Sized + std::ops::Deref {
    unsafe fn initWithDevice_numberOfTopKValues_(
        &self,
        device: *mut u64,
        numberOfTopKValues: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, numberOfTopKValues : numberOfTopKValues)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_inputMatrix_resultIndexMatrix_resultValueMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputMatrix: MPSMatrix,
        resultIndexMatrix: MPSMatrix,
        resultValueMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputMatrix : inputMatrix, resultIndexMatrix : resultIndexMatrix, resultValueMatrix : resultValueMatrix)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceRows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceRows)
    }
    unsafe fn setSourceRows_(&self, sourceRows: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceRows : sourceRows)
    }
    unsafe fn sourceColumns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceColumns)
    }
    unsafe fn setSourceColumns_(&self, sourceColumns: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceColumns : sourceColumns)
    }
    unsafe fn indexOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, indexOffset)
    }
    unsafe fn setIndexOffset_(&self, indexOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIndexOffset : indexOffset)
    }
    unsafe fn numberOfTopKValues(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfTopKValues)
    }
    unsafe fn setNumberOfTopKValues_(&self, numberOfTopKValues: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNumberOfTopKValues : numberOfTopKValues)
    }
}
pub type MPSMatrixRandomDistribution = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixRandomDistributionDescriptor(pub id);
impl std::ops::Deref for MPSMatrixRandomDistributionDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixRandomDistributionDescriptor {}
impl MPSMatrixRandomDistributionDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomDistributionDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSMatrixRandomDistributionDescriptor {}
impl INSObject for MPSMatrixRandomDistributionDescriptor {}
impl PNSObject for MPSMatrixRandomDistributionDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSMatrixRandomDistributionDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSMatrixRandomDistributionDescriptor, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixRandomDistributionDescriptor").unwrap())
        };
        if is_kind_of {
            Ok(MPSMatrixRandomDistributionDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSMatrixRandomDistributionDescriptor")
        }
    }
}
impl IMPSMatrixRandomDistributionDescriptor for MPSMatrixRandomDistributionDescriptor {}
pub trait IMPSMatrixRandomDistributionDescriptor: Sized + std::ops::Deref {
    unsafe fn distributionType(&self) -> MPSMatrixRandomDistribution
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, distributionType)
    }
    unsafe fn setDistributionType_(&self, distributionType: MPSMatrixRandomDistribution)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDistributionType : distributionType)
    }
    unsafe fn minimum(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimum)
    }
    unsafe fn setMinimum_(&self, minimum: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimum : minimum)
    }
    unsafe fn maximum(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximum)
    }
    unsafe fn setMaximum_(&self, maximum: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaximum : maximum)
    }
    unsafe fn mean(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mean)
    }
    unsafe fn setMean_(&self, mean: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMean : mean)
    }
    unsafe fn standardDeviation(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, standardDeviation)
    }
    unsafe fn setStandardDeviation_(&self, standardDeviation: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStandardDeviation : standardDeviation)
    }
    unsafe fn uniformDistributionDescriptorWithMinimum_maximum_(
        minimum: f32,
        maximum: f32,
    ) -> MPSMatrixRandomDistributionDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomDistributionDescriptor").unwrap(), uniformDistributionDescriptorWithMinimum : minimum, maximum : maximum)
    }
    unsafe fn normalDistributionDescriptorWithMean_standardDeviation_(
        mean: f32,
        standardDeviation: f32,
    ) -> MPSMatrixRandomDistributionDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomDistributionDescriptor").unwrap(), normalDistributionDescriptorWithMean : mean, standardDeviation : standardDeviation)
    }
    unsafe fn normalDistributionDescriptorWithMean_standardDeviation_minimum_maximum_(
        mean: f32,
        standardDeviation: f32,
        minimum: f32,
        maximum: f32,
    ) -> MPSMatrixRandomDistributionDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomDistributionDescriptor").unwrap(), normalDistributionDescriptorWithMean : mean, standardDeviation : standardDeviation, minimum : minimum, maximum : maximum)
    }
    unsafe fn defaultDistributionDescriptor() -> MPSMatrixRandomDistributionDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomDistributionDescriptor").unwrap(), defaultDistributionDescriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixRandom(pub id);
impl std::ops::Deref for MPSMatrixRandom {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixRandom {}
impl MPSMatrixRandom {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandom").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixRandom {}
impl PNSCopying for MPSMatrixRandom {}
impl PNSSecureCoding for MPSMatrixRandom {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixRandom {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixRandom, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixRandom").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixRandom(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixRandom")
        }
    }
}
impl INSObject for MPSMatrixRandom {}
impl PNSObject for MPSMatrixRandom {}
impl IMPSMatrixRandom for MPSMatrixRandom {}
pub trait IMPSMatrixRandom: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_destinationVector_(
        &self,
        commandBuffer: *mut u64,
        destinationVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, destinationVector : destinationVector)
    }
    unsafe fn encodeToCommandBuffer_destinationMatrix_(
        &self,
        commandBuffer: *mut u64,
        destinationMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, destinationMatrix : destinationMatrix)
    }
    unsafe fn destinationDataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationDataType)
    }
    unsafe fn distributionType(&self) -> MPSMatrixRandomDistribution
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, distributionType)
    }
    unsafe fn batchStart(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchStart)
    }
    unsafe fn setBatchStart_(&self, batchStart: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchStart : batchStart)
    }
    unsafe fn batchSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchSize)
    }
    unsafe fn setBatchSize_(&self, batchSize: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchSize : batchSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixRandomMTGP32(pub id);
impl std::ops::Deref for MPSMatrixRandomMTGP32 {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixRandomMTGP32 {}
impl MPSMatrixRandomMTGP32 {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomMTGP32").unwrap(), alloc) })
    }
}
impl IMPSMatrixRandom for MPSMatrixRandomMTGP32 {}
impl From<MPSMatrixRandomMTGP32> for MPSMatrixRandom {
    fn from(child: MPSMatrixRandomMTGP32) -> MPSMatrixRandom {
        MPSMatrixRandom(child.0)
    }
}
impl std::convert::TryFrom<MPSMatrixRandom> for MPSMatrixRandomMTGP32 {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixRandom) -> Result<MPSMatrixRandomMTGP32, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixRandomMTGP32").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixRandomMTGP32(parent.0))
        } else {
            Err("This MPSMatrixRandom cannot be downcasted to MPSMatrixRandomMTGP32")
        }
    }
}
impl IMPSKernel for MPSMatrixRandomMTGP32 {}
impl PNSCopying for MPSMatrixRandomMTGP32 {}
impl PNSSecureCoding for MPSMatrixRandomMTGP32 {}
impl INSObject for MPSMatrixRandomMTGP32 {}
impl PNSObject for MPSMatrixRandomMTGP32 {}
impl IMPSMatrixRandomMTGP32 for MPSMatrixRandomMTGP32 {}
pub trait IMPSMatrixRandomMTGP32: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_destinationDataType_seed_distributionDescriptor_(
        &self,
        device: *mut u64,
        destinationDataType: MPSDataType,
        seed: NSUInteger,
        distributionDescriptor: MPSMatrixRandomDistributionDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, destinationDataType : destinationDataType, seed : seed, distributionDescriptor : distributionDescriptor)
    }
    unsafe fn synchronizeStateOnCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, synchronizeStateOnCommandBuffer : commandBuffer)
    }
    unsafe fn initWithDevice_destinationDataType_seed_(
        &self,
        device: *mut u64,
        destinationDataType: MPSDataType,
        seed: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, destinationDataType : destinationDataType, seed : seed)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixRandomPhilox(pub id);
impl std::ops::Deref for MPSMatrixRandomPhilox {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixRandomPhilox {}
impl MPSMatrixRandomPhilox {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixRandomPhilox").unwrap(), alloc) })
    }
}
impl IMPSMatrixRandom for MPSMatrixRandomPhilox {}
impl std::convert::TryFrom<MPSMatrixRandom> for MPSMatrixRandomPhilox {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixRandom) -> Result<MPSMatrixRandomPhilox, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixRandomPhilox").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixRandomPhilox(parent.0))
        } else {
            Err("This MPSMatrixRandom cannot be downcasted to MPSMatrixRandomPhilox")
        }
    }
}
impl IMPSKernel for MPSMatrixRandomPhilox {}
impl PNSCopying for MPSMatrixRandomPhilox {}
impl PNSSecureCoding for MPSMatrixRandomPhilox {}
impl INSObject for MPSMatrixRandomPhilox {}
impl PNSObject for MPSMatrixRandomPhilox {}
impl IMPSMatrixRandomPhilox for MPSMatrixRandomPhilox {}
pub trait IMPSMatrixRandomPhilox: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_destinationDataType_seed_distributionDescriptor_(
        &self,
        device: *mut u64,
        destinationDataType: MPSDataType,
        seed: NSUInteger,
        distributionDescriptor: MPSMatrixRandomDistributionDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, destinationDataType : destinationDataType, seed : seed, distributionDescriptor : distributionDescriptor)
    }
    unsafe fn initWithDevice_destinationDataType_seed_(
        &self,
        device: *mut u64,
        destinationDataType: MPSDataType,
        seed: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, destinationDataType : destinationDataType, seed : seed)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageCopyToMatrix(pub id);
impl std::ops::Deref for MPSImageCopyToMatrix {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageCopyToMatrix {}
impl MPSImageCopyToMatrix {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageCopyToMatrix").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSImageCopyToMatrix {}
impl PNSCopying for MPSImageCopyToMatrix {}
impl PNSSecureCoding for MPSImageCopyToMatrix {}
impl std::convert::TryFrom<MPSKernel> for MPSImageCopyToMatrix {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSImageCopyToMatrix, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageCopyToMatrix").unwrap()) };
        if is_kind_of {
            Ok(MPSImageCopyToMatrix(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSImageCopyToMatrix")
        }
    }
}
impl INSObject for MPSImageCopyToMatrix {}
impl PNSObject for MPSImageCopyToMatrix {}
impl IMPSImageCopyToMatrix for MPSImageCopyToMatrix {}
pub trait IMPSImageCopyToMatrix: Sized + std::ops::Deref {
    unsafe fn initWithDevice_dataLayout_(
        &self,
        device: *mut u64,
        dataLayout: MPSDataLayout,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, dataLayout : dataLayout)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationMatrix_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        destinationMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationMatrix : destinationMatrix)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationMatrix_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationMatrix : destinationMatrix)
    }
    unsafe fn destinationMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationMatrixOrigin)
    }
    unsafe fn setDestinationMatrixOrigin_(&self, destinationMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationMatrixOrigin : destinationMatrixOrigin)
    }
    unsafe fn destinationMatrixBatchIndex(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationMatrixBatchIndex)
    }
    unsafe fn setDestinationMatrixBatchIndex_(&self, destinationMatrixBatchIndex: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationMatrixBatchIndex : destinationMatrixBatchIndex)
    }
    unsafe fn dataLayout(&self) -> MPSDataLayout
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataLayout)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixCopyToImage(pub id);
impl std::ops::Deref for MPSMatrixCopyToImage {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixCopyToImage {}
impl MPSMatrixCopyToImage {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixCopyToImage").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixCopyToImage {}
impl PNSCopying for MPSMatrixCopyToImage {}
impl PNSSecureCoding for MPSMatrixCopyToImage {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixCopyToImage {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixCopyToImage, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixCopyToImage").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixCopyToImage(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixCopyToImage")
        }
    }
}
impl INSObject for MPSMatrixCopyToImage {}
impl PNSObject for MPSMatrixCopyToImage {}
impl IMPSMatrixCopyToImage for MPSMatrixCopyToImage {}
pub trait IMPSMatrixCopyToImage: Sized + std::ops::Deref {
    unsafe fn initWithDevice_dataLayout_(
        &self,
        device: *mut u64,
        dataLayout: MPSDataLayout,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, dataLayout : dataLayout)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrix_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceMatrix_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrix: MPSMatrix,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceMatrix : sourceMatrix, destinationImages : destinationImages)
    }
    unsafe fn sourceMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceMatrixOrigin)
    }
    unsafe fn setSourceMatrixOrigin_(&self, sourceMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceMatrixOrigin : sourceMatrixOrigin)
    }
    unsafe fn sourceMatrixBatchIndex(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceMatrixBatchIndex)
    }
    unsafe fn setSourceMatrixBatchIndex_(&self, sourceMatrixBatchIndex: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceMatrixBatchIndex : sourceMatrixBatchIndex)
    }
    unsafe fn dataLayout(&self) -> MPSDataLayout
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataLayout)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageEuclideanDistanceTransform(pub id);
impl std::ops::Deref for MPSImageEuclideanDistanceTransform {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageEuclideanDistanceTransform {}
impl MPSImageEuclideanDistanceTransform {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageEuclideanDistanceTransform").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageEuclideanDistanceTransform {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageEuclideanDistanceTransform {
    type Error = &'static str;
    fn try_from(
        parent: MPSUnaryImageKernel,
    ) -> Result<MPSImageEuclideanDistanceTransform, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageEuclideanDistanceTransform").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageEuclideanDistanceTransform(parent.0))
        } else {
            Err ("This MPSUnaryImageKernel cannot be downcasted to MPSImageEuclideanDistanceTransform" ,)
        }
    }
}
impl IMPSKernel for MPSImageEuclideanDistanceTransform {}
impl PNSCopying for MPSImageEuclideanDistanceTransform {}
impl PNSSecureCoding for MPSImageEuclideanDistanceTransform {}
impl INSObject for MPSImageEuclideanDistanceTransform {}
impl PNSObject for MPSImageEuclideanDistanceTransform {}
impl IMPSImageEuclideanDistanceTransform for MPSImageEuclideanDistanceTransform {}
pub trait IMPSImageEuclideanDistanceTransform: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn searchLimitRadius(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, searchLimitRadius)
    }
    unsafe fn setSearchLimitRadius_(&self, searchLimitRadius: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSearchLimitRadius : searchLimitRadius)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageEDLines(pub id);
impl std::ops::Deref for MPSImageEDLines {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageEDLines {}
impl MPSImageEDLines {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageEDLines").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSImageEDLines {}
impl PNSCopying for MPSImageEDLines {}
impl PNSSecureCoding for MPSImageEDLines {}
impl std::convert::TryFrom<MPSKernel> for MPSImageEDLines {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSImageEDLines, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageEDLines").unwrap()) };
        if is_kind_of {
            Ok(MPSImageEDLines(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSImageEDLines")
        }
    }
}
impl INSObject for MPSImageEDLines {}
impl PNSObject for MPSImageEDLines {}
impl IMPSImageEDLines for MPSImageEDLines {}
pub trait IMPSImageEDLines: Sized + std::ops::Deref {
    unsafe fn initWithDevice_gaussianSigma_minLineLength_maxLines_detailRatio_gradientThreshold_lineErrorThreshold_mergeLocalityThreshold_(
        &self,
        device: *mut u64,
        gaussianSigma: f32,
        minLineLength: ::std::os::raw::c_ushort,
        maxLines: NSUInteger,
        detailRatio: ::std::os::raw::c_ushort,
        gradientThreshold: f32,
        lineErrorThreshold: f32,
        mergeLocalityThreshold: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, gaussianSigma : gaussianSigma, minLineLength : minLineLength, maxLines : maxLines, detailRatio : detailRatio, gradientThreshold : gradientThreshold, lineErrorThreshold : lineErrorThreshold, mergeLocalityThreshold : mergeLocalityThreshold)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_destinationTexture_endpointBuffer_endpointOffset_(
        &self,
        commandBuffer: *mut u64,
        source: *mut u64,
        dest: *mut u64,
        endpointBuffer: *mut u64,
        endpointOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : source, destinationTexture : dest, endpointBuffer : endpointBuffer, endpointOffset : endpointOffset)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
    unsafe fn gaussianSigma(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gaussianSigma)
    }
    unsafe fn minLineLength(&self) -> ::std::os::raw::c_ushort
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minLineLength)
    }
    unsafe fn setMinLineLength_(&self, minLineLength: ::std::os::raw::c_ushort)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinLineLength : minLineLength)
    }
    unsafe fn maxLines(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maxLines)
    }
    unsafe fn setMaxLines_(&self, maxLines: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaxLines : maxLines)
    }
    unsafe fn detailRatio(&self) -> ::std::os::raw::c_ushort
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, detailRatio)
    }
    unsafe fn setDetailRatio_(&self, detailRatio: ::std::os::raw::c_ushort)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDetailRatio : detailRatio)
    }
    unsafe fn gradientThreshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientThreshold)
    }
    unsafe fn setGradientThreshold_(&self, gradientThreshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGradientThreshold : gradientThreshold)
    }
    unsafe fn lineErrorThreshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lineErrorThreshold)
    }
    unsafe fn setLineErrorThreshold_(&self, lineErrorThreshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLineErrorThreshold : lineErrorThreshold)
    }
    unsafe fn mergeLocalityThreshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mergeLocalityThreshold)
    }
    unsafe fn setMergeLocalityThreshold_(&self, mergeLocalityThreshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMergeLocalityThreshold : mergeLocalityThreshold)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageGuidedFilter(pub id);
impl std::ops::Deref for MPSImageGuidedFilter {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageGuidedFilter {}
impl MPSImageGuidedFilter {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageGuidedFilter").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSImageGuidedFilter {}
impl PNSCopying for MPSImageGuidedFilter {}
impl PNSSecureCoding for MPSImageGuidedFilter {}
impl std::convert::TryFrom<MPSKernel> for MPSImageGuidedFilter {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSImageGuidedFilter, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageGuidedFilter").unwrap()) };
        if is_kind_of {
            Ok(MPSImageGuidedFilter(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSImageGuidedFilter")
        }
    }
}
impl INSObject for MPSImageGuidedFilter {}
impl PNSObject for MPSImageGuidedFilter {}
impl IMPSImageGuidedFilter for MPSImageGuidedFilter {}
pub trait IMPSImageGuidedFilter: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelDiameter_(
        &self,
        device: *mut u64,
        kernelDiameter: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelDiameter : kernelDiameter)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeRegressionToCommandBuffer_sourceTexture_guidanceTexture_weightsTexture_destinationCoefficientsTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        guidanceTexture: *mut u64,
        weightsTexture: *mut u64,
        destinationCoefficientsTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeRegressionToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, guidanceTexture : guidanceTexture, weightsTexture : weightsTexture, destinationCoefficientsTexture : destinationCoefficientsTexture)
    }
    unsafe fn encodeReconstructionToCommandBuffer_guidanceTexture_coefficientsTexture_destinationTexture_(
        &self,
        commandBuffer: *mut u64,
        guidanceTexture: *mut u64,
        coefficientsTexture: *mut u64,
        destinationTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeReconstructionToCommandBuffer : commandBuffer, guidanceTexture : guidanceTexture, coefficientsTexture : coefficientsTexture, destinationTexture : destinationTexture)
    }
    unsafe fn encodeRegressionToCommandBuffer_sourceTexture_guidanceTexture_weightsTexture_destinationCoefficientsTextureA_destinationCoefficientsTextureB_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        guidanceTexture: *mut u64,
        weightsTexture: *mut u64,
        destinationCoefficientsTextureA: *mut u64,
        destinationCoefficientsTextureB: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeRegressionToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, guidanceTexture : guidanceTexture, weightsTexture : weightsTexture, destinationCoefficientsTextureA : destinationCoefficientsTextureA, destinationCoefficientsTextureB : destinationCoefficientsTextureB)
    }
    unsafe fn encodeReconstructionToCommandBuffer_guidanceTexture_coefficientsTextureA_coefficientsTextureB_destinationTexture_(
        &self,
        commandBuffer: *mut u64,
        guidanceTexture: *mut u64,
        coefficientsTextureA: *mut u64,
        coefficientsTextureB: *mut u64,
        destinationTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeReconstructionToCommandBuffer : commandBuffer, guidanceTexture : guidanceTexture, coefficientsTextureA : coefficientsTextureA, coefficientsTextureB : coefficientsTextureB, destinationTexture : destinationTexture)
    }
    unsafe fn kernelDiameter(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelDiameter)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn reconstructScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reconstructScale)
    }
    unsafe fn setReconstructScale_(&self, reconstructScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReconstructScale : reconstructScale)
    }
    unsafe fn reconstructOffset(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reconstructOffset)
    }
    unsafe fn setReconstructOffset_(&self, reconstructOffset: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReconstructOffset : reconstructOffset)
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageKeypointRangeInfo {
    pub maximumKeypoints: NSUInteger,
    pub minimumThresholdValue: f32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageKeypointData {
    pub keypointCoordinate: vector_ushort2,
    pub keypointColorValue: f32,
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageFindKeypoints(pub id);
impl std::ops::Deref for MPSImageFindKeypoints {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageFindKeypoints {}
impl MPSImageFindKeypoints {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageFindKeypoints").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSImageFindKeypoints {}
impl PNSCopying for MPSImageFindKeypoints {}
impl PNSSecureCoding for MPSImageFindKeypoints {}
impl std::convert::TryFrom<MPSKernel> for MPSImageFindKeypoints {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSImageFindKeypoints, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageFindKeypoints").unwrap()) };
        if is_kind_of {
            Ok(MPSImageFindKeypoints(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSImageFindKeypoints")
        }
    }
}
impl INSObject for MPSImageFindKeypoints {}
impl PNSObject for MPSImageFindKeypoints {}
impl IMPSImageFindKeypoints for MPSImageFindKeypoints {}
pub trait IMPSImageFindKeypoints: Sized + std::ops::Deref {
    unsafe fn initWithDevice_info_(
        &self,
        device: *mut u64,
        info: *const MPSImageKeypointRangeInfo,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, info : info)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_regions_numberOfRegions_keypointCountBuffer_keypointCountBufferOffset_keypointDataBuffer_keypointDataBufferOffset_(
        &self,
        commandBuffer: *mut u64,
        source: *mut u64,
        regions: *const MTLRegion,
        numberOfRegions: NSUInteger,
        keypointCountBuffer: *mut u64,
        keypointCountBufferOffset: NSUInteger,
        keypointDataBuffer: *mut u64,
        keypointDataBufferOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : source, regions : regions, numberOfRegions : numberOfRegions, keypointCountBuffer : keypointCountBuffer, keypointCountBufferOffset : keypointCountBufferOffset, keypointDataBuffer : keypointDataBuffer, keypointDataBufferOffset : keypointDataBufferOffset)
    }
    unsafe fn keypointRangeInfo(&self) -> MPSImageKeypointRangeInfo
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, keypointRangeInfo)
    }
}
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageHistogramInfo {
    pub numberOfHistogramEntries: NSUInteger,
    pub histogramForAlpha: BOOL,
    pub __bindgen_padding_0: [u64; 0usize],
    pub minPixelValue: vector_float4,
    pub maxPixelValue: vector_float4,
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageHistogram(pub id);
impl std::ops::Deref for MPSImageHistogram {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageHistogram {}
impl MPSImageHistogram {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageHistogram").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSImageHistogram {}
impl PNSCopying for MPSImageHistogram {}
impl PNSSecureCoding for MPSImageHistogram {}
impl std::convert::TryFrom<MPSKernel> for MPSImageHistogram {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSImageHistogram, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageHistogram").unwrap()) };
        if is_kind_of {
            Ok(MPSImageHistogram(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSImageHistogram")
        }
    }
}
impl INSObject for MPSImageHistogram {}
impl PNSObject for MPSImageHistogram {}
impl IMPSImageHistogram for MPSImageHistogram {}
pub trait IMPSImageHistogram: Sized + std::ops::Deref {
    unsafe fn initWithDevice_histogramInfo_(
        &self,
        device: *mut u64,
        histogramInfo: *const MPSImageHistogramInfo,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, histogramInfo : histogramInfo)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_histogram_histogramOffset_(
        &self,
        commandBuffer: *mut u64,
        source: *mut u64,
        histogram: *mut u64,
        histogramOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : source, histogram : histogram, histogramOffset : histogramOffset)
    }
    unsafe fn histogramSizeForSourceFormat_(&self, sourceFormat: MTLPixelFormat) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, histogramSizeForSourceFormat : sourceFormat)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
    unsafe fn zeroHistogram(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, zeroHistogram)
    }
    unsafe fn setZeroHistogram_(&self, zeroHistogram: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setZeroHistogram : zeroHistogram)
    }
    unsafe fn minPixelThresholdValue(&self) -> vector_float4
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minPixelThresholdValue)
    }
    unsafe fn setMinPixelThresholdValue_(&self, minPixelThresholdValue: vector_float4)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinPixelThresholdValue : minPixelThresholdValue)
    }
    unsafe fn histogramInfo(&self) -> MPSImageHistogramInfo
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, histogramInfo)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageNormalizedHistogram(pub id);
impl std::ops::Deref for MPSImageNormalizedHistogram {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageNormalizedHistogram {}
impl MPSImageNormalizedHistogram {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageNormalizedHistogram").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSImageNormalizedHistogram {}
impl PNSCopying for MPSImageNormalizedHistogram {}
impl PNSSecureCoding for MPSImageNormalizedHistogram {}
impl std::convert::TryFrom<MPSKernel> for MPSImageNormalizedHistogram {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSImageNormalizedHistogram, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageNormalizedHistogram").unwrap()) };
        if is_kind_of {
            Ok(MPSImageNormalizedHistogram(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSImageNormalizedHistogram")
        }
    }
}
impl INSObject for MPSImageNormalizedHistogram {}
impl PNSObject for MPSImageNormalizedHistogram {}
impl IMPSImageNormalizedHistogram for MPSImageNormalizedHistogram {}
pub trait IMPSImageNormalizedHistogram: Sized + std::ops::Deref {
    unsafe fn initWithDevice_histogramInfo_(
        &self,
        device: *mut u64,
        histogramInfo: *const MPSImageHistogramInfo,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, histogramInfo : histogramInfo)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_minmaxTexture_histogram_histogramOffset_(
        &self,
        commandBuffer: *mut u64,
        source: *mut u64,
        minmaxTexture: *mut u64,
        histogram: *mut u64,
        histogramOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : source, minmaxTexture : minmaxTexture, histogram : histogram, histogramOffset : histogramOffset)
    }
    unsafe fn histogramSizeForSourceFormat_(&self, sourceFormat: MTLPixelFormat) -> usize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, histogramSizeForSourceFormat : sourceFormat)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
    unsafe fn zeroHistogram(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, zeroHistogram)
    }
    unsafe fn setZeroHistogram_(&self, zeroHistogram: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setZeroHistogram : zeroHistogram)
    }
    unsafe fn histogramInfo(&self) -> MPSImageHistogramInfo
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, histogramInfo)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageHistogramEqualization(pub id);
impl std::ops::Deref for MPSImageHistogramEqualization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageHistogramEqualization {}
impl MPSImageHistogramEqualization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageHistogramEqualization").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageHistogramEqualization {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageHistogramEqualization {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageHistogramEqualization, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageHistogramEqualization").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageHistogramEqualization(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageHistogramEqualization")
        }
    }
}
impl IMPSKernel for MPSImageHistogramEqualization {}
impl PNSCopying for MPSImageHistogramEqualization {}
impl PNSSecureCoding for MPSImageHistogramEqualization {}
impl INSObject for MPSImageHistogramEqualization {}
impl PNSObject for MPSImageHistogramEqualization {}
impl IMPSImageHistogramEqualization for MPSImageHistogramEqualization {}
pub trait IMPSImageHistogramEqualization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_histogramInfo_(
        &self,
        device: *mut u64,
        histogramInfo: *const MPSImageHistogramInfo,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, histogramInfo : histogramInfo)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeTransformToCommandBuffer_sourceTexture_histogram_histogramOffset_(
        &self,
        commandBuffer: *mut u64,
        source: *mut u64,
        histogram: *mut u64,
        histogramOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeTransformToCommandBuffer : commandBuffer, sourceTexture : source, histogram : histogram, histogramOffset : histogramOffset)
    }
    unsafe fn histogramInfo(&self) -> MPSImageHistogramInfo
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, histogramInfo)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageHistogramSpecification(pub id);
impl std::ops::Deref for MPSImageHistogramSpecification {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageHistogramSpecification {}
impl MPSImageHistogramSpecification {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageHistogramSpecification").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageHistogramSpecification {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageHistogramSpecification {
    type Error = &'static str;
    fn try_from(
        parent: MPSUnaryImageKernel,
    ) -> Result<MPSImageHistogramSpecification, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageHistogramSpecification").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageHistogramSpecification(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageHistogramSpecification")
        }
    }
}
impl IMPSKernel for MPSImageHistogramSpecification {}
impl PNSCopying for MPSImageHistogramSpecification {}
impl PNSSecureCoding for MPSImageHistogramSpecification {}
impl INSObject for MPSImageHistogramSpecification {}
impl PNSObject for MPSImageHistogramSpecification {}
impl IMPSImageHistogramSpecification for MPSImageHistogramSpecification {}
pub trait IMPSImageHistogramSpecification: Sized + std::ops::Deref {
    unsafe fn initWithDevice_histogramInfo_(
        &self,
        device: *mut u64,
        histogramInfo: *const MPSImageHistogramInfo,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, histogramInfo : histogramInfo)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeTransformToCommandBuffer_sourceTexture_sourceHistogram_sourceHistogramOffset_desiredHistogram_desiredHistogramOffset_(
        &self,
        commandBuffer: *mut u64,
        source: *mut u64,
        sourceHistogram: *mut u64,
        sourceHistogramOffset: NSUInteger,
        desiredHistogram: *mut u64,
        desiredHistogramOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeTransformToCommandBuffer : commandBuffer, sourceTexture : source, sourceHistogram : sourceHistogram, sourceHistogramOffset : sourceHistogramOffset, desiredHistogram : desiredHistogram, desiredHistogramOffset : desiredHistogramOffset)
    }
    unsafe fn histogramInfo(&self) -> MPSImageHistogramInfo
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, histogramInfo)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageIntegral(pub id);
impl std::ops::Deref for MPSImageIntegral {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageIntegral {}
impl MPSImageIntegral {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageIntegral").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageIntegral {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageIntegral {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageIntegral, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageIntegral").unwrap()) };
        if is_kind_of {
            Ok(MPSImageIntegral(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageIntegral")
        }
    }
}
impl IMPSKernel for MPSImageIntegral {}
impl PNSCopying for MPSImageIntegral {}
impl PNSSecureCoding for MPSImageIntegral {}
impl INSObject for MPSImageIntegral {}
impl PNSObject for MPSImageIntegral {}
impl IMPSImageIntegral for MPSImageIntegral {}
pub trait IMPSImageIntegral: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageIntegralOfSquares(pub id);
impl std::ops::Deref for MPSImageIntegralOfSquares {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageIntegralOfSquares {}
impl MPSImageIntegralOfSquares {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageIntegralOfSquares").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageIntegralOfSquares {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageIntegralOfSquares {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageIntegralOfSquares, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageIntegralOfSquares").unwrap()) };
        if is_kind_of {
            Ok(MPSImageIntegralOfSquares(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageIntegralOfSquares")
        }
    }
}
impl IMPSKernel for MPSImageIntegralOfSquares {}
impl PNSCopying for MPSImageIntegralOfSquares {}
impl PNSSecureCoding for MPSImageIntegralOfSquares {}
impl INSObject for MPSImageIntegralOfSquares {}
impl PNSObject for MPSImageIntegralOfSquares {}
impl IMPSImageIntegralOfSquares for MPSImageIntegralOfSquares {}
pub trait IMPSImageIntegralOfSquares: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageArithmetic(pub id);
impl std::ops::Deref for MPSImageArithmetic {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageArithmetic {}
impl MPSImageArithmetic {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageArithmetic").unwrap(), alloc) })
    }
}
impl IMPSBinaryImageKernel for MPSImageArithmetic {}
impl From<MPSImageArithmetic> for MPSBinaryImageKernel {
    fn from(child: MPSImageArithmetic) -> MPSBinaryImageKernel {
        MPSBinaryImageKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSBinaryImageKernel> for MPSImageArithmetic {
    type Error = &'static str;
    fn try_from(parent: MPSBinaryImageKernel) -> Result<MPSImageArithmetic, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageArithmetic").unwrap()) };
        if is_kind_of {
            Ok(MPSImageArithmetic(parent.0))
        } else {
            Err("This MPSBinaryImageKernel cannot be downcasted to MPSImageArithmetic")
        }
    }
}
impl IMPSKernel for MPSImageArithmetic {}
impl PNSCopying for MPSImageArithmetic {}
impl PNSSecureCoding for MPSImageArithmetic {}
impl INSObject for MPSImageArithmetic {}
impl PNSObject for MPSImageArithmetic {}
impl IMPSImageArithmetic for MPSImageArithmetic {}
pub trait IMPSImageArithmetic: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn primaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryScale)
    }
    unsafe fn setPrimaryScale_(&self, primaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryScale : primaryScale)
    }
    unsafe fn secondaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryScale)
    }
    unsafe fn setSecondaryScale_(&self, secondaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryScale : secondaryScale)
    }
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
    unsafe fn primaryStrideInPixels(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInPixels)
    }
    unsafe fn setPrimaryStrideInPixels_(&self, primaryStrideInPixels: MTLSize)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInPixels : primaryStrideInPixels)
    }
    unsafe fn secondaryStrideInPixels(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixels)
    }
    unsafe fn setSecondaryStrideInPixels_(&self, secondaryStrideInPixels: MTLSize)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixels : secondaryStrideInPixels)
    }
    unsafe fn minimumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimumValue)
    }
    unsafe fn setMinimumValue_(&self, minimumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimumValue : minimumValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn setMaximumValue_(&self, maximumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaximumValue : maximumValue)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageAdd(pub id);
impl std::ops::Deref for MPSImageAdd {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageAdd {}
impl MPSImageAdd {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageAdd").unwrap(), alloc) })
    }
}
impl IMPSImageArithmetic for MPSImageAdd {}
impl From<MPSImageAdd> for MPSImageArithmetic {
    fn from(child: MPSImageAdd) -> MPSImageArithmetic {
        MPSImageArithmetic(child.0)
    }
}
impl std::convert::TryFrom<MPSImageArithmetic> for MPSImageAdd {
    type Error = &'static str;
    fn try_from(parent: MPSImageArithmetic) -> Result<MPSImageAdd, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageAdd").unwrap()) };
        if is_kind_of {
            Ok(MPSImageAdd(parent.0))
        } else {
            Err("This MPSImageArithmetic cannot be downcasted to MPSImageAdd")
        }
    }
}
impl IMPSBinaryImageKernel for MPSImageAdd {}
impl IMPSKernel for MPSImageAdd {}
impl PNSCopying for MPSImageAdd {}
impl PNSSecureCoding for MPSImageAdd {}
impl INSObject for MPSImageAdd {}
impl PNSObject for MPSImageAdd {}
impl IMPSImageAdd for MPSImageAdd {}
pub trait IMPSImageAdd: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageSubtract(pub id);
impl std::ops::Deref for MPSImageSubtract {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageSubtract {}
impl MPSImageSubtract {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageSubtract").unwrap(), alloc) })
    }
}
impl IMPSImageArithmetic for MPSImageSubtract {}
impl std::convert::TryFrom<MPSImageArithmetic> for MPSImageSubtract {
    type Error = &'static str;
    fn try_from(parent: MPSImageArithmetic) -> Result<MPSImageSubtract, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageSubtract").unwrap()) };
        if is_kind_of {
            Ok(MPSImageSubtract(parent.0))
        } else {
            Err("This MPSImageArithmetic cannot be downcasted to MPSImageSubtract")
        }
    }
}
impl IMPSBinaryImageKernel for MPSImageSubtract {}
impl IMPSKernel for MPSImageSubtract {}
impl PNSCopying for MPSImageSubtract {}
impl PNSSecureCoding for MPSImageSubtract {}
impl INSObject for MPSImageSubtract {}
impl PNSObject for MPSImageSubtract {}
impl IMPSImageSubtract for MPSImageSubtract {}
pub trait IMPSImageSubtract: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageMultiply(pub id);
impl std::ops::Deref for MPSImageMultiply {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageMultiply {}
impl MPSImageMultiply {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageMultiply").unwrap(), alloc) })
    }
}
impl IMPSImageArithmetic for MPSImageMultiply {}
impl std::convert::TryFrom<MPSImageArithmetic> for MPSImageMultiply {
    type Error = &'static str;
    fn try_from(parent: MPSImageArithmetic) -> Result<MPSImageMultiply, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageMultiply").unwrap()) };
        if is_kind_of {
            Ok(MPSImageMultiply(parent.0))
        } else {
            Err("This MPSImageArithmetic cannot be downcasted to MPSImageMultiply")
        }
    }
}
impl IMPSBinaryImageKernel for MPSImageMultiply {}
impl IMPSKernel for MPSImageMultiply {}
impl PNSCopying for MPSImageMultiply {}
impl PNSSecureCoding for MPSImageMultiply {}
impl INSObject for MPSImageMultiply {}
impl PNSObject for MPSImageMultiply {}
impl IMPSImageMultiply for MPSImageMultiply {}
pub trait IMPSImageMultiply: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageDivide(pub id);
impl std::ops::Deref for MPSImageDivide {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageDivide {}
impl MPSImageDivide {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageDivide").unwrap(), alloc) })
    }
}
impl IMPSImageArithmetic for MPSImageDivide {}
impl std::convert::TryFrom<MPSImageArithmetic> for MPSImageDivide {
    type Error = &'static str;
    fn try_from(parent: MPSImageArithmetic) -> Result<MPSImageDivide, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageDivide").unwrap()) };
        if is_kind_of {
            Ok(MPSImageDivide(parent.0))
        } else {
            Err("This MPSImageArithmetic cannot be downcasted to MPSImageDivide")
        }
    }
}
impl IMPSBinaryImageKernel for MPSImageDivide {}
impl IMPSKernel for MPSImageDivide {}
impl PNSCopying for MPSImageDivide {}
impl PNSSecureCoding for MPSImageDivide {}
impl INSObject for MPSImageDivide {}
impl PNSObject for MPSImageDivide {}
impl IMPSImageDivide for MPSImageDivide {}
pub trait IMPSImageDivide: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageMedian(pub id);
impl std::ops::Deref for MPSImageMedian {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageMedian {}
impl MPSImageMedian {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageMedian").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageMedian {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageMedian {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageMedian, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageMedian").unwrap()) };
        if is_kind_of {
            Ok(MPSImageMedian(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageMedian")
        }
    }
}
impl IMPSKernel for MPSImageMedian {}
impl PNSCopying for MPSImageMedian {}
impl PNSSecureCoding for MPSImageMedian {}
impl INSObject for MPSImageMedian {}
impl PNSObject for MPSImageMedian {}
impl IMPSImageMedian for MPSImageMedian {}
pub trait IMPSImageMedian: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelDiameter_(
        &self,
        device: *mut u64,
        kernelDiameter: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelDiameter : kernelDiameter)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn kernelDiameter(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelDiameter)
    }
    unsafe fn maxKernelDiameter() -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageMedian").unwrap(), maxKernelDiameter)
    }
    unsafe fn minKernelDiameter() -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageMedian").unwrap(), minKernelDiameter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageAreaMax(pub id);
impl std::ops::Deref for MPSImageAreaMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageAreaMax {}
impl MPSImageAreaMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageAreaMax").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageAreaMax {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageAreaMax {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageAreaMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageAreaMax").unwrap()) };
        if is_kind_of {
            Ok(MPSImageAreaMax(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageAreaMax")
        }
    }
}
impl IMPSKernel for MPSImageAreaMax {}
impl PNSCopying for MPSImageAreaMax {}
impl PNSSecureCoding for MPSImageAreaMax {}
impl INSObject for MPSImageAreaMax {}
impl PNSObject for MPSImageAreaMax {}
impl IMPSImageAreaMax for MPSImageAreaMax {}
pub trait IMPSImageAreaMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageAreaMin(pub id);
impl std::ops::Deref for MPSImageAreaMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageAreaMin {}
impl MPSImageAreaMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageAreaMin").unwrap(), alloc) })
    }
}
impl IMPSImageAreaMax for MPSImageAreaMin {}
impl From<MPSImageAreaMin> for MPSImageAreaMax {
    fn from(child: MPSImageAreaMin) -> MPSImageAreaMax {
        MPSImageAreaMax(child.0)
    }
}
impl std::convert::TryFrom<MPSImageAreaMax> for MPSImageAreaMin {
    type Error = &'static str;
    fn try_from(parent: MPSImageAreaMax) -> Result<MPSImageAreaMin, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageAreaMin").unwrap()) };
        if is_kind_of {
            Ok(MPSImageAreaMin(parent.0))
        } else {
            Err("This MPSImageAreaMax cannot be downcasted to MPSImageAreaMin")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageAreaMin {}
impl IMPSKernel for MPSImageAreaMin {}
impl PNSCopying for MPSImageAreaMin {}
impl PNSSecureCoding for MPSImageAreaMin {}
impl INSObject for MPSImageAreaMin {}
impl PNSObject for MPSImageAreaMin {}
impl IMPSImageAreaMin for MPSImageAreaMin {}
pub trait IMPSImageAreaMin: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageDilate(pub id);
impl std::ops::Deref for MPSImageDilate {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageDilate {}
impl MPSImageDilate {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageDilate").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageDilate {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageDilate {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageDilate, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageDilate").unwrap()) };
        if is_kind_of {
            Ok(MPSImageDilate(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageDilate")
        }
    }
}
impl IMPSKernel for MPSImageDilate {}
impl PNSCopying for MPSImageDilate {}
impl PNSSecureCoding for MPSImageDilate {}
impl INSObject for MPSImageDilate {}
impl PNSObject for MPSImageDilate {}
impl IMPSImageDilate for MPSImageDilate {}
pub trait IMPSImageDilate: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_values_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        values: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, values : values)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageErode(pub id);
impl std::ops::Deref for MPSImageErode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageErode {}
impl MPSImageErode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageErode").unwrap(), alloc) })
    }
}
impl IMPSImageDilate for MPSImageErode {}
impl From<MPSImageErode> for MPSImageDilate {
    fn from(child: MPSImageErode) -> MPSImageDilate {
        MPSImageDilate(child.0)
    }
}
impl std::convert::TryFrom<MPSImageDilate> for MPSImageErode {
    type Error = &'static str;
    fn try_from(parent: MPSImageDilate) -> Result<MPSImageErode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageErode").unwrap()) };
        if is_kind_of {
            Ok(MPSImageErode(parent.0))
        } else {
            Err("This MPSImageDilate cannot be downcasted to MPSImageErode")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageErode {}
impl IMPSKernel for MPSImageErode {}
impl PNSCopying for MPSImageErode {}
impl PNSSecureCoding for MPSImageErode {}
impl INSObject for MPSImageErode {}
impl PNSObject for MPSImageErode {}
impl IMPSImageErode for MPSImageErode {}
pub trait IMPSImageErode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceUnary(pub id);
impl std::ops::Deref for MPSImageReduceUnary {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceUnary {}
impl MPSImageReduceUnary {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceUnary").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceUnary {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageReduceUnary {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageReduceUnary, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceUnary").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceUnary(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageReduceUnary")
        }
    }
}
impl IMPSKernel for MPSImageReduceUnary {}
impl PNSCopying for MPSImageReduceUnary {}
impl PNSSecureCoding for MPSImageReduceUnary {}
impl INSObject for MPSImageReduceUnary {}
impl PNSObject for MPSImageReduceUnary {}
impl IMPSImageReduceUnary for MPSImageReduceUnary {}
pub trait IMPSImageReduceUnary: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceRowMin(pub id);
impl std::ops::Deref for MPSImageReduceRowMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceRowMin {}
impl MPSImageReduceRowMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceRowMin").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceRowMin {}
impl From<MPSImageReduceRowMin> for MPSImageReduceUnary {
    fn from(child: MPSImageReduceRowMin) -> MPSImageReduceUnary {
        MPSImageReduceUnary(child.0)
    }
}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceRowMin {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceRowMin, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceRowMin").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceRowMin(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceRowMin")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceRowMin {}
impl IMPSKernel for MPSImageReduceRowMin {}
impl PNSCopying for MPSImageReduceRowMin {}
impl PNSSecureCoding for MPSImageReduceRowMin {}
impl INSObject for MPSImageReduceRowMin {}
impl PNSObject for MPSImageReduceRowMin {}
impl IMPSImageReduceRowMin for MPSImageReduceRowMin {}
pub trait IMPSImageReduceRowMin: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceColumnMin(pub id);
impl std::ops::Deref for MPSImageReduceColumnMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceColumnMin {}
impl MPSImageReduceColumnMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceColumnMin").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceColumnMin {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceColumnMin {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceColumnMin, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceColumnMin").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceColumnMin(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceColumnMin")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceColumnMin {}
impl IMPSKernel for MPSImageReduceColumnMin {}
impl PNSCopying for MPSImageReduceColumnMin {}
impl PNSSecureCoding for MPSImageReduceColumnMin {}
impl INSObject for MPSImageReduceColumnMin {}
impl PNSObject for MPSImageReduceColumnMin {}
impl IMPSImageReduceColumnMin for MPSImageReduceColumnMin {}
pub trait IMPSImageReduceColumnMin: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceRowMax(pub id);
impl std::ops::Deref for MPSImageReduceRowMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceRowMax {}
impl MPSImageReduceRowMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceRowMax").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceRowMax {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceRowMax {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceRowMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceRowMax").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceRowMax(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceRowMax")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceRowMax {}
impl IMPSKernel for MPSImageReduceRowMax {}
impl PNSCopying for MPSImageReduceRowMax {}
impl PNSSecureCoding for MPSImageReduceRowMax {}
impl INSObject for MPSImageReduceRowMax {}
impl PNSObject for MPSImageReduceRowMax {}
impl IMPSImageReduceRowMax for MPSImageReduceRowMax {}
pub trait IMPSImageReduceRowMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceColumnMax(pub id);
impl std::ops::Deref for MPSImageReduceColumnMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceColumnMax {}
impl MPSImageReduceColumnMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceColumnMax").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceColumnMax {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceColumnMax {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceColumnMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceColumnMax").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceColumnMax(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceColumnMax")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceColumnMax {}
impl IMPSKernel for MPSImageReduceColumnMax {}
impl PNSCopying for MPSImageReduceColumnMax {}
impl PNSSecureCoding for MPSImageReduceColumnMax {}
impl INSObject for MPSImageReduceColumnMax {}
impl PNSObject for MPSImageReduceColumnMax {}
impl IMPSImageReduceColumnMax for MPSImageReduceColumnMax {}
pub trait IMPSImageReduceColumnMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceRowMean(pub id);
impl std::ops::Deref for MPSImageReduceRowMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceRowMean {}
impl MPSImageReduceRowMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceRowMean").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceRowMean {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceRowMean {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceRowMean, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceRowMean").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceRowMean(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceRowMean")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceRowMean {}
impl IMPSKernel for MPSImageReduceRowMean {}
impl PNSCopying for MPSImageReduceRowMean {}
impl PNSSecureCoding for MPSImageReduceRowMean {}
impl INSObject for MPSImageReduceRowMean {}
impl PNSObject for MPSImageReduceRowMean {}
impl IMPSImageReduceRowMean for MPSImageReduceRowMean {}
pub trait IMPSImageReduceRowMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceColumnMean(pub id);
impl std::ops::Deref for MPSImageReduceColumnMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceColumnMean {}
impl MPSImageReduceColumnMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceColumnMean").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceColumnMean {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceColumnMean {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceColumnMean, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceColumnMean").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceColumnMean(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceColumnMean")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceColumnMean {}
impl IMPSKernel for MPSImageReduceColumnMean {}
impl PNSCopying for MPSImageReduceColumnMean {}
impl PNSSecureCoding for MPSImageReduceColumnMean {}
impl INSObject for MPSImageReduceColumnMean {}
impl PNSObject for MPSImageReduceColumnMean {}
impl IMPSImageReduceColumnMean for MPSImageReduceColumnMean {}
pub trait IMPSImageReduceColumnMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceRowSum(pub id);
impl std::ops::Deref for MPSImageReduceRowSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceRowSum {}
impl MPSImageReduceRowSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceRowSum").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceRowSum {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceRowSum {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceRowSum, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceRowSum").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceRowSum(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceRowSum")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceRowSum {}
impl IMPSKernel for MPSImageReduceRowSum {}
impl PNSCopying for MPSImageReduceRowSum {}
impl PNSSecureCoding for MPSImageReduceRowSum {}
impl INSObject for MPSImageReduceRowSum {}
impl PNSObject for MPSImageReduceRowSum {}
impl IMPSImageReduceRowSum for MPSImageReduceRowSum {}
pub trait IMPSImageReduceRowSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageReduceColumnSum(pub id);
impl std::ops::Deref for MPSImageReduceColumnSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageReduceColumnSum {}
impl MPSImageReduceColumnSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageReduceColumnSum").unwrap(), alloc) })
    }
}
impl IMPSImageReduceUnary for MPSImageReduceColumnSum {}
impl std::convert::TryFrom<MPSImageReduceUnary> for MPSImageReduceColumnSum {
    type Error = &'static str;
    fn try_from(parent: MPSImageReduceUnary) -> Result<MPSImageReduceColumnSum, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageReduceColumnSum").unwrap()) };
        if is_kind_of {
            Ok(MPSImageReduceColumnSum(parent.0))
        } else {
            Err("This MPSImageReduceUnary cannot be downcasted to MPSImageReduceColumnSum")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageReduceColumnSum {}
impl IMPSKernel for MPSImageReduceColumnSum {}
impl PNSCopying for MPSImageReduceColumnSum {}
impl PNSSecureCoding for MPSImageReduceColumnSum {}
impl INSObject for MPSImageReduceColumnSum {}
impl PNSObject for MPSImageReduceColumnSum {}
impl IMPSImageReduceColumnSum for MPSImageReduceColumnSum {}
pub trait IMPSImageReduceColumnSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageScale(pub id);
impl std::ops::Deref for MPSImageScale {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageScale {}
impl MPSImageScale {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageScale").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageScale {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageScale {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageScale, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageScale").unwrap()) };
        if is_kind_of {
            Ok(MPSImageScale(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageScale")
        }
    }
}
impl IMPSKernel for MPSImageScale {}
impl PNSCopying for MPSImageScale {}
impl PNSSecureCoding for MPSImageScale {}
impl INSObject for MPSImageScale {}
impl PNSObject for MPSImageScale {}
impl IMPSImageScale for MPSImageScale {}
pub trait IMPSImageScale: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn scaleTransform(&self) -> *const MPSScaleTransform
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleTransform)
    }
    unsafe fn setScaleTransform_(&self, scaleTransform: *const MPSScaleTransform)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setScaleTransform : scaleTransform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageLanczosScale(pub id);
impl std::ops::Deref for MPSImageLanczosScale {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageLanczosScale {}
impl MPSImageLanczosScale {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageLanczosScale").unwrap(), alloc) })
    }
}
impl IMPSImageScale for MPSImageLanczosScale {}
impl From<MPSImageLanczosScale> for MPSImageScale {
    fn from(child: MPSImageLanczosScale) -> MPSImageScale {
        MPSImageScale(child.0)
    }
}
impl std::convert::TryFrom<MPSImageScale> for MPSImageLanczosScale {
    type Error = &'static str;
    fn try_from(parent: MPSImageScale) -> Result<MPSImageLanczosScale, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageLanczosScale").unwrap()) };
        if is_kind_of {
            Ok(MPSImageLanczosScale(parent.0))
        } else {
            Err("This MPSImageScale cannot be downcasted to MPSImageLanczosScale")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageLanczosScale {}
impl IMPSKernel for MPSImageLanczosScale {}
impl PNSCopying for MPSImageLanczosScale {}
impl PNSSecureCoding for MPSImageLanczosScale {}
impl INSObject for MPSImageLanczosScale {}
impl PNSObject for MPSImageLanczosScale {}
impl IMPSImageLanczosScale for MPSImageLanczosScale {}
pub trait IMPSImageLanczosScale: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageBilinearScale(pub id);
impl std::ops::Deref for MPSImageBilinearScale {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageBilinearScale {}
impl MPSImageBilinearScale {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageBilinearScale").unwrap(), alloc) })
    }
}
impl IMPSImageScale for MPSImageBilinearScale {}
impl std::convert::TryFrom<MPSImageScale> for MPSImageBilinearScale {
    type Error = &'static str;
    fn try_from(parent: MPSImageScale) -> Result<MPSImageBilinearScale, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageBilinearScale").unwrap()) };
        if is_kind_of {
            Ok(MPSImageBilinearScale(parent.0))
        } else {
            Err("This MPSImageScale cannot be downcasted to MPSImageBilinearScale")
        }
    }
}
impl IMPSUnaryImageKernel for MPSImageBilinearScale {}
impl IMPSKernel for MPSImageBilinearScale {}
impl PNSCopying for MPSImageBilinearScale {}
impl PNSSecureCoding for MPSImageBilinearScale {}
impl INSObject for MPSImageBilinearScale {}
impl PNSObject for MPSImageBilinearScale {}
impl IMPSImageBilinearScale for MPSImageBilinearScale {}
pub trait IMPSImageBilinearScale: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageStatisticsMinAndMax(pub id);
impl std::ops::Deref for MPSImageStatisticsMinAndMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageStatisticsMinAndMax {}
impl MPSImageStatisticsMinAndMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageStatisticsMinAndMax").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageStatisticsMinAndMax {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageStatisticsMinAndMax {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageStatisticsMinAndMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageStatisticsMinAndMax").unwrap()) };
        if is_kind_of {
            Ok(MPSImageStatisticsMinAndMax(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageStatisticsMinAndMax")
        }
    }
}
impl IMPSKernel for MPSImageStatisticsMinAndMax {}
impl PNSCopying for MPSImageStatisticsMinAndMax {}
impl PNSSecureCoding for MPSImageStatisticsMinAndMax {}
impl INSObject for MPSImageStatisticsMinAndMax {}
impl PNSObject for MPSImageStatisticsMinAndMax {}
impl IMPSImageStatisticsMinAndMax for MPSImageStatisticsMinAndMax {}
pub trait IMPSImageStatisticsMinAndMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageStatisticsMeanAndVariance(pub id);
impl std::ops::Deref for MPSImageStatisticsMeanAndVariance {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageStatisticsMeanAndVariance {}
impl MPSImageStatisticsMeanAndVariance {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageStatisticsMeanAndVariance").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageStatisticsMeanAndVariance {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageStatisticsMeanAndVariance {
    type Error = &'static str;
    fn try_from(
        parent: MPSUnaryImageKernel,
    ) -> Result<MPSImageStatisticsMeanAndVariance, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageStatisticsMeanAndVariance").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageStatisticsMeanAndVariance(parent.0))
        } else {
            Err ("This MPSUnaryImageKernel cannot be downcasted to MPSImageStatisticsMeanAndVariance" ,)
        }
    }
}
impl IMPSKernel for MPSImageStatisticsMeanAndVariance {}
impl PNSCopying for MPSImageStatisticsMeanAndVariance {}
impl PNSSecureCoding for MPSImageStatisticsMeanAndVariance {}
impl INSObject for MPSImageStatisticsMeanAndVariance {}
impl PNSObject for MPSImageStatisticsMeanAndVariance {}
impl IMPSImageStatisticsMeanAndVariance for MPSImageStatisticsMeanAndVariance {}
pub trait IMPSImageStatisticsMeanAndVariance: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageStatisticsMean(pub id);
impl std::ops::Deref for MPSImageStatisticsMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageStatisticsMean {}
impl MPSImageStatisticsMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageStatisticsMean").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageStatisticsMean {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageStatisticsMean {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageStatisticsMean, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageStatisticsMean").unwrap()) };
        if is_kind_of {
            Ok(MPSImageStatisticsMean(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageStatisticsMean")
        }
    }
}
impl IMPSKernel for MPSImageStatisticsMean {}
impl PNSCopying for MPSImageStatisticsMean {}
impl PNSSecureCoding for MPSImageStatisticsMean {}
impl INSObject for MPSImageStatisticsMean {}
impl PNSObject for MPSImageStatisticsMean {}
impl IMPSImageStatisticsMean for MPSImageStatisticsMean {}
pub trait IMPSImageStatisticsMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageThresholdBinary(pub id);
impl std::ops::Deref for MPSImageThresholdBinary {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageThresholdBinary {}
impl MPSImageThresholdBinary {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageThresholdBinary").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageThresholdBinary {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageThresholdBinary {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageThresholdBinary, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageThresholdBinary").unwrap()) };
        if is_kind_of {
            Ok(MPSImageThresholdBinary(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageThresholdBinary")
        }
    }
}
impl IMPSKernel for MPSImageThresholdBinary {}
impl PNSCopying for MPSImageThresholdBinary {}
impl PNSSecureCoding for MPSImageThresholdBinary {}
impl INSObject for MPSImageThresholdBinary {}
impl PNSObject for MPSImageThresholdBinary {}
impl IMPSImageThresholdBinary for MPSImageThresholdBinary {}
pub trait IMPSImageThresholdBinary: Sized + std::ops::Deref {
    unsafe fn initWithDevice_thresholdValue_maximumValue_linearGrayColorTransform_(
        &self,
        device: *mut u64,
        thresholdValue: f32,
        maximumValue: f32,
        transform: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, thresholdValue : thresholdValue, maximumValue : maximumValue, linearGrayColorTransform : transform)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn thresholdValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, thresholdValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn transform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageThresholdBinaryInverse(pub id);
impl std::ops::Deref for MPSImageThresholdBinaryInverse {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageThresholdBinaryInverse {}
impl MPSImageThresholdBinaryInverse {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageThresholdBinaryInverse").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageThresholdBinaryInverse {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageThresholdBinaryInverse {
    type Error = &'static str;
    fn try_from(
        parent: MPSUnaryImageKernel,
    ) -> Result<MPSImageThresholdBinaryInverse, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageThresholdBinaryInverse").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageThresholdBinaryInverse(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageThresholdBinaryInverse")
        }
    }
}
impl IMPSKernel for MPSImageThresholdBinaryInverse {}
impl PNSCopying for MPSImageThresholdBinaryInverse {}
impl PNSSecureCoding for MPSImageThresholdBinaryInverse {}
impl INSObject for MPSImageThresholdBinaryInverse {}
impl PNSObject for MPSImageThresholdBinaryInverse {}
impl IMPSImageThresholdBinaryInverse for MPSImageThresholdBinaryInverse {}
pub trait IMPSImageThresholdBinaryInverse: Sized + std::ops::Deref {
    unsafe fn initWithDevice_thresholdValue_maximumValue_linearGrayColorTransform_(
        &self,
        device: *mut u64,
        thresholdValue: f32,
        maximumValue: f32,
        transform: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, thresholdValue : thresholdValue, maximumValue : maximumValue, linearGrayColorTransform : transform)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn thresholdValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, thresholdValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn transform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageThresholdTruncate(pub id);
impl std::ops::Deref for MPSImageThresholdTruncate {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageThresholdTruncate {}
impl MPSImageThresholdTruncate {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageThresholdTruncate").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageThresholdTruncate {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageThresholdTruncate {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageThresholdTruncate, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageThresholdTruncate").unwrap()) };
        if is_kind_of {
            Ok(MPSImageThresholdTruncate(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageThresholdTruncate")
        }
    }
}
impl IMPSKernel for MPSImageThresholdTruncate {}
impl PNSCopying for MPSImageThresholdTruncate {}
impl PNSSecureCoding for MPSImageThresholdTruncate {}
impl INSObject for MPSImageThresholdTruncate {}
impl PNSObject for MPSImageThresholdTruncate {}
impl IMPSImageThresholdTruncate for MPSImageThresholdTruncate {}
pub trait IMPSImageThresholdTruncate: Sized + std::ops::Deref {
    unsafe fn initWithDevice_thresholdValue_linearGrayColorTransform_(
        &self,
        device: *mut u64,
        thresholdValue: f32,
        transform: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, thresholdValue : thresholdValue, linearGrayColorTransform : transform)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn thresholdValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, thresholdValue)
    }
    unsafe fn transform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageThresholdToZero(pub id);
impl std::ops::Deref for MPSImageThresholdToZero {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageThresholdToZero {}
impl MPSImageThresholdToZero {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageThresholdToZero").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageThresholdToZero {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageThresholdToZero {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageThresholdToZero, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageThresholdToZero").unwrap()) };
        if is_kind_of {
            Ok(MPSImageThresholdToZero(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageThresholdToZero")
        }
    }
}
impl IMPSKernel for MPSImageThresholdToZero {}
impl PNSCopying for MPSImageThresholdToZero {}
impl PNSSecureCoding for MPSImageThresholdToZero {}
impl INSObject for MPSImageThresholdToZero {}
impl PNSObject for MPSImageThresholdToZero {}
impl IMPSImageThresholdToZero for MPSImageThresholdToZero {}
pub trait IMPSImageThresholdToZero: Sized + std::ops::Deref {
    unsafe fn initWithDevice_thresholdValue_linearGrayColorTransform_(
        &self,
        device: *mut u64,
        thresholdValue: f32,
        transform: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, thresholdValue : thresholdValue, linearGrayColorTransform : transform)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn thresholdValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, thresholdValue)
    }
    unsafe fn transform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageThresholdToZeroInverse(pub id);
impl std::ops::Deref for MPSImageThresholdToZeroInverse {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageThresholdToZeroInverse {}
impl MPSImageThresholdToZeroInverse {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageThresholdToZeroInverse").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageThresholdToZeroInverse {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageThresholdToZeroInverse {
    type Error = &'static str;
    fn try_from(
        parent: MPSUnaryImageKernel,
    ) -> Result<MPSImageThresholdToZeroInverse, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageThresholdToZeroInverse").unwrap())
        };
        if is_kind_of {
            Ok(MPSImageThresholdToZeroInverse(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageThresholdToZeroInverse")
        }
    }
}
impl IMPSKernel for MPSImageThresholdToZeroInverse {}
impl PNSCopying for MPSImageThresholdToZeroInverse {}
impl PNSSecureCoding for MPSImageThresholdToZeroInverse {}
impl INSObject for MPSImageThresholdToZeroInverse {}
impl PNSObject for MPSImageThresholdToZeroInverse {}
impl IMPSImageThresholdToZeroInverse for MPSImageThresholdToZeroInverse {}
pub trait IMPSImageThresholdToZeroInverse: Sized + std::ops::Deref {
    unsafe fn initWithDevice_thresholdValue_linearGrayColorTransform_(
        &self,
        device: *mut u64,
        thresholdValue: f32,
        transform: *const f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, thresholdValue : thresholdValue, linearGrayColorTransform : transform)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn thresholdValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, thresholdValue)
    }
    unsafe fn transform(&self) -> *const f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transform)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSImageTranspose(pub id);
impl std::ops::Deref for MPSImageTranspose {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSImageTranspose {}
impl MPSImageTranspose {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSImageTranspose").unwrap(), alloc) })
    }
}
impl IMPSUnaryImageKernel for MPSImageTranspose {}
impl std::convert::TryFrom<MPSUnaryImageKernel> for MPSImageTranspose {
    type Error = &'static str;
    fn try_from(parent: MPSUnaryImageKernel) -> Result<MPSImageTranspose, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSImageTranspose").unwrap()) };
        if is_kind_of {
            Ok(MPSImageTranspose(parent.0))
        } else {
            Err("This MPSUnaryImageKernel cannot be downcasted to MPSImageTranspose")
        }
    }
}
impl IMPSKernel for MPSImageTranspose {}
impl PNSCopying for MPSImageTranspose {}
impl PNSSecureCoding for MPSImageTranspose {}
impl INSObject for MPSImageTranspose {}
impl PNSObject for MPSImageTranspose {}
impl IMPSImageTranspose for MPSImageTranspose {}
pub trait IMPSImageTranspose: Sized + std::ops::Deref {}
pub type MPSCNNConvolutionFlags = NSUInteger;
pub type MPSCNNBinaryConvolutionFlags = NSUInteger;
pub type MPSCNNBinaryConvolutionType = NSUInteger;
pub type MPSNNConvolutionAccumulatorPrecisionOption = NSUInteger;
pub type MPSNNTrainingStyle = NSUInteger;
pub type MPSCNNBatchNormalizationFlags = NSUInteger;
pub type MPSNNPaddingMethod = NSUInteger;
pub trait PMPSNNPadding: Sized + std::ops::Deref {
    unsafe fn paddingMethod(&self) -> MPSNNPaddingMethod
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, paddingMethod)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn destinationImageDescriptorForSourceImages_sourceStates_forKernel_suggestedDescriptor_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
        kernel: MPSKernel,
        inDescriptor: MPSImageDescriptor,
    ) -> MPSImageDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, destinationImageDescriptorForSourceImages : sourceImages, sourceStates : sourceStates, forKernel : kernel, suggestedDescriptor : inDescriptor)
    }
    unsafe fn inverse(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inverse)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNDefaultPadding(pub id);
impl std::ops::Deref for MPSNNDefaultPadding {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNDefaultPadding {}
impl MPSNNDefaultPadding {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNDefaultPadding").unwrap(), alloc) })
    }
}
impl PMPSNNPadding for MPSNNDefaultPadding {}
impl INSObject for MPSNNDefaultPadding {}
impl PNSObject for MPSNNDefaultPadding {}
impl std::convert::TryFrom<NSObject> for MPSNNDefaultPadding {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNNDefaultPadding, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNDefaultPadding").unwrap()) };
        if is_kind_of {
            Ok(MPSNNDefaultPadding(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNNDefaultPadding")
        }
    }
}
impl IMPSNNDefaultPadding for MPSNNDefaultPadding {}
pub trait IMPSNNDefaultPadding: Sized + std::ops::Deref {
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn paddingWithMethod_(method: MPSNNPaddingMethod) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNDefaultPadding").unwrap(), paddingWithMethod : method)
    }
    unsafe fn paddingForTensorflowAveragePooling() -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNDefaultPadding").unwrap(), paddingForTensorflowAveragePooling)
    }
    unsafe fn paddingForTensorflowAveragePoolingValidOnly() -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNDefaultPadding").unwrap(), paddingForTensorflowAveragePoolingValidOnly)
    }
}
pub trait PMPSImageSizeEncodingState: Sized + std::ops::Deref {
    unsafe fn sourceWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceWidth)
    }
    unsafe fn sourceHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceHeight)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGradientState(pub id);
impl std::ops::Deref for MPSNNGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGradientState {}
impl MPSNNGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGradientState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSNNGradientState {}
impl From<MPSNNGradientState> for MPSState {
    fn from(child: MPSNNGradientState) -> MPSState {
        MPSState(child.0)
    }
}
impl std::convert::TryFrom<MPSState> for MPSNNGradientState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSNNGradientState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGradientState").unwrap()) };
        if is_kind_of {
            Ok(MPSNNGradientState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSNNGradientState")
        }
    }
}
impl INSObject for MPSNNGradientState {}
impl PNSObject for MPSNNGradientState {}
impl IMPSNNGradientState for MPSNNGradientState {}
pub trait IMPSNNGradientState: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNBinaryGradientState(pub id);
impl std::ops::Deref for MPSNNBinaryGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNBinaryGradientState {}
impl MPSNNBinaryGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNBinaryGradientState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSNNBinaryGradientState {}
impl std::convert::TryFrom<MPSState> for MPSNNBinaryGradientState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSNNBinaryGradientState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNBinaryGradientState").unwrap()) };
        if is_kind_of {
            Ok(MPSNNBinaryGradientState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSNNBinaryGradientState")
        }
    }
}
impl INSObject for MPSNNBinaryGradientState {}
impl PNSObject for MPSNNBinaryGradientState {}
impl IMPSNNBinaryGradientState for MPSNNBinaryGradientState {}
pub trait IMPSNNBinaryGradientState: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNMultiaryGradientState(pub id);
impl std::ops::Deref for MPSNNMultiaryGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNMultiaryGradientState {}
impl MPSNNMultiaryGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNMultiaryGradientState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSNNMultiaryGradientState {}
impl std::convert::TryFrom<MPSState> for MPSNNMultiaryGradientState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSNNMultiaryGradientState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNMultiaryGradientState").unwrap()) };
        if is_kind_of {
            Ok(MPSNNMultiaryGradientState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSNNMultiaryGradientState")
        }
    }
}
impl INSObject for MPSNNMultiaryGradientState {}
impl PNSObject for MPSNNMultiaryGradientState {}
impl IMPSNNMultiaryGradientState for MPSNNMultiaryGradientState {}
pub trait IMPSNNMultiaryGradientState: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNKernel(pub id);
impl std::ops::Deref for MPSCNNKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNKernel {}
impl MPSCNNKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSCNNKernel {}
impl PNSCopying for MPSCNNKernel {}
impl PNSSecureCoding for MPSCNNKernel {}
impl std::convert::TryFrom<MPSKernel> for MPSCNNKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSCNNKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSCNNKernel")
        }
    }
}
impl INSObject for MPSCNNKernel {}
impl PNSObject for MPSCNNKernel {}
impl IMPSCNNKernel for MPSCNNKernel {}
pub trait IMPSCNNKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationImage : destinationImage)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationState_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        destinationState: MPSState,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationState : destinationState, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationImages : destinationImages)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationStates_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationStates: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationStates : destinationStates, destinationImages : destinationImages)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationState_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        outState: *mut MPSState,
        isTemporary: BOOL,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationState : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationStates_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        outStates: *mut *mut MPSStateBatch,
        isTemporary: BOOL,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationStates : outStates, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn resultStateBatchForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateBatchForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateBatchForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateBatchForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn isResultStateReusedAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isResultStateReusedAcrossBatch)
    }
    unsafe fn appendBatchBarrier(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, appendBatchBarrier)
    }
    unsafe fn destinationImageDescriptorForSourceImages_sourceStates_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
    ) -> MPSImageDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, destinationImageDescriptorForSourceImages : sourceImages, sourceStates : sourceStates)
    }
    unsafe fn encodingStorageSizeForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodingStorageSizeForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn batchEncodingStorageSizeForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, batchEncodingStorageSizeForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn offset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, offset)
    }
    unsafe fn setOffset_(&self, offset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOffset : offset)
    }
    unsafe fn clipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRect)
    }
    unsafe fn setClipRect_(&self, clipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRect : clipRect)
    }
    unsafe fn destinationFeatureChannelOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationFeatureChannelOffset)
    }
    unsafe fn setDestinationFeatureChannelOffset_(
        &self,
        destinationFeatureChannelOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationFeatureChannelOffset : destinationFeatureChannelOffset)
    }
    unsafe fn sourceFeatureChannelOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceFeatureChannelOffset)
    }
    unsafe fn setSourceFeatureChannelOffset_(&self, sourceFeatureChannelOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceFeatureChannelOffset : sourceFeatureChannelOffset)
    }
    unsafe fn sourceFeatureChannelMaxCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceFeatureChannelMaxCount)
    }
    unsafe fn setSourceFeatureChannelMaxCount_(&self, sourceFeatureChannelMaxCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceFeatureChannelMaxCount : sourceFeatureChannelMaxCount)
    }
    unsafe fn edgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, edgeMode)
    }
    unsafe fn setEdgeMode_(&self, edgeMode: MPSImageEdgeMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEdgeMode : edgeMode)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn strideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsX)
    }
    unsafe fn strideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsY)
    }
    unsafe fn dilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateX)
    }
    unsafe fn dilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateY)
    }
    unsafe fn isBackwards(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isBackwards)
    }
    unsafe fn isStateModified(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isStateModified)
    }
    unsafe fn padding(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, padding)
    }
    unsafe fn setPadding_(&self, padding: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPadding : padding)
    }
    unsafe fn destinationImageAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationImageAllocator)
    }
    unsafe fn setDestinationImageAllocator_(&self, destinationImageAllocator: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationImageAllocator : destinationImageAllocator)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBinaryKernel(pub id);
impl std::ops::Deref for MPSCNNBinaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBinaryKernel {}
impl MPSCNNBinaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSCNNBinaryKernel {}
impl PNSCopying for MPSCNNBinaryKernel {}
impl PNSSecureCoding for MPSCNNBinaryKernel {}
impl std::convert::TryFrom<MPSKernel> for MPSCNNBinaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSCNNBinaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBinaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNBinaryKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSCNNBinaryKernel")
        }
    }
}
impl INSObject for MPSCNNBinaryKernel {}
impl PNSObject for MPSCNNBinaryKernel {}
impl IMPSCNNBinaryKernel for MPSCNNBinaryKernel {}
pub trait IMPSCNNBinaryKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_primaryImages_secondaryImages_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        primaryImages: NSArray,
        secondaryImages: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, primaryImages : primaryImages, secondaryImages : secondaryImages, destinationImages : destinationImages)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage)
    }
    unsafe fn encodeBatchToCommandBuffer_primaryImages_secondaryImages_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: NSArray,
        secondaryImage: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, primaryImages : primaryImage, secondaryImages : secondaryImage)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_destinationState_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        outState: *mut MPSState,
        isTemporary: BOOL,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, destinationState : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn encodeBatchToCommandBuffer_primaryImages_secondaryImages_destinationStates_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        primaryImages: NSArray,
        secondaryImages: NSArray,
        outState: *mut *mut MPSStateBatch,
        isTemporary: BOOL,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, primaryImages : primaryImages, secondaryImages : secondaryImages, destinationStates : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn resultStateForPrimaryImage_secondaryImage_sourceStates_destinationImage_(
        &self,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForPrimaryImage : primaryImage, secondaryImage : secondaryImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn resultStateBatchForPrimaryImage_secondaryImage_sourceStates_destinationImage_(
        &self,
        primaryImage: NSArray,
        secondaryImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateBatchForPrimaryImage : primaryImage, secondaryImage : secondaryImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_primaryImage_secondaryImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateBatchForCommandBuffer_primaryImage_secondaryImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: NSArray,
        secondaryImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateBatchForCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn isResultStateReusedAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isResultStateReusedAcrossBatch)
    }
    unsafe fn appendBatchBarrier(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, appendBatchBarrier)
    }
    unsafe fn destinationImageDescriptorForSourceImages_sourceStates_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
    ) -> MPSImageDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, destinationImageDescriptorForSourceImages : sourceImages, sourceStates : sourceStates)
    }
    unsafe fn encodingStorageSizeForPrimaryImage_secondaryImage_sourceStates_destinationImage_(
        &self,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodingStorageSizeForPrimaryImage : primaryImage, secondaryImage : secondaryImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn batchEncodingStorageSizeForPrimaryImage_secondaryImage_sourceStates_destinationImage_(
        &self,
        primaryImage: NSArray,
        secondaryImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, batchEncodingStorageSizeForPrimaryImage : primaryImage, secondaryImage : secondaryImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn primaryOffset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryOffset)
    }
    unsafe fn setPrimaryOffset_(&self, primaryOffset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryOffset : primaryOffset)
    }
    unsafe fn secondaryOffset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryOffset)
    }
    unsafe fn setSecondaryOffset_(&self, secondaryOffset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryOffset : secondaryOffset)
    }
    unsafe fn clipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRect)
    }
    unsafe fn setClipRect_(&self, clipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRect : clipRect)
    }
    unsafe fn destinationFeatureChannelOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationFeatureChannelOffset)
    }
    unsafe fn setDestinationFeatureChannelOffset_(
        &self,
        destinationFeatureChannelOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationFeatureChannelOffset : destinationFeatureChannelOffset)
    }
    unsafe fn primarySourceFeatureChannelOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primarySourceFeatureChannelOffset)
    }
    unsafe fn setPrimarySourceFeatureChannelOffset_(
        &self,
        primarySourceFeatureChannelOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimarySourceFeatureChannelOffset : primarySourceFeatureChannelOffset)
    }
    unsafe fn secondarySourceFeatureChannelOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondarySourceFeatureChannelOffset)
    }
    unsafe fn setSecondarySourceFeatureChannelOffset_(
        &self,
        secondarySourceFeatureChannelOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondarySourceFeatureChannelOffset : secondarySourceFeatureChannelOffset)
    }
    unsafe fn primarySourceFeatureChannelMaxCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primarySourceFeatureChannelMaxCount)
    }
    unsafe fn setPrimarySourceFeatureChannelMaxCount_(
        &self,
        primarySourceFeatureChannelMaxCount: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimarySourceFeatureChannelMaxCount : primarySourceFeatureChannelMaxCount)
    }
    unsafe fn secondarySourceFeatureChannelMaxCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondarySourceFeatureChannelMaxCount)
    }
    unsafe fn setSecondarySourceFeatureChannelMaxCount_(
        &self,
        secondarySourceFeatureChannelMaxCount: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondarySourceFeatureChannelMaxCount : secondarySourceFeatureChannelMaxCount)
    }
    unsafe fn primaryEdgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryEdgeMode)
    }
    unsafe fn setPrimaryEdgeMode_(&self, primaryEdgeMode: MPSImageEdgeMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryEdgeMode : primaryEdgeMode)
    }
    unsafe fn secondaryEdgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryEdgeMode)
    }
    unsafe fn setSecondaryEdgeMode_(&self, secondaryEdgeMode: MPSImageEdgeMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryEdgeMode : secondaryEdgeMode)
    }
    unsafe fn primaryKernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryKernelWidth)
    }
    unsafe fn primaryKernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryKernelHeight)
    }
    unsafe fn secondaryKernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryKernelWidth)
    }
    unsafe fn secondaryKernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryKernelHeight)
    }
    unsafe fn primaryStrideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInPixelsX)
    }
    unsafe fn setPrimaryStrideInPixelsX_(&self, primaryStrideInPixelsX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInPixelsX : primaryStrideInPixelsX)
    }
    unsafe fn primaryStrideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInPixelsY)
    }
    unsafe fn setPrimaryStrideInPixelsY_(&self, primaryStrideInPixelsY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInPixelsY : primaryStrideInPixelsY)
    }
    unsafe fn secondaryStrideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixelsX)
    }
    unsafe fn setSecondaryStrideInPixelsX_(&self, secondaryStrideInPixelsX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixelsX : secondaryStrideInPixelsX)
    }
    unsafe fn secondaryStrideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixelsY)
    }
    unsafe fn setSecondaryStrideInPixelsY_(&self, secondaryStrideInPixelsY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixelsY : secondaryStrideInPixelsY)
    }
    unsafe fn primaryDilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryDilationRateX)
    }
    unsafe fn primaryDilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryDilationRateY)
    }
    unsafe fn secondaryDilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryDilationRateX)
    }
    unsafe fn secondaryDilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryDilationRateY)
    }
    unsafe fn isBackwards(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isBackwards)
    }
    unsafe fn isStateModified(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isStateModified)
    }
    unsafe fn padding(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, padding)
    }
    unsafe fn setPadding_(&self, padding: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPadding : padding)
    }
    unsafe fn destinationImageAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationImageAllocator)
    }
    unsafe fn setDestinationImageAllocator_(&self, destinationImageAllocator: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationImageAllocator : destinationImageAllocator)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNGradientKernel(pub id);
impl std::ops::Deref for MPSCNNGradientKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNGradientKernel {}
impl MPSCNNGradientKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGradientKernel").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryKernel for MPSCNNGradientKernel {}
impl From<MPSCNNGradientKernel> for MPSCNNBinaryKernel {
    fn from(child: MPSCNNGradientKernel) -> MPSCNNBinaryKernel {
        MPSCNNBinaryKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNBinaryKernel> for MPSCNNGradientKernel {
    type Error = &'static str;
    fn try_from(parent: MPSCNNBinaryKernel) -> Result<MPSCNNGradientKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNGradientKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNGradientKernel(parent.0))
        } else {
            Err("This MPSCNNBinaryKernel cannot be downcasted to MPSCNNGradientKernel")
        }
    }
}
impl IMPSKernel for MPSCNNGradientKernel {}
impl PNSCopying for MPSCNNGradientKernel {}
impl PNSSecureCoding for MPSCNNGradientKernel {}
impl INSObject for MPSCNNGradientKernel {}
impl PNSObject for MPSCNNGradientKernel {}
impl IMPSCNNGradientKernel for MPSCNNGradientKernel {}
pub trait IMPSCNNGradientKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceGradient_sourceImage_gradientState_(
        &self,
        commandBuffer: *mut u64,
        sourceGradient: MPSImage,
        sourceImage: MPSImage,
        gradientState: MPSState,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn encodeToCommandBuffer_sourceGradient_sourceImage_gradientState_destinationGradient_(
        &self,
        commandBuffer: *mut u64,
        sourceGradient: MPSImage,
        sourceImage: MPSImage,
        gradientState: MPSState,
        destinationGradient: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, destinationGradient : destinationGradient)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_gradientStates_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        gradientStates: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, gradientStates : gradientStates)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_gradientStates_destinationGradients_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        gradientStates: NSArray,
        destinationGradients: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, gradientStates : gradientStates, destinationGradients : destinationGradients)
    }
    unsafe fn kernelOffsetX(&self) -> NSInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelOffsetX)
    }
    unsafe fn setKernelOffsetX_(&self, kernelOffsetX: NSInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelOffsetX : kernelOffsetX)
    }
    unsafe fn kernelOffsetY(&self) -> NSInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelOffsetY)
    }
    unsafe fn setKernelOffsetY_(&self, kernelOffsetY: NSInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelOffsetY : kernelOffsetY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNMultiaryKernel(pub id);
impl std::ops::Deref for MPSCNNMultiaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNMultiaryKernel {}
impl MPSCNNMultiaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNMultiaryKernel").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSCNNMultiaryKernel {}
impl PNSCopying for MPSCNNMultiaryKernel {}
impl PNSSecureCoding for MPSCNNMultiaryKernel {}
impl std::convert::TryFrom<MPSKernel> for MPSCNNMultiaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSCNNMultiaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNMultiaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNMultiaryKernel(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSCNNMultiaryKernel")
        }
    }
}
impl INSObject for MPSCNNMultiaryKernel {}
impl PNSObject for MPSCNNMultiaryKernel {}
impl IMPSCNNMultiaryKernel for MPSCNNMultiaryKernel {}
pub trait IMPSCNNMultiaryKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        sourceCount: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : sourceCount)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn offsetAtIndex_(&self, index: NSUInteger) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, offsetAtIndex : index)
    }
    unsafe fn setOffset_atIndex_(&self, offset: MPSOffset, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOffset : offset, atIndex : index)
    }
    unsafe fn sourceFeatureChannelOffsetAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, sourceFeatureChannelOffsetAtIndex : index)
    }
    unsafe fn setSourceFeatureChannelOffset_atIndex_(&self, offset: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceFeatureChannelOffset : offset, atIndex : index)
    }
    unsafe fn sourceFeatureChannelMaxCountAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, sourceFeatureChannelMaxCountAtIndex : index)
    }
    unsafe fn setSourceFeatureChannelMaxCount_atIndex_(&self, count: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceFeatureChannelMaxCount : count, atIndex : index)
    }
    unsafe fn edgeModeAtIndex_(&self, index: NSUInteger) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, edgeModeAtIndex : index)
    }
    unsafe fn setEdgeMode_atIndex_(&self, edgeMode: MPSImageEdgeMode, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEdgeMode : edgeMode, atIndex : index)
    }
    unsafe fn kernelWidthAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, kernelWidthAtIndex : index)
    }
    unsafe fn setKernelWidth_atIndex_(&self, width: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelWidth : width, atIndex : index)
    }
    unsafe fn kernelHeightAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, kernelHeightAtIndex : index)
    }
    unsafe fn setKernelHeight_atIndex_(&self, height: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelHeight : height, atIndex : index)
    }
    unsafe fn strideInPixelsXatIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, strideInPixelsXatIndex : index)
    }
    unsafe fn setStrideInPixelsX_atIndex_(&self, stride: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrideInPixelsX : stride, atIndex : index)
    }
    unsafe fn strideInPixelsYatIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, strideInPixelsYatIndex : index)
    }
    unsafe fn setStrideInPixelsY_atIndex_(&self, stride: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrideInPixelsY : stride, atIndex : index)
    }
    unsafe fn dilationRateXatIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, dilationRateXatIndex : index)
    }
    unsafe fn setDilationRateX_atIndex_(&self, dilationRate: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDilationRateX : dilationRate, atIndex : index)
    }
    unsafe fn dilationRateYatIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, dilationRateYatIndex : index)
    }
    unsafe fn setDilationRateY_atIndex_(&self, dilationRate: NSUInteger, index: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDilationRateY : dilationRate, atIndex : index)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImages_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationImages : destinationImages)
    }
    unsafe fn encodeToCommandBuffer_sourceImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImages : sourceImages)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImageBatches: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImageBatches)
    }
    unsafe fn encodeToCommandBuffer_sourceImages_destinationState_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        outState: *mut MPSState,
        isTemporary: BOOL,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationState : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationStates_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImageBatches: NSArray,
        outState: *mut *mut MPSStateBatch,
        isTemporary: BOOL,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImageBatches, destinationStates : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn isResultStateReusedAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isResultStateReusedAcrossBatch)
    }
    unsafe fn appendBatchBarrier(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, appendBatchBarrier)
    }
    unsafe fn resultStateForSourceImages_sourceStates_destinationImage_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImages : sourceImages, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn resultStateBatchForSourceImages_sourceStates_destinationImage_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateBatchForSourceImages : sourceImages, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImages_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImages : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateBatchForCommandBuffer_sourceImages_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateBatchForCommandBuffer : commandBuffer, sourceImages : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn destinationImageDescriptorForSourceImages_sourceStates_(
        &self,
        sourceImages: NSArray,
        sourceStates: NSArray,
    ) -> MPSImageDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, destinationImageDescriptorForSourceImages : sourceImages, sourceStates : sourceStates)
    }
    unsafe fn sourceCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceCount)
    }
    unsafe fn clipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRect)
    }
    unsafe fn setClipRect_(&self, clipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRect : clipRect)
    }
    unsafe fn destinationFeatureChannelOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationFeatureChannelOffset)
    }
    unsafe fn setDestinationFeatureChannelOffset_(
        &self,
        destinationFeatureChannelOffset: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationFeatureChannelOffset : destinationFeatureChannelOffset)
    }
    unsafe fn isBackwards(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isBackwards)
    }
    unsafe fn isStateModified(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isStateModified)
    }
    unsafe fn padding(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, padding)
    }
    unsafe fn setPadding_(&self, padding: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPadding : padding)
    }
    unsafe fn destinationImageAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationImageAllocator)
    }
    unsafe fn setDestinationImageAllocator_(&self, destinationImageAllocator: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationImageAllocator : destinationImageAllocator)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSpatialNormalization(pub id);
impl std::ops::Deref for MPSCNNSpatialNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSpatialNormalization {}
impl MPSCNNSpatialNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalization").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNSpatialNormalization {}
impl From<MPSCNNSpatialNormalization> for MPSCNNKernel {
    fn from(child: MPSCNNSpatialNormalization) -> MPSCNNKernel {
        MPSCNNKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNSpatialNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNSpatialNormalization, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalization").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSpatialNormalization(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNSpatialNormalization")
        }
    }
}
impl IMPSKernel for MPSCNNSpatialNormalization {}
impl PNSCopying for MPSCNNSpatialNormalization {}
impl PNSSecureCoding for MPSCNNSpatialNormalization {}
impl INSObject for MPSCNNSpatialNormalization {}
impl PNSObject for MPSCNNSpatialNormalization {}
impl IMPSCNNSpatialNormalization for MPSCNNSpatialNormalization {}
pub trait IMPSCNNSpatialNormalization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSpatialNormalizationGradient(pub id);
impl std::ops::Deref for MPSCNNSpatialNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSpatialNormalizationGradient {}
impl MPSCNNSpatialNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNSpatialNormalizationGradient {}
impl From<MPSCNNSpatialNormalizationGradient> for MPSCNNGradientKernel {
    fn from(child: MPSCNNSpatialNormalizationGradient) -> MPSCNNGradientKernel {
        MPSCNNGradientKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNSpatialNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNSpatialNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNSpatialNormalizationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNSpatialNormalizationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNSpatialNormalizationGradient {}
impl IMPSKernel for MPSCNNSpatialNormalizationGradient {}
impl PNSCopying for MPSCNNSpatialNormalizationGradient {}
impl PNSSecureCoding for MPSCNNSpatialNormalizationGradient {}
impl INSObject for MPSCNNSpatialNormalizationGradient {}
impl PNSObject for MPSCNNSpatialNormalizationGradient {}
impl IMPSCNNSpatialNormalizationGradient for MPSCNNSpatialNormalizationGradient {}
pub trait IMPSCNNSpatialNormalizationGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLocalContrastNormalization(pub id);
impl std::ops::Deref for MPSCNNLocalContrastNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLocalContrastNormalization {}
impl MPSCNNLocalContrastNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalization").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNLocalContrastNormalization {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNLocalContrastNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNLocalContrastNormalization, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalization").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNLocalContrastNormalization(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNLocalContrastNormalization")
        }
    }
}
impl IMPSKernel for MPSCNNLocalContrastNormalization {}
impl PNSCopying for MPSCNNLocalContrastNormalization {}
impl PNSSecureCoding for MPSCNNLocalContrastNormalization {}
impl INSObject for MPSCNNLocalContrastNormalization {}
impl PNSObject for MPSCNNLocalContrastNormalization {}
impl IMPSCNNLocalContrastNormalization for MPSCNNLocalContrastNormalization {}
pub trait IMPSCNNLocalContrastNormalization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn p0(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, p0)
    }
    unsafe fn setP0_(&self, p0: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setP0 : p0)
    }
    unsafe fn pm(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pm)
    }
    unsafe fn setPm_(&self, pm: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPm : pm)
    }
    unsafe fn ps(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, ps)
    }
    unsafe fn setPs_(&self, ps: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPs : ps)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLocalContrastNormalizationGradient(pub id);
impl std::ops::Deref for MPSCNNLocalContrastNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLocalContrastNormalizationGradient {}
impl MPSCNNLocalContrastNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNLocalContrastNormalizationGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNLocalContrastNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNLocalContrastNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNLocalContrastNormalizationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNLocalContrastNormalizationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNLocalContrastNormalizationGradient {}
impl IMPSKernel for MPSCNNLocalContrastNormalizationGradient {}
impl PNSCopying for MPSCNNLocalContrastNormalizationGradient {}
impl PNSSecureCoding for MPSCNNLocalContrastNormalizationGradient {}
impl INSObject for MPSCNNLocalContrastNormalizationGradient {}
impl PNSObject for MPSCNNLocalContrastNormalizationGradient {}
impl IMPSCNNLocalContrastNormalizationGradient for MPSCNNLocalContrastNormalizationGradient {}
pub trait IMPSCNNLocalContrastNormalizationGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn p0(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, p0)
    }
    unsafe fn setP0_(&self, p0: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setP0 : p0)
    }
    unsafe fn pm(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pm)
    }
    unsafe fn setPm_(&self, pm: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPm : pm)
    }
    unsafe fn ps(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, ps)
    }
    unsafe fn setPs_(&self, ps: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPs : ps)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNCrossChannelNormalization(pub id);
impl std::ops::Deref for MPSCNNCrossChannelNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNCrossChannelNormalization {}
impl MPSCNNCrossChannelNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalization").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNCrossChannelNormalization {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNCrossChannelNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNCrossChannelNormalization, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalization").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNCrossChannelNormalization(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNCrossChannelNormalization")
        }
    }
}
impl IMPSKernel for MPSCNNCrossChannelNormalization {}
impl PNSCopying for MPSCNNCrossChannelNormalization {}
impl PNSSecureCoding for MPSCNNCrossChannelNormalization {}
impl INSObject for MPSCNNCrossChannelNormalization {}
impl PNSObject for MPSCNNCrossChannelNormalization {}
impl IMPSCNNCrossChannelNormalization for MPSCNNCrossChannelNormalization {}
pub trait IMPSCNNCrossChannelNormalization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelSize_(
        &self,
        device: *mut u64,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelSize : kernelSize)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn kernelSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNCrossChannelNormalizationGradient(pub id);
impl std::ops::Deref for MPSCNNCrossChannelNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNCrossChannelNormalizationGradient {}
impl MPSCNNCrossChannelNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNCrossChannelNormalizationGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNCrossChannelNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNCrossChannelNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNCrossChannelNormalizationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNCrossChannelNormalizationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNCrossChannelNormalizationGradient {}
impl IMPSKernel for MPSCNNCrossChannelNormalizationGradient {}
impl PNSCopying for MPSCNNCrossChannelNormalizationGradient {}
impl PNSSecureCoding for MPSCNNCrossChannelNormalizationGradient {}
impl INSObject for MPSCNNCrossChannelNormalizationGradient {}
impl PNSObject for MPSCNNCrossChannelNormalizationGradient {}
impl IMPSCNNCrossChannelNormalizationGradient for MPSCNNCrossChannelNormalizationGradient {}
pub trait IMPSCNNCrossChannelNormalizationGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelSize_(
        &self,
        device: *mut u64,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelSize : kernelSize)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn kernelSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelSize)
    }
}
pub type MPSCNNNeuronType = i32;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNNeuronDescriptor(pub id);
impl std::ops::Deref for MPSNNNeuronDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNNeuronDescriptor {}
impl MPSNNNeuronDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSNNNeuronDescriptor {}
impl PNSSecureCoding for MPSNNNeuronDescriptor {}
impl INSObject for MPSNNNeuronDescriptor {}
impl PNSObject for MPSNNNeuronDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSNNNeuronDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNNNeuronDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSNNNeuronDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNNNeuronDescriptor")
        }
    }
}
impl IMPSNNNeuronDescriptor for MPSNNNeuronDescriptor {}
pub trait IMPSNNNeuronDescriptor: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn setNeuronType_(&self, neuronType: MPSCNNNeuronType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType)
    }
    unsafe fn a(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, a)
    }
    unsafe fn setA_(&self, a: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setA : a)
    }
    unsafe fn b(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, b)
    }
    unsafe fn setB_(&self, b: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setB : b)
    }
    unsafe fn c(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, c)
    }
    unsafe fn setC_(&self, c: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setC : c)
    }
    unsafe fn data(&self) -> NSData
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, data)
    }
    unsafe fn setData_(&self, data: NSData)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setData : data)
    }
    unsafe fn cnnNeuronDescriptorWithType_(neuronType: MPSCNNNeuronType) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap(), cnnNeuronDescriptorWithType : neuronType)
    }
    unsafe fn cnnNeuronDescriptorWithType_a_(
        neuronType: MPSCNNNeuronType,
        a: f32,
    ) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap(), cnnNeuronDescriptorWithType : neuronType, a : a)
    }
    unsafe fn cnnNeuronDescriptorWithType_a_b_(
        neuronType: MPSCNNNeuronType,
        a: f32,
        b: f32,
    ) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap(), cnnNeuronDescriptorWithType : neuronType, a : a, b : b)
    }
    unsafe fn cnnNeuronDescriptorWithType_a_b_c_(
        neuronType: MPSCNNNeuronType,
        a: f32,
        b: f32,
        c: f32,
    ) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap(), cnnNeuronDescriptorWithType : neuronType, a : a, b : b, c : c)
    }
    unsafe fn cnnNeuronPReLUDescriptorWithData_noCopy_(
        data: NSData,
        noCopy: bool,
    ) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNNeuronDescriptor").unwrap(), cnnNeuronPReLUDescriptorWithData : data, noCopy : noCopy)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuron(pub id);
impl std::ops::Deref for MPSCNNNeuron {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuron {}
impl MPSCNNNeuron {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuron").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNNeuron {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNNeuron {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNNeuron, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuron").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuron(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNNeuron")
        }
    }
}
impl IMPSKernel for MPSCNNNeuron {}
impl PNSCopying for MPSCNNNeuron {}
impl PNSSecureCoding for MPSCNNNeuron {}
impl INSObject for MPSCNNNeuron {}
impl PNSObject for MPSCNNNeuron {}
impl IMPSCNNNeuron for MPSCNNNeuron {}
pub trait IMPSCNNNeuron: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_neuronDescriptor_(
        &self,
        device: *mut u64,
        neuronDescriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, neuronDescriptor : neuronDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn a(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, a)
    }
    unsafe fn b(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, b)
    }
    unsafe fn c(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, c)
    }
    unsafe fn data(&self) -> NSData
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, data)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronGradient(pub id);
impl std::ops::Deref for MPSCNNNeuronGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronGradient {}
impl MPSCNNNeuronGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNNeuronGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNNeuronGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNNeuronGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNNeuronGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNNeuronGradient {}
impl IMPSKernel for MPSCNNNeuronGradient {}
impl PNSCopying for MPSCNNNeuronGradient {}
impl PNSSecureCoding for MPSCNNNeuronGradient {}
impl INSObject for MPSCNNNeuronGradient {}
impl PNSObject for MPSCNNNeuronGradient {}
impl IMPSCNNNeuronGradient for MPSCNNNeuronGradient {}
pub trait IMPSCNNNeuronGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_neuronDescriptor_(
        &self,
        device: *mut u64,
        neuronDescriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, neuronDescriptor : neuronDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn a(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, a)
    }
    unsafe fn b(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, b)
    }
    unsafe fn c(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, c)
    }
    unsafe fn data(&self) -> NSData
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, data)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronLinear(pub id);
impl std::ops::Deref for MPSCNNNeuronLinear {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronLinear {}
impl MPSCNNNeuronLinear {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLinear").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronLinear {}
impl From<MPSCNNNeuronLinear> for MPSCNNNeuron {
    fn from(child: MPSCNNNeuronLinear) -> MPSCNNNeuron {
        MPSCNNNeuron(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronLinear {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronLinear, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronLinear").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronLinear(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronLinear")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronLinear {}
impl IMPSKernel for MPSCNNNeuronLinear {}
impl PNSCopying for MPSCNNNeuronLinear {}
impl PNSSecureCoding for MPSCNNNeuronLinear {}
impl INSObject for MPSCNNNeuronLinear {}
impl PNSObject for MPSCNNNeuronLinear {}
impl IMPSCNNNeuronLinear for MPSCNNNeuronLinear {}
pub trait IMPSCNNNeuronLinear: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_(&self, device: *mut u64, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronReLU(pub id);
impl std::ops::Deref for MPSCNNNeuronReLU {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronReLU {}
impl MPSCNNNeuronReLU {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLU").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronReLU {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronReLU {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronReLU, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLU").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronReLU(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronReLU")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronReLU {}
impl IMPSKernel for MPSCNNNeuronReLU {}
impl PNSCopying for MPSCNNNeuronReLU {}
impl PNSSecureCoding for MPSCNNNeuronReLU {}
impl INSObject for MPSCNNNeuronReLU {}
impl PNSObject for MPSCNNNeuronReLU {}
impl IMPSCNNNeuronReLU for MPSCNNNeuronReLU {}
pub trait IMPSCNNNeuronReLU: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_(&self, device: *mut u64, a: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronPReLU(pub id);
impl std::ops::Deref for MPSCNNNeuronPReLU {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronPReLU {}
impl MPSCNNNeuronPReLU {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPReLU").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronPReLU {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronPReLU {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronPReLU, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronPReLU").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronPReLU(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronPReLU")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronPReLU {}
impl IMPSKernel for MPSCNNNeuronPReLU {}
impl PNSCopying for MPSCNNNeuronPReLU {}
impl PNSSecureCoding for MPSCNNNeuronPReLU {}
impl INSObject for MPSCNNNeuronPReLU {}
impl PNSObject for MPSCNNNeuronPReLU {}
impl IMPSCNNNeuronPReLU for MPSCNNNeuronPReLU {}
pub trait IMPSCNNNeuronPReLU: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_count_(
        &self,
        device: *mut u64,
        a: *const f32,
        count: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, count : count)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronSigmoid(pub id);
impl std::ops::Deref for MPSCNNNeuronSigmoid {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronSigmoid {}
impl MPSCNNNeuronSigmoid {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSigmoid").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronSigmoid {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronSigmoid {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronSigmoid, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronSigmoid").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronSigmoid(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronSigmoid")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronSigmoid {}
impl IMPSKernel for MPSCNNNeuronSigmoid {}
impl PNSCopying for MPSCNNNeuronSigmoid {}
impl PNSSecureCoding for MPSCNNNeuronSigmoid {}
impl INSObject for MPSCNNNeuronSigmoid {}
impl PNSObject for MPSCNNNeuronSigmoid {}
impl IMPSCNNNeuronSigmoid for MPSCNNNeuronSigmoid {}
pub trait IMPSCNNNeuronSigmoid: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronHardSigmoid(pub id);
impl std::ops::Deref for MPSCNNNeuronHardSigmoid {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronHardSigmoid {}
impl MPSCNNNeuronHardSigmoid {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronHardSigmoid").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronHardSigmoid {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronHardSigmoid {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronHardSigmoid, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronHardSigmoid").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronHardSigmoid(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronHardSigmoid")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronHardSigmoid {}
impl IMPSKernel for MPSCNNNeuronHardSigmoid {}
impl PNSCopying for MPSCNNNeuronHardSigmoid {}
impl PNSSecureCoding for MPSCNNNeuronHardSigmoid {}
impl INSObject for MPSCNNNeuronHardSigmoid {}
impl PNSObject for MPSCNNNeuronHardSigmoid {}
impl IMPSCNNNeuronHardSigmoid for MPSCNNNeuronHardSigmoid {}
pub trait IMPSCNNNeuronHardSigmoid: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_(&self, device: *mut u64, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronTanH(pub id);
impl std::ops::Deref for MPSCNNNeuronTanH {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronTanH {}
impl MPSCNNNeuronTanH {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronTanH").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronTanH {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronTanH {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronTanH, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronTanH").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronTanH(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronTanH")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronTanH {}
impl IMPSKernel for MPSCNNNeuronTanH {}
impl PNSCopying for MPSCNNNeuronTanH {}
impl PNSSecureCoding for MPSCNNNeuronTanH {}
impl INSObject for MPSCNNNeuronTanH {}
impl PNSObject for MPSCNNNeuronTanH {}
impl IMPSCNNNeuronTanH for MPSCNNNeuronTanH {}
pub trait IMPSCNNNeuronTanH: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_(&self, device: *mut u64, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronAbsolute(pub id);
impl std::ops::Deref for MPSCNNNeuronAbsolute {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronAbsolute {}
impl MPSCNNNeuronAbsolute {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronAbsolute").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronAbsolute {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronAbsolute {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronAbsolute, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronAbsolute").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronAbsolute(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronAbsolute")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronAbsolute {}
impl IMPSKernel for MPSCNNNeuronAbsolute {}
impl PNSCopying for MPSCNNNeuronAbsolute {}
impl PNSSecureCoding for MPSCNNNeuronAbsolute {}
impl INSObject for MPSCNNNeuronAbsolute {}
impl PNSObject for MPSCNNNeuronAbsolute {}
impl IMPSCNNNeuronAbsolute for MPSCNNNeuronAbsolute {}
pub trait IMPSCNNNeuronAbsolute: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronSoftPlus(pub id);
impl std::ops::Deref for MPSCNNNeuronSoftPlus {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronSoftPlus {}
impl MPSCNNNeuronSoftPlus {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftPlus").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronSoftPlus {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronSoftPlus {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronSoftPlus, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftPlus").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronSoftPlus(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronSoftPlus")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronSoftPlus {}
impl IMPSKernel for MPSCNNNeuronSoftPlus {}
impl PNSCopying for MPSCNNNeuronSoftPlus {}
impl PNSSecureCoding for MPSCNNNeuronSoftPlus {}
impl INSObject for MPSCNNNeuronSoftPlus {}
impl PNSObject for MPSCNNNeuronSoftPlus {}
impl IMPSCNNNeuronSoftPlus for MPSCNNNeuronSoftPlus {}
pub trait IMPSCNNNeuronSoftPlus: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_(&self, device: *mut u64, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronSoftSign(pub id);
impl std::ops::Deref for MPSCNNNeuronSoftSign {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronSoftSign {}
impl MPSCNNNeuronSoftSign {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftSign").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronSoftSign {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronSoftSign {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronSoftSign, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftSign").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronSoftSign(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronSoftSign")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronSoftSign {}
impl IMPSKernel for MPSCNNNeuronSoftSign {}
impl PNSCopying for MPSCNNNeuronSoftSign {}
impl PNSSecureCoding for MPSCNNNeuronSoftSign {}
impl INSObject for MPSCNNNeuronSoftSign {}
impl PNSObject for MPSCNNNeuronSoftSign {}
impl IMPSCNNNeuronSoftSign for MPSCNNNeuronSoftSign {}
pub trait IMPSCNNNeuronSoftSign: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronELU(pub id);
impl std::ops::Deref for MPSCNNNeuronELU {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronELU {}
impl MPSCNNNeuronELU {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronELU").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronELU {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronELU {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronELU, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronELU").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronELU(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronELU")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronELU {}
impl IMPSKernel for MPSCNNNeuronELU {}
impl PNSCopying for MPSCNNNeuronELU {}
impl PNSSecureCoding for MPSCNNNeuronELU {}
impl INSObject for MPSCNNNeuronELU {}
impl PNSObject for MPSCNNNeuronELU {}
impl IMPSCNNNeuronELU for MPSCNNNeuronELU {}
pub trait IMPSCNNNeuronELU: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_(&self, device: *mut u64, a: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronReLUN(pub id);
impl std::ops::Deref for MPSCNNNeuronReLUN {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronReLUN {}
impl MPSCNNNeuronReLUN {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUN").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronReLUN {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronReLUN {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronReLUN, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUN").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronReLUN(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronReLUN")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronReLUN {}
impl IMPSKernel for MPSCNNNeuronReLUN {}
impl PNSCopying for MPSCNNNeuronReLUN {}
impl PNSSecureCoding for MPSCNNNeuronReLUN {}
impl INSObject for MPSCNNNeuronReLUN {}
impl PNSObject for MPSCNNNeuronReLUN {}
impl IMPSCNNNeuronReLUN for MPSCNNNeuronReLUN {}
pub trait IMPSCNNNeuronReLUN: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_(&self, device: *mut u64, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronPower(pub id);
impl std::ops::Deref for MPSCNNNeuronPower {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronPower {}
impl MPSCNNNeuronPower {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPower").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronPower {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronPower {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronPower, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronPower").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronPower(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronPower")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronPower {}
impl IMPSKernel for MPSCNNNeuronPower {}
impl PNSCopying for MPSCNNNeuronPower {}
impl PNSSecureCoding for MPSCNNNeuronPower {}
impl INSObject for MPSCNNNeuronPower {}
impl PNSObject for MPSCNNNeuronPower {}
impl IMPSCNNNeuronPower for MPSCNNNeuronPower {}
pub trait IMPSCNNNeuronPower: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_c_(&self, device: *mut u64, a: f32, b: f32, c: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b, c : c)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronExponential(pub id);
impl std::ops::Deref for MPSCNNNeuronExponential {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronExponential {}
impl MPSCNNNeuronExponential {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronExponential").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronExponential {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronExponential {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronExponential, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronExponential").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronExponential(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronExponential")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronExponential {}
impl IMPSKernel for MPSCNNNeuronExponential {}
impl PNSCopying for MPSCNNNeuronExponential {}
impl PNSSecureCoding for MPSCNNNeuronExponential {}
impl INSObject for MPSCNNNeuronExponential {}
impl PNSObject for MPSCNNNeuronExponential {}
impl IMPSCNNNeuronExponential for MPSCNNNeuronExponential {}
pub trait IMPSCNNNeuronExponential: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_c_(&self, device: *mut u64, a: f32, b: f32, c: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b, c : c)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronLogarithm(pub id);
impl std::ops::Deref for MPSCNNNeuronLogarithm {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronLogarithm {}
impl MPSCNNNeuronLogarithm {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLogarithm").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuron for MPSCNNNeuronLogarithm {}
impl std::convert::TryFrom<MPSCNNNeuron> for MPSCNNNeuronLogarithm {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuron) -> Result<MPSCNNNeuronLogarithm, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronLogarithm").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronLogarithm(parent.0))
        } else {
            Err("This MPSCNNNeuron cannot be downcasted to MPSCNNNeuronLogarithm")
        }
    }
}
impl IMPSCNNKernel for MPSCNNNeuronLogarithm {}
impl IMPSKernel for MPSCNNNeuronLogarithm {}
impl PNSCopying for MPSCNNNeuronLogarithm {}
impl PNSSecureCoding for MPSCNNNeuronLogarithm {}
impl INSObject for MPSCNNNeuronLogarithm {}
impl PNSObject for MPSCNNNeuronLogarithm {}
impl IMPSCNNNeuronLogarithm for MPSCNNNeuronLogarithm {}
pub trait IMPSCNNNeuronLogarithm: Sized + std::ops::Deref {
    unsafe fn initWithDevice_a_b_c_(&self, device: *mut u64, a: f32, b: f32, c: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, a : a, b : b, c : c)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionDescriptor(pub id);
impl std::ops::Deref for MPSCNNConvolutionDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionDescriptor {}
impl MPSCNNConvolutionDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionDescriptor").unwrap(), alloc) })
    }
}
impl PNSSecureCoding for MPSCNNConvolutionDescriptor {}
impl PNSCopying for MPSCNNConvolutionDescriptor {}
impl INSObject for MPSCNNConvolutionDescriptor {}
impl PNSObject for MPSCNNConvolutionDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSCNNConvolutionDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSCNNConvolutionDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNConvolutionDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSCNNConvolutionDescriptor")
        }
    }
}
impl IMPSCNNConvolutionDescriptor for MPSCNNConvolutionDescriptor {}
pub trait IMPSCNNConvolutionDescriptor: Sized + std::ops::Deref {
    unsafe fn encodeWithCoder_(&self, aCoder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : aCoder)
    }
    unsafe fn initWithCoder_(&self, aDecoder: NSCoder) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder)
    }
    unsafe fn setBatchNormalizationParametersForInferenceWithMean_variance_gamma_beta_epsilon_(
        &self,
        mean: *const f32,
        variance: *const f32,
        gamma: *const f32,
        beta: *const f32,
        epsilon: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBatchNormalizationParametersForInferenceWithMean : mean, variance : variance, gamma : gamma, beta : beta, epsilon : epsilon)
    }
    unsafe fn setNeuronType_parameterA_parameterB_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn setNeuronToPReLUWithParametersA_(&self, A: NSData)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronToPReLUWithParametersA : A)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn setKernelWidth_(&self, kernelWidth: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelWidth : kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn setKernelHeight_(&self, kernelHeight: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelHeight : kernelHeight)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn setInputFeatureChannels_(&self, inputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputFeatureChannels : inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn setOutputFeatureChannels_(&self, outputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputFeatureChannels : outputFeatureChannels)
    }
    unsafe fn strideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsX)
    }
    unsafe fn setStrideInPixelsX_(&self, strideInPixelsX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrideInPixelsX : strideInPixelsX)
    }
    unsafe fn strideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsY)
    }
    unsafe fn setStrideInPixelsY_(&self, strideInPixelsY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrideInPixelsY : strideInPixelsY)
    }
    unsafe fn groups(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, groups)
    }
    unsafe fn setGroups_(&self, groups: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGroups : groups)
    }
    unsafe fn dilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateX)
    }
    unsafe fn setDilationRateX_(&self, dilationRateX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDilationRateX : dilationRateX)
    }
    unsafe fn dilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateY)
    }
    unsafe fn setDilationRateY_(&self, dilationRateY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDilationRateY : dilationRateY)
    }
    unsafe fn fusedNeuronDescriptor(&self) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, fusedNeuronDescriptor)
    }
    unsafe fn setFusedNeuronDescriptor_(&self, fusedNeuronDescriptor: MPSNNNeuronDescriptor)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFusedNeuronDescriptor : fusedNeuronDescriptor)
    }
    unsafe fn neuron(&self) -> MPSCNNNeuron
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuron)
    }
    unsafe fn setNeuron_(&self, neuron: MPSCNNNeuron)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuron : neuron)
    }
    unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels_neuronFilter_(
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        inputFeatureChannels: NSUInteger,
        outputFeatureChannels: NSUInteger,
        neuronFilter: MPSCNNNeuron,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionDescriptor").unwrap(), cnnConvolutionDescriptorWithKernelWidth : kernelWidth, kernelHeight : kernelHeight, inputFeatureChannels : inputFeatureChannels, outputFeatureChannels : outputFeatureChannels, neuronFilter : neuronFilter)
    }
    unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels_(
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        inputFeatureChannels: NSUInteger,
        outputFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionDescriptor").unwrap(), cnnConvolutionDescriptorWithKernelWidth : kernelWidth, kernelHeight : kernelHeight, inputFeatureChannels : inputFeatureChannels, outputFeatureChannels : outputFeatureChannels)
    }
    unsafe fn supportsSecureCoding() -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionDescriptor").unwrap(), supportsSecureCoding)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSubPixelConvolutionDescriptor(pub id);
impl std::ops::Deref for MPSCNNSubPixelConvolutionDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSubPixelConvolutionDescriptor {}
impl MPSCNNSubPixelConvolutionDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSubPixelConvolutionDescriptor").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionDescriptor for MPSCNNSubPixelConvolutionDescriptor {}
impl PNSSecureCoding for MPSCNNSubPixelConvolutionDescriptor {}
impl PNSCopying for MPSCNNSubPixelConvolutionDescriptor {}
impl From<MPSCNNSubPixelConvolutionDescriptor> for MPSCNNConvolutionDescriptor {
    fn from(child: MPSCNNSubPixelConvolutionDescriptor) -> MPSCNNConvolutionDescriptor {
        MPSCNNConvolutionDescriptor(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolutionDescriptor> for MPSCNNSubPixelConvolutionDescriptor {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionDescriptor,
    ) -> Result<MPSCNNSubPixelConvolutionDescriptor, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSubPixelConvolutionDescriptor").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNSubPixelConvolutionDescriptor(parent.0))
        } else {
            Err ("This MPSCNNConvolutionDescriptor cannot be downcasted to MPSCNNSubPixelConvolutionDescriptor" ,)
        }
    }
}
impl INSObject for MPSCNNSubPixelConvolutionDescriptor {}
impl PNSObject for MPSCNNSubPixelConvolutionDescriptor {}
impl IMPSCNNSubPixelConvolutionDescriptor for MPSCNNSubPixelConvolutionDescriptor {}
pub trait IMPSCNNSubPixelConvolutionDescriptor: Sized + std::ops::Deref {
    unsafe fn subPixelScaleFactor(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, subPixelScaleFactor)
    }
    unsafe fn setSubPixelScaleFactor_(&self, subPixelScaleFactor: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSubPixelScaleFactor : subPixelScaleFactor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDepthWiseConvolutionDescriptor(pub id);
impl std::ops::Deref for MPSCNNDepthWiseConvolutionDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDepthWiseConvolutionDescriptor {}
impl MPSCNNDepthWiseConvolutionDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDepthWiseConvolutionDescriptor").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionDescriptor for MPSCNNDepthWiseConvolutionDescriptor {}
impl PNSSecureCoding for MPSCNNDepthWiseConvolutionDescriptor {}
impl PNSCopying for MPSCNNDepthWiseConvolutionDescriptor {}
impl std::convert::TryFrom<MPSCNNConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionDescriptor,
    ) -> Result<MPSCNNDepthWiseConvolutionDescriptor, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDepthWiseConvolutionDescriptor").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNDepthWiseConvolutionDescriptor(parent.0))
        } else {
            Err ("This MPSCNNConvolutionDescriptor cannot be downcasted to MPSCNNDepthWiseConvolutionDescriptor" ,)
        }
    }
}
impl INSObject for MPSCNNDepthWiseConvolutionDescriptor {}
impl PNSObject for MPSCNNDepthWiseConvolutionDescriptor {}
impl IMPSCNNDepthWiseConvolutionDescriptor for MPSCNNDepthWiseConvolutionDescriptor {}
pub trait IMPSCNNDepthWiseConvolutionDescriptor: Sized + std::ops::Deref {
    unsafe fn channelMultiplier(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, channelMultiplier)
    }
}
pub type MPSCNNConvolutionWeightsLayout = u32;
pub type MPSCNNWeightsQuantizationType = u32;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionGradientState(pub id);
impl std::ops::Deref for MPSCNNConvolutionGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionGradientState {}
impl MPSCNNConvolutionGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientState").unwrap(), alloc) })
    }
}
impl PMPSImageSizeEncodingState for MPSCNNConvolutionGradientState {}
impl IMPSNNGradientState for MPSCNNConvolutionGradientState {}
impl From<MPSCNNConvolutionGradientState> for MPSNNGradientState {
    fn from(child: MPSCNNConvolutionGradientState) -> MPSNNGradientState {
        MPSNNGradientState(child.0)
    }
}
impl std::convert::TryFrom<MPSNNGradientState> for MPSCNNConvolutionGradientState {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientState) -> Result<MPSCNNConvolutionGradientState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionGradientState(parent.0))
        } else {
            Err("This MPSNNGradientState cannot be downcasted to MPSCNNConvolutionGradientState")
        }
    }
}
impl IMPSState for MPSCNNConvolutionGradientState {}
impl INSObject for MPSCNNConvolutionGradientState {}
impl PNSObject for MPSCNNConvolutionGradientState {}
impl IMPSCNNConvolutionGradientState for MPSCNNConvolutionGradientState {}
pub trait IMPSCNNConvolutionGradientState: Sized + std::ops::Deref {
    unsafe fn gradientForWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForWeights)
    }
    unsafe fn gradientForBiases(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForBiases)
    }
    unsafe fn convolution(&self) -> MPSCNNConvolution
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, convolution)
    }
    unsafe fn gradientForWeightsLayout(&self) -> MPSCNNConvolutionWeightsLayout
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForWeightsLayout)
    }
}
pub type MPSCNNConvolutionGradientStateBatch = NSArray;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionTransposeGradientState(pub id);
impl std::ops::Deref for MPSCNNConvolutionTransposeGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionTransposeGradientState {}
impl MPSCNNConvolutionTransposeGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientState").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionGradientState for MPSCNNConvolutionTransposeGradientState {}
impl PMPSImageSizeEncodingState for MPSCNNConvolutionTransposeGradientState {}
impl From<MPSCNNConvolutionTransposeGradientState> for MPSCNNConvolutionGradientState {
    fn from(child: MPSCNNConvolutionTransposeGradientState) -> MPSCNNConvolutionGradientState {
        MPSCNNConvolutionGradientState(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolutionGradientState>
    for MPSCNNConvolutionTransposeGradientState
{
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionGradientState,
    ) -> Result<MPSCNNConvolutionTransposeGradientState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionTransposeGradientState(parent.0))
        } else {
            Err ("This MPSCNNConvolutionGradientState cannot be downcasted to MPSCNNConvolutionTransposeGradientState" ,)
        }
    }
}
impl IMPSNNGradientState for MPSCNNConvolutionTransposeGradientState {}
impl IMPSState for MPSCNNConvolutionTransposeGradientState {}
impl INSObject for MPSCNNConvolutionTransposeGradientState {}
impl PNSObject for MPSCNNConvolutionTransposeGradientState {}
impl IMPSCNNConvolutionTransposeGradientState for MPSCNNConvolutionTransposeGradientState {}
pub trait IMPSCNNConvolutionTransposeGradientState: Sized + std::ops::Deref {
    unsafe fn convolutionTranspose(&self) -> MPSCNNConvolutionTranspose
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, convolutionTranspose)
    }
}
pub type MPSCNNConvolutionTransposeGradientStateBatch = NSArray;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionWeightsAndBiasesState(pub id);
impl std::ops::Deref for MPSCNNConvolutionWeightsAndBiasesState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionWeightsAndBiasesState {}
impl MPSCNNConvolutionWeightsAndBiasesState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionWeightsAndBiasesState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSCNNConvolutionWeightsAndBiasesState {}
impl std::convert::TryFrom<MPSState> for MPSCNNConvolutionWeightsAndBiasesState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSCNNConvolutionWeightsAndBiasesState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionWeightsAndBiasesState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionWeightsAndBiasesState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSCNNConvolutionWeightsAndBiasesState")
        }
    }
}
impl INSObject for MPSCNNConvolutionWeightsAndBiasesState {}
impl PNSObject for MPSCNNConvolutionWeightsAndBiasesState {}
impl IMPSCNNConvolutionWeightsAndBiasesState for MPSCNNConvolutionWeightsAndBiasesState {}
pub trait IMPSCNNConvolutionWeightsAndBiasesState: Sized + std::ops::Deref {
    unsafe fn initWithWeights_biases_(&self, weights: *mut u64, biases: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithWeights : weights, biases : biases)
    }
    unsafe fn initWithDevice_cnnConvolutionDescriptor_(
        &self,
        device: *mut u64,
        descriptor: MPSCNNConvolutionDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, cnnConvolutionDescriptor : descriptor)
    }
    unsafe fn initWithWeights_weightsOffset_biases_biasesOffset_cnnConvolutionDescriptor_(
        &self,
        weights: *mut u64,
        weightsOffset: NSUInteger,
        biases: *mut u64,
        biasesOffset: NSUInteger,
        descriptor: MPSCNNConvolutionDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithWeights : weights, weightsOffset : weightsOffset, biases : biases, biasesOffset : biasesOffset, cnnConvolutionDescriptor : descriptor)
    }
    unsafe fn weights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weights)
    }
    unsafe fn biases(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, biases)
    }
    unsafe fn weightsOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weightsOffset)
    }
    unsafe fn biasesOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, biasesOffset)
    }
    unsafe fn temporaryCNNConvolutionWeightsAndBiasesStateWithCommandBuffer_cnnConvolutionDescriptor_(
        commandBuffer: *mut u64,
        descriptor: MPSCNNConvolutionDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionWeightsAndBiasesState").unwrap(), temporaryCNNConvolutionWeightsAndBiasesStateWithCommandBuffer : commandBuffer, cnnConvolutionDescriptor : descriptor)
    }
}
pub trait PMPSCNNConvolutionDataSource: Sized + std::ops::Deref {
    unsafe fn dataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataType)
    }
    unsafe fn descriptor(&self) -> MPSCNNConvolutionDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, descriptor)
    }
    unsafe fn weights(&self) -> *mut ::std::os::raw::c_void
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weights)
    }
    unsafe fn biasTerms(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, biasTerms)
    }
    unsafe fn load(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, load)
    }
    unsafe fn purge(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, purge)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn rangesForUInt8Kernel(&self) -> *mut vector_float2
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rangesForUInt8Kernel)
    }
    unsafe fn lookupTableForUInt8Kernel(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lookupTableForUInt8Kernel)
    }
    unsafe fn weightsQuantizationType(&self) -> MPSCNNWeightsQuantizationType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weightsQuantizationType)
    }
    unsafe fn updateWithCommandBuffer_gradientState_sourceState_(
        &self,
        commandBuffer: *mut u64,
        gradientState: MPSCNNConvolutionGradientState,
        sourceState: MPSCNNConvolutionWeightsAndBiasesState,
    ) -> MPSCNNConvolutionWeightsAndBiasesState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateWithCommandBuffer : commandBuffer, gradientState : gradientState, sourceState : sourceState)
    }
    unsafe fn updateWithGradientState_sourceState_(
        &self,
        gradientState: MPSCNNConvolutionGradientState,
        sourceState: MPSCNNConvolutionWeightsAndBiasesState,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateWithGradientState : gradientState, sourceState : sourceState)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn weightsLayout(&self) -> MPSCNNConvolutionWeightsLayout
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weightsLayout)
    }
    unsafe fn kernelWeightsDataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWeightsDataType)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolution(pub id);
impl std::ops::Deref for MPSCNNConvolution {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolution {}
impl MPSCNNConvolution {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolution").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNConvolution {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNConvolution {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNConvolution, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolution").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNConvolution(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNConvolution")
        }
    }
}
impl IMPSKernel for MPSCNNConvolution {}
impl PNSCopying for MPSCNNConvolution {}
impl PNSSecureCoding for MPSCNNConvolution {}
impl INSObject for MPSCNNConvolution {}
impl PNSObject for MPSCNNConvolution {}
impl IMPSCNNConvolution for MPSCNNConvolution {}
pub trait IMPSCNNConvolution: Sized + std::ops::Deref {
    unsafe fn initWithDevice_weights_(&self, device: *mut u64, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, weights : weights)
    }
    unsafe fn initWithDevice_convolutionDescriptor_kernelWeights_biasTerms_flags_(
        &self,
        device: *mut u64,
        convolutionDescriptor: MPSCNNConvolutionDescriptor,
        kernelWeights: *const f32,
        biasTerms: *const f32,
        flags: MPSCNNConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, convolutionDescriptor : convolutionDescriptor, kernelWeights : kernelWeights, biasTerms : biasTerms, flags : flags)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNConvolutionGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn resultStateBatchForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSCNNConvolutionGradientStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateBatchForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNConvolutionGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateBatchForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSCNNConvolutionGradientStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateBatchForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn reloadWeightsAndBiasesFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadWeightsAndBiasesFromDataSource)
    }
    unsafe fn reloadWeightsAndBiasesWithDataSource_(&self, dataSource: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadWeightsAndBiasesWithDataSource : dataSource)
    }
    unsafe fn reloadWeightsAndBiasesWithCommandBuffer_state_(
        &self,
        commandBuffer: *mut u64,
        state: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadWeightsAndBiasesWithCommandBuffer : commandBuffer, state : state)
    }
    unsafe fn exportWeightsAndBiasesWithCommandBuffer_resultStateCanBeTemporary_(
        &self,
        commandBuffer: *mut u64,
        resultStateCanBeTemporary: BOOL,
    ) -> MPSCNNConvolutionWeightsAndBiasesState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, exportWeightsAndBiasesWithCommandBuffer : commandBuffer, resultStateCanBeTemporary : resultStateCanBeTemporary)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn groups(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, groups)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
    unsafe fn subPixelScaleFactor(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, subPixelScaleFactor)
    }
    unsafe fn neuron(&self) -> MPSCNNNeuron
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuron)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
    unsafe fn fusedNeuronDescriptor(&self) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, fusedNeuronDescriptor)
    }
    unsafe fn channelMultiplier(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, channelMultiplier)
    }
    unsafe fn accumulatorPrecisionOption(&self) -> MPSNNConvolutionAccumulatorPrecisionOption
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, accumulatorPrecisionOption)
    }
    unsafe fn setAccumulatorPrecisionOption_(
        &self,
        accumulatorPrecisionOption: MPSNNConvolutionAccumulatorPrecisionOption,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAccumulatorPrecisionOption : accumulatorPrecisionOption)
    }
}
pub type MPSCNNConvolutionGradientOption = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionGradient(pub id);
impl std::ops::Deref for MPSCNNConvolutionGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionGradient {}
impl MPSCNNConvolutionGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNConvolutionGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNConvolutionGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNConvolutionGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNConvolutionGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNConvolutionGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNConvolutionGradient {}
impl IMPSKernel for MPSCNNConvolutionGradient {}
impl PNSCopying for MPSCNNConvolutionGradient {}
impl PNSSecureCoding for MPSCNNConvolutionGradient {}
impl INSObject for MPSCNNConvolutionGradient {}
impl PNSObject for MPSCNNConvolutionGradient {}
impl IMPSCNNConvolutionGradient for MPSCNNConvolutionGradient {}
pub trait IMPSCNNConvolutionGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_weights_(&self, device: *mut u64, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, weights : weights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn reloadWeightsAndBiasesFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadWeightsAndBiasesFromDataSource)
    }
    unsafe fn reloadWeightsAndBiasesWithCommandBuffer_state_(
        &self,
        commandBuffer: *mut u64,
        state: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadWeightsAndBiasesWithCommandBuffer : commandBuffer, state : state)
    }
    unsafe fn sourceGradientFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceGradientFeatureChannels)
    }
    unsafe fn sourceImageFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceImageFeatureChannels)
    }
    unsafe fn groups(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, groups)
    }
    unsafe fn channelMultiplier(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, channelMultiplier)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
    unsafe fn gradientOption(&self) -> MPSCNNConvolutionGradientOption
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientOption)
    }
    unsafe fn setGradientOption_(&self, gradientOption: MPSCNNConvolutionGradientOption)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGradientOption : gradientOption)
    }
    unsafe fn serializeWeightsAndBiases(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, serializeWeightsAndBiases)
    }
    unsafe fn setSerializeWeightsAndBiases_(&self, serializeWeightsAndBiases: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSerializeWeightsAndBiases : serializeWeightsAndBiases)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNFullyConnected(pub id);
impl std::ops::Deref for MPSCNNFullyConnected {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNFullyConnected {}
impl MPSCNNFullyConnected {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNFullyConnected").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolution for MPSCNNFullyConnected {}
impl From<MPSCNNFullyConnected> for MPSCNNConvolution {
    fn from(child: MPSCNNFullyConnected) -> MPSCNNConvolution {
        MPSCNNConvolution(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolution> for MPSCNNFullyConnected {
    type Error = &'static str;
    fn try_from(parent: MPSCNNConvolution) -> Result<MPSCNNFullyConnected, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNFullyConnected").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNFullyConnected(parent.0))
        } else {
            Err("This MPSCNNConvolution cannot be downcasted to MPSCNNFullyConnected")
        }
    }
}
impl IMPSCNNKernel for MPSCNNFullyConnected {}
impl IMPSKernel for MPSCNNFullyConnected {}
impl PNSCopying for MPSCNNFullyConnected {}
impl PNSSecureCoding for MPSCNNFullyConnected {}
impl INSObject for MPSCNNFullyConnected {}
impl PNSObject for MPSCNNFullyConnected {}
impl IMPSCNNFullyConnected for MPSCNNFullyConnected {}
pub trait IMPSCNNFullyConnected: Sized + std::ops::Deref {
    unsafe fn initWithDevice_weights_(&self, device: *mut u64, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, weights : weights)
    }
    unsafe fn initWithDevice_convolutionDescriptor_kernelWeights_biasTerms_flags_(
        &self,
        device: *mut u64,
        convolutionDescriptor: MPSCNNConvolutionDescriptor,
        kernelWeights: *const f32,
        biasTerms: *const f32,
        flags: MPSCNNConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, convolutionDescriptor : convolutionDescriptor, kernelWeights : kernelWeights, biasTerms : biasTerms, flags : flags)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNFullyConnectedGradient(pub id);
impl std::ops::Deref for MPSCNNFullyConnectedGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNFullyConnectedGradient {}
impl MPSCNNFullyConnectedGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionGradient for MPSCNNFullyConnectedGradient {}
impl From<MPSCNNFullyConnectedGradient> for MPSCNNConvolutionGradient {
    fn from(child: MPSCNNFullyConnectedGradient) -> MPSCNNConvolutionGradient {
        MPSCNNConvolutionGradient(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolutionGradient> for MPSCNNFullyConnectedGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionGradient,
    ) -> Result<MPSCNNFullyConnectedGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNFullyConnectedGradient(parent.0))
        } else {
            Err ("This MPSCNNConvolutionGradient cannot be downcasted to MPSCNNFullyConnectedGradient" ,)
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNFullyConnectedGradient {}
impl IMPSCNNBinaryKernel for MPSCNNFullyConnectedGradient {}
impl IMPSKernel for MPSCNNFullyConnectedGradient {}
impl PNSCopying for MPSCNNFullyConnectedGradient {}
impl PNSSecureCoding for MPSCNNFullyConnectedGradient {}
impl INSObject for MPSCNNFullyConnectedGradient {}
impl PNSObject for MPSCNNFullyConnectedGradient {}
impl IMPSCNNFullyConnectedGradient for MPSCNNFullyConnectedGradient {}
pub trait IMPSCNNFullyConnectedGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_weights_(&self, device: *mut u64, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, weights : weights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionTranspose(pub id);
impl std::ops::Deref for MPSCNNConvolutionTranspose {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionTranspose {}
impl MPSCNNConvolutionTranspose {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTranspose").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNConvolutionTranspose {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNConvolutionTranspose {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNConvolutionTranspose, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTranspose").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNConvolutionTranspose(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNConvolutionTranspose")
        }
    }
}
impl IMPSKernel for MPSCNNConvolutionTranspose {}
impl PNSCopying for MPSCNNConvolutionTranspose {}
impl PNSSecureCoding for MPSCNNConvolutionTranspose {}
impl INSObject for MPSCNNConvolutionTranspose {}
impl PNSObject for MPSCNNConvolutionTranspose {}
impl IMPSCNNConvolutionTranspose for MPSCNNConvolutionTranspose {}
pub trait IMPSCNNConvolutionTranspose: Sized + std::ops::Deref {
    unsafe fn initWithDevice_weights_(&self, device: *mut u64, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, weights : weights)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_convolutionGradientState_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        convolutionGradientState: MPSCNNConvolutionGradientState,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, convolutionGradientState : convolutionGradientState)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_convolutionGradientStates_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        convolutionGradientState: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImage, convolutionGradientStates : convolutionGradientState)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_convolutionGradientState_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        convolutionGradientState: MPSCNNConvolutionGradientState,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, convolutionGradientState : convolutionGradientState, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_convolutionGradientStates_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        convolutionGradientState: NSArray,
        destinationImage: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImage, convolutionGradientStates : convolutionGradientState, destinationImages : destinationImage)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNConvolutionTransposeGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn resultStateBatchForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSCNNConvolutionTransposeGradientStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateBatchForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNConvolutionTransposeGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateBatchForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSCNNConvolutionTransposeGradientStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateBatchForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn reloadWeightsAndBiasesFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadWeightsAndBiasesFromDataSource)
    }
    unsafe fn reloadWeightsAndBiasesWithCommandBuffer_state_(
        &self,
        commandBuffer: *mut u64,
        state: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadWeightsAndBiasesWithCommandBuffer : commandBuffer, state : state)
    }
    unsafe fn exportWeightsAndBiasesWithCommandBuffer_resultStateCanBeTemporary_(
        &self,
        commandBuffer: *mut u64,
        resultStateCanBeTemporary: BOOL,
    ) -> MPSCNNConvolutionWeightsAndBiasesState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, exportWeightsAndBiasesWithCommandBuffer : commandBuffer, resultStateCanBeTemporary : resultStateCanBeTemporary)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_convolutionGradientState_destinationState_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        convolutionGradientState: MPSCNNConvolutionGradientState,
        outState: *mut MPSCNNConvolutionTransposeGradientState,
        isTemporary: BOOL,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, convolutionGradientState : convolutionGradientState, destinationState : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_convolutionGradientStates_destinationStates_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        convolutionGradientStates: NSArray,
        outStates: *mut *mut MPSCNNConvolutionTransposeGradientStateBatch,
        isTemporary: BOOL,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, convolutionGradientStates : convolutionGradientStates, destinationStates : outStates, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn kernelOffsetX(&self) -> NSInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelOffsetX)
    }
    unsafe fn setKernelOffsetX_(&self, kernelOffsetX: NSInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelOffsetX : kernelOffsetX)
    }
    unsafe fn kernelOffsetY(&self) -> NSInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelOffsetY)
    }
    unsafe fn setKernelOffsetY_(&self, kernelOffsetY: NSInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelOffsetY : kernelOffsetY)
    }
    unsafe fn groups(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, groups)
    }
    unsafe fn accumulatorPrecisionOption(&self) -> MPSNNConvolutionAccumulatorPrecisionOption
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, accumulatorPrecisionOption)
    }
    unsafe fn setAccumulatorPrecisionOption_(
        &self,
        accumulatorPrecisionOption: MPSNNConvolutionAccumulatorPrecisionOption,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAccumulatorPrecisionOption : accumulatorPrecisionOption)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionTransposeGradient(pub id);
impl std::ops::Deref for MPSCNNConvolutionTransposeGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionTransposeGradient {}
impl MPSCNNConvolutionTransposeGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNConvolutionTransposeGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNConvolutionTransposeGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNConvolutionTransposeGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionTransposeGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNConvolutionTransposeGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNConvolutionTransposeGradient {}
impl IMPSKernel for MPSCNNConvolutionTransposeGradient {}
impl PNSCopying for MPSCNNConvolutionTransposeGradient {}
impl PNSSecureCoding for MPSCNNConvolutionTransposeGradient {}
impl INSObject for MPSCNNConvolutionTransposeGradient {}
impl PNSObject for MPSCNNConvolutionTransposeGradient {}
impl IMPSCNNConvolutionTransposeGradient for MPSCNNConvolutionTransposeGradient {}
pub trait IMPSCNNConvolutionTransposeGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_weights_(&self, device: *mut u64, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, weights : weights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn reloadWeightsAndBiasesFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadWeightsAndBiasesFromDataSource)
    }
    unsafe fn reloadWeightsAndBiasesWithCommandBuffer_state_(
        &self,
        commandBuffer: *mut u64,
        state: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadWeightsAndBiasesWithCommandBuffer : commandBuffer, state : state)
    }
    unsafe fn sourceGradientFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceGradientFeatureChannels)
    }
    unsafe fn sourceImageFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceImageFeatureChannels)
    }
    unsafe fn groups(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, groups)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
    unsafe fn gradientOption(&self) -> MPSCNNConvolutionGradientOption
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientOption)
    }
    unsafe fn setGradientOption_(&self, gradientOption: MPSCNNConvolutionGradientOption)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGradientOption : gradientOption)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBinaryConvolution(pub id);
impl std::ops::Deref for MPSCNNBinaryConvolution {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBinaryConvolution {}
impl MPSCNNBinaryConvolution {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryConvolution").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNBinaryConvolution {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNBinaryConvolution {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNBinaryConvolution, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBinaryConvolution").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNBinaryConvolution(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNBinaryConvolution")
        }
    }
}
impl IMPSKernel for MPSCNNBinaryConvolution {}
impl PNSCopying for MPSCNNBinaryConvolution {}
impl PNSSecureCoding for MPSCNNBinaryConvolution {}
impl INSObject for MPSCNNBinaryConvolution {}
impl PNSObject for MPSCNNBinaryConvolution {}
impl IMPSCNNBinaryConvolution for MPSCNNBinaryConvolution {}
pub trait IMPSCNNBinaryConvolution: Sized + std::ops::Deref {
    unsafe fn initWithDevice_convolutionData_scaleValue_type_flags_(
        &self,
        device: *mut u64,
        convolutionData: *mut u64,
        scaleValue: f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, convolutionData : convolutionData, scaleValue : scaleValue, r#type : type_, flags : flags)
    }
    unsafe fn initWithDevice_convolutionData_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags_(
        &self,
        device: *mut u64,
        convolutionData: *mut u64,
        outputBiasTerms: *const f32,
        outputScaleTerms: *const f32,
        inputBiasTerms: *const f32,
        inputScaleTerms: *const f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, convolutionData : convolutionData, outputBiasTerms : outputBiasTerms, outputScaleTerms : outputScaleTerms, inputBiasTerms : inputBiasTerms, inputScaleTerms : inputScaleTerms, r#type : type_, flags : flags)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBinaryFullyConnected(pub id);
impl std::ops::Deref for MPSCNNBinaryFullyConnected {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBinaryFullyConnected {}
impl MPSCNNBinaryFullyConnected {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryFullyConnected").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryConvolution for MPSCNNBinaryFullyConnected {}
impl From<MPSCNNBinaryFullyConnected> for MPSCNNBinaryConvolution {
    fn from(child: MPSCNNBinaryFullyConnected) -> MPSCNNBinaryConvolution {
        MPSCNNBinaryConvolution(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNBinaryConvolution> for MPSCNNBinaryFullyConnected {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNBinaryConvolution,
    ) -> Result<MPSCNNBinaryFullyConnected, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBinaryFullyConnected").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNBinaryFullyConnected(parent.0))
        } else {
            Err("This MPSCNNBinaryConvolution cannot be downcasted to MPSCNNBinaryFullyConnected")
        }
    }
}
impl IMPSCNNKernel for MPSCNNBinaryFullyConnected {}
impl IMPSKernel for MPSCNNBinaryFullyConnected {}
impl PNSCopying for MPSCNNBinaryFullyConnected {}
impl PNSSecureCoding for MPSCNNBinaryFullyConnected {}
impl INSObject for MPSCNNBinaryFullyConnected {}
impl PNSObject for MPSCNNBinaryFullyConnected {}
impl IMPSCNNBinaryFullyConnected for MPSCNNBinaryFullyConnected {}
pub trait IMPSCNNBinaryFullyConnected: Sized + std::ops::Deref {
    unsafe fn initWithDevice_convolutionData_scaleValue_type_flags_(
        &self,
        device: *mut u64,
        convolutionData: *mut u64,
        scaleValue: f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, convolutionData : convolutionData, scaleValue : scaleValue, r#type : type_, flags : flags)
    }
    unsafe fn initWithDevice_convolutionData_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags_(
        &self,
        device: *mut u64,
        convolutionData: *mut u64,
        outputBiasTerms: *const f32,
        outputScaleTerms: *const f32,
        inputBiasTerms: *const f32,
        inputScaleTerms: *const f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, convolutionData : convolutionData, outputBiasTerms : outputBiasTerms, outputScaleTerms : outputScaleTerms, inputBiasTerms : inputBiasTerms, inputScaleTerms : inputScaleTerms, r#type : type_, flags : flags)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGramMatrixCalculation(pub id);
impl std::ops::Deref for MPSNNGramMatrixCalculation {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGramMatrixCalculation {}
impl MPSNNGramMatrixCalculation {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculation").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNGramMatrixCalculation {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNGramMatrixCalculation {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNGramMatrixCalculation, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculation").unwrap()) };
        if is_kind_of {
            Ok(MPSNNGramMatrixCalculation(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNGramMatrixCalculation")
        }
    }
}
impl IMPSKernel for MPSNNGramMatrixCalculation {}
impl PNSCopying for MPSNNGramMatrixCalculation {}
impl PNSSecureCoding for MPSNNGramMatrixCalculation {}
impl INSObject for MPSNNGramMatrixCalculation {}
impl PNSObject for MPSNNGramMatrixCalculation {}
impl IMPSNNGramMatrixCalculation for MPSNNGramMatrixCalculation {}
pub trait IMPSNNGramMatrixCalculation: Sized + std::ops::Deref {
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_alpha_(&self, device: *mut u64, alpha: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, alpha : alpha)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGramMatrixCalculationGradient(pub id);
impl std::ops::Deref for MPSNNGramMatrixCalculationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGramMatrixCalculationGradient {}
impl MPSNNGramMatrixCalculationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSNNGramMatrixCalculationGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSNNGramMatrixCalculationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSNNGramMatrixCalculationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNGramMatrixCalculationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSNNGramMatrixCalculationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNGramMatrixCalculationGradient {}
impl IMPSKernel for MPSNNGramMatrixCalculationGradient {}
impl PNSCopying for MPSNNGramMatrixCalculationGradient {}
impl PNSSecureCoding for MPSNNGramMatrixCalculationGradient {}
impl INSObject for MPSNNGramMatrixCalculationGradient {}
impl PNSObject for MPSNNGramMatrixCalculationGradient {}
impl IMPSNNGramMatrixCalculationGradient for MPSNNGramMatrixCalculationGradient {}
pub trait IMPSNNGramMatrixCalculationGradient: Sized + std::ops::Deref {
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_alpha_(&self, device: *mut u64, alpha: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, alpha : alpha)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPooling(pub id);
impl std::ops::Deref for MPSCNNPooling {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPooling {}
impl MPSCNNPooling {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPooling").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNPooling {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNPooling {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNPooling, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPooling").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPooling(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNPooling")
        }
    }
}
impl IMPSKernel for MPSCNNPooling {}
impl PNSCopying for MPSCNNPooling {}
impl PNSSecureCoding for MPSCNNPooling {}
impl INSObject for MPSCNNPooling {}
impl PNSObject for MPSCNNPooling {}
impl IMPSCNNPooling for MPSCNNPooling {}
pub trait IMPSCNNPooling: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingMax(pub id);
impl std::ops::Deref for MPSCNNPoolingMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingMax {}
impl MPSCNNPoolingMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingMax").unwrap(), alloc) })
    }
}
impl IMPSCNNPooling for MPSCNNPoolingMax {}
impl From<MPSCNNPoolingMax> for MPSCNNPooling {
    fn from(child: MPSCNNPoolingMax) -> MPSCNNPooling {
        MPSCNNPooling(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNPooling> for MPSCNNPoolingMax {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPooling) -> Result<MPSCNNPoolingMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingMax").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingMax(parent.0))
        } else {
            Err("This MPSCNNPooling cannot be downcasted to MPSCNNPoolingMax")
        }
    }
}
impl IMPSCNNKernel for MPSCNNPoolingMax {}
impl IMPSKernel for MPSCNNPoolingMax {}
impl PNSCopying for MPSCNNPoolingMax {}
impl PNSSecureCoding for MPSCNNPoolingMax {}
impl INSObject for MPSCNNPoolingMax {}
impl PNSObject for MPSCNNPoolingMax {}
impl IMPSCNNPoolingMax for MPSCNNPoolingMax {}
pub trait IMPSCNNPoolingMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingAverage(pub id);
impl std::ops::Deref for MPSCNNPoolingAverage {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingAverage {}
impl MPSCNNPoolingAverage {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverage").unwrap(), alloc) })
    }
}
impl IMPSCNNPooling for MPSCNNPoolingAverage {}
impl std::convert::TryFrom<MPSCNNPooling> for MPSCNNPoolingAverage {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPooling) -> Result<MPSCNNPoolingAverage, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverage").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingAverage(parent.0))
        } else {
            Err("This MPSCNNPooling cannot be downcasted to MPSCNNPoolingAverage")
        }
    }
}
impl IMPSCNNKernel for MPSCNNPoolingAverage {}
impl IMPSKernel for MPSCNNPoolingAverage {}
impl PNSCopying for MPSCNNPoolingAverage {}
impl PNSSecureCoding for MPSCNNPoolingAverage {}
impl INSObject for MPSCNNPoolingAverage {}
impl PNSObject for MPSCNNPoolingAverage {}
impl IMPSCNNPoolingAverage for MPSCNNPoolingAverage {}
pub trait IMPSCNNPoolingAverage: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn zeroPadSizeX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, zeroPadSizeX)
    }
    unsafe fn setZeroPadSizeX_(&self, zeroPadSizeX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setZeroPadSizeX : zeroPadSizeX)
    }
    unsafe fn zeroPadSizeY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, zeroPadSizeY)
    }
    unsafe fn setZeroPadSizeY_(&self, zeroPadSizeY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setZeroPadSizeY : zeroPadSizeY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingL2Norm(pub id);
impl std::ops::Deref for MPSCNNPoolingL2Norm {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingL2Norm {}
impl MPSCNNPoolingL2Norm {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2Norm").unwrap(), alloc) })
    }
}
impl IMPSCNNPooling for MPSCNNPoolingL2Norm {}
impl std::convert::TryFrom<MPSCNNPooling> for MPSCNNPoolingL2Norm {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPooling) -> Result<MPSCNNPoolingL2Norm, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2Norm").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingL2Norm(parent.0))
        } else {
            Err("This MPSCNNPooling cannot be downcasted to MPSCNNPoolingL2Norm")
        }
    }
}
impl IMPSCNNKernel for MPSCNNPoolingL2Norm {}
impl IMPSKernel for MPSCNNPoolingL2Norm {}
impl PNSCopying for MPSCNNPoolingL2Norm {}
impl PNSSecureCoding for MPSCNNPoolingL2Norm {}
impl INSObject for MPSCNNPoolingL2Norm {}
impl PNSObject for MPSCNNPoolingL2Norm {}
impl IMPSCNNPoolingL2Norm for MPSCNNPoolingL2Norm {}
pub trait IMPSCNNPoolingL2Norm: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDilatedPoolingMax(pub id);
impl std::ops::Deref for MPSCNNDilatedPoolingMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDilatedPoolingMax {}
impl MPSCNNDilatedPoolingMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMax").unwrap(), alloc) })
    }
}
impl IMPSCNNPooling for MPSCNNDilatedPoolingMax {}
impl std::convert::TryFrom<MPSCNNPooling> for MPSCNNDilatedPoolingMax {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPooling) -> Result<MPSCNNDilatedPoolingMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMax").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDilatedPoolingMax(parent.0))
        } else {
            Err("This MPSCNNPooling cannot be downcasted to MPSCNNDilatedPoolingMax")
        }
    }
}
impl IMPSCNNKernel for MPSCNNDilatedPoolingMax {}
impl IMPSKernel for MPSCNNDilatedPoolingMax {}
impl PNSCopying for MPSCNNDilatedPoolingMax {}
impl PNSSecureCoding for MPSCNNDilatedPoolingMax {}
impl INSObject for MPSCNNDilatedPoolingMax {}
impl PNSObject for MPSCNNDilatedPoolingMax {}
impl IMPSCNNDilatedPoolingMax for MPSCNNDilatedPoolingMax {}
pub trait IMPSCNNDilatedPoolingMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_dilationRateX_dilationRateY_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        dilationRateX: NSUInteger,
        dilationRateY: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, dilationRateX : dilationRateX, dilationRateY : dilationRateY, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn dilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateX)
    }
    unsafe fn dilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingGradient(pub id);
impl std::ops::Deref for MPSCNNPoolingGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingGradient {}
impl MPSCNNPoolingGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNPoolingGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNPoolingGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNPoolingGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNPoolingGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNPoolingGradient {}
impl IMPSKernel for MPSCNNPoolingGradient {}
impl PNSCopying for MPSCNNPoolingGradient {}
impl PNSSecureCoding for MPSCNNPoolingGradient {}
impl INSObject for MPSCNNPoolingGradient {}
impl PNSObject for MPSCNNPoolingGradient {}
impl IMPSCNNPoolingGradient for MPSCNNPoolingGradient {}
pub trait IMPSCNNPoolingGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn sourceSize(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceSize)
    }
    unsafe fn setSourceSize_(&self, sourceSize: MTLSize)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceSize : sourceSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingAverageGradient(pub id);
impl std::ops::Deref for MPSCNNPoolingAverageGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingAverageGradient {}
impl MPSCNNPoolingAverageGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverageGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradient for MPSCNNPoolingAverageGradient {}
impl From<MPSCNNPoolingAverageGradient> for MPSCNNPoolingGradient {
    fn from(child: MPSCNNPoolingAverageGradient) -> MPSCNNPoolingGradient {
        MPSCNNPoolingGradient(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNPoolingGradient> for MPSCNNPoolingAverageGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNPoolingGradient,
    ) -> Result<MPSCNNPoolingAverageGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverageGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingAverageGradient(parent.0))
        } else {
            Err("This MPSCNNPoolingGradient cannot be downcasted to MPSCNNPoolingAverageGradient")
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNPoolingAverageGradient {}
impl IMPSCNNBinaryKernel for MPSCNNPoolingAverageGradient {}
impl IMPSKernel for MPSCNNPoolingAverageGradient {}
impl PNSCopying for MPSCNNPoolingAverageGradient {}
impl PNSSecureCoding for MPSCNNPoolingAverageGradient {}
impl INSObject for MPSCNNPoolingAverageGradient {}
impl PNSObject for MPSCNNPoolingAverageGradient {}
impl IMPSCNNPoolingAverageGradient for MPSCNNPoolingAverageGradient {}
pub trait IMPSCNNPoolingAverageGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn zeroPadSizeX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, zeroPadSizeX)
    }
    unsafe fn setZeroPadSizeX_(&self, zeroPadSizeX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setZeroPadSizeX : zeroPadSizeX)
    }
    unsafe fn zeroPadSizeY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, zeroPadSizeY)
    }
    unsafe fn setZeroPadSizeY_(&self, zeroPadSizeY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setZeroPadSizeY : zeroPadSizeY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingMaxGradient(pub id);
impl std::ops::Deref for MPSCNNPoolingMaxGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingMaxGradient {}
impl MPSCNNPoolingMaxGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingMaxGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradient for MPSCNNPoolingMaxGradient {}
impl std::convert::TryFrom<MPSCNNPoolingGradient> for MPSCNNPoolingMaxGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPoolingGradient) -> Result<MPSCNNPoolingMaxGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingMaxGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingMaxGradient(parent.0))
        } else {
            Err("This MPSCNNPoolingGradient cannot be downcasted to MPSCNNPoolingMaxGradient")
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNPoolingMaxGradient {}
impl IMPSCNNBinaryKernel for MPSCNNPoolingMaxGradient {}
impl IMPSKernel for MPSCNNPoolingMaxGradient {}
impl PNSCopying for MPSCNNPoolingMaxGradient {}
impl PNSSecureCoding for MPSCNNPoolingMaxGradient {}
impl INSObject for MPSCNNPoolingMaxGradient {}
impl PNSObject for MPSCNNPoolingMaxGradient {}
impl IMPSCNNPoolingMaxGradient for MPSCNNPoolingMaxGradient {}
pub trait IMPSCNNPoolingMaxGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingL2NormGradient(pub id);
impl std::ops::Deref for MPSCNNPoolingL2NormGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingL2NormGradient {}
impl MPSCNNPoolingL2NormGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2NormGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradient for MPSCNNPoolingL2NormGradient {}
impl std::convert::TryFrom<MPSCNNPoolingGradient> for MPSCNNPoolingL2NormGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPoolingGradient) -> Result<MPSCNNPoolingL2NormGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2NormGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingL2NormGradient(parent.0))
        } else {
            Err("This MPSCNNPoolingGradient cannot be downcasted to MPSCNNPoolingL2NormGradient")
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNPoolingL2NormGradient {}
impl IMPSCNNBinaryKernel for MPSCNNPoolingL2NormGradient {}
impl IMPSKernel for MPSCNNPoolingL2NormGradient {}
impl PNSCopying for MPSCNNPoolingL2NormGradient {}
impl PNSSecureCoding for MPSCNNPoolingL2NormGradient {}
impl INSObject for MPSCNNPoolingL2NormGradient {}
impl PNSObject for MPSCNNPoolingL2NormGradient {}
impl IMPSCNNPoolingL2NormGradient for MPSCNNPoolingL2NormGradient {}
pub trait IMPSCNNPoolingL2NormGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDilatedPoolingMaxGradient(pub id);
impl std::ops::Deref for MPSCNNDilatedPoolingMaxGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDilatedPoolingMaxGradient {}
impl MPSCNNDilatedPoolingMaxGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradient for MPSCNNDilatedPoolingMaxGradient {}
impl std::convert::TryFrom<MPSCNNPoolingGradient> for MPSCNNDilatedPoolingMaxGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNPoolingGradient,
    ) -> Result<MPSCNNDilatedPoolingMaxGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNDilatedPoolingMaxGradient(parent.0))
        } else {
            Err ("This MPSCNNPoolingGradient cannot be downcasted to MPSCNNDilatedPoolingMaxGradient" ,)
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNDilatedPoolingMaxGradient {}
impl IMPSCNNBinaryKernel for MPSCNNDilatedPoolingMaxGradient {}
impl IMPSKernel for MPSCNNDilatedPoolingMaxGradient {}
impl PNSCopying for MPSCNNDilatedPoolingMaxGradient {}
impl PNSSecureCoding for MPSCNNDilatedPoolingMaxGradient {}
impl INSObject for MPSCNNDilatedPoolingMaxGradient {}
impl PNSObject for MPSCNNDilatedPoolingMaxGradient {}
impl IMPSCNNDilatedPoolingMaxGradient for MPSCNNDilatedPoolingMaxGradient {}
pub trait IMPSCNNDilatedPoolingMaxGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_kernelWidth_kernelHeight_dilationRateX_dilationRateY_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        dilationRateX: NSUInteger,
        dilationRateY: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, dilationRateX : dilationRateX, dilationRateY : dilationRateY, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithDevice_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        device: *mut u64,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
pub type MPSCNNLossType = u32;
pub type MPSCNNReductionType = i32;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLossDataDescriptor(pub id);
impl std::ops::Deref for MPSCNNLossDataDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLossDataDescriptor {}
impl MPSCNNLossDataDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossDataDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSCNNLossDataDescriptor {}
impl INSObject for MPSCNNLossDataDescriptor {}
impl PNSObject for MPSCNNLossDataDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSCNNLossDataDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSCNNLossDataDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLossDataDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLossDataDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSCNNLossDataDescriptor")
        }
    }
}
impl IMPSCNNLossDataDescriptor for MPSCNNLossDataDescriptor {}
pub trait IMPSCNNLossDataDescriptor: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn layout(&self) -> MPSDataLayout
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, layout)
    }
    unsafe fn size(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, size)
    }
    unsafe fn bytesPerRow(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bytesPerRow)
    }
    unsafe fn setBytesPerRow_(&self, bytesPerRow: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBytesPerRow : bytesPerRow)
    }
    unsafe fn bytesPerImage(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bytesPerImage)
    }
    unsafe fn setBytesPerImage_(&self, bytesPerImage: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBytesPerImage : bytesPerImage)
    }
    unsafe fn cnnLossDataDescriptorWithData_layout_size_(
        data: NSData,
        layout: MPSDataLayout,
        size: MTLSize,
    ) -> MPSCNNLossDataDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossDataDescriptor").unwrap(), cnnLossDataDescriptorWithData : data, layout : layout, size : size)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLossLabels(pub id);
impl std::ops::Deref for MPSCNNLossLabels {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLossLabels {}
impl MPSCNNLossLabels {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossLabels").unwrap(), alloc) })
    }
}
impl IMPSState for MPSCNNLossLabels {}
impl std::convert::TryFrom<MPSState> for MPSCNNLossLabels {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSCNNLossLabels, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLossLabels").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLossLabels(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSCNNLossLabels")
        }
    }
}
impl INSObject for MPSCNNLossLabels {}
impl PNSObject for MPSCNNLossLabels {}
impl IMPSCNNLossLabels for MPSCNNLossLabels {}
pub trait IMPSCNNLossLabels: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDevice_labelsDescriptor_(
        &self,
        device: *mut u64,
        labelsDescriptor: MPSCNNLossDataDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, labelsDescriptor : labelsDescriptor)
    }
    unsafe fn initWithDevice_lossImageSize_labelsDescriptor_weightsDescriptor_(
        &self,
        device: *mut u64,
        lossImageSize: MTLSize,
        labelsDescriptor: MPSCNNLossDataDescriptor,
        weightsDescriptor: MPSCNNLossDataDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lossImageSize : lossImageSize, labelsDescriptor : labelsDescriptor, weightsDescriptor : weightsDescriptor)
    }
    unsafe fn initWithDevice_lossImageSize_labelsImage_weightsImage_(
        &self,
        device: *mut u64,
        lossImageSize: MTLSize,
        labelsImage: MPSImage,
        weightsImage: MPSImage,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lossImageSize : lossImageSize, labelsImage : labelsImage, weightsImage : weightsImage)
    }
    unsafe fn lossImage(&self) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossImage)
    }
    unsafe fn labelsImage(&self) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelsImage)
    }
    unsafe fn weightsImage(&self) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weightsImage)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLossDescriptor(pub id);
impl std::ops::Deref for MPSCNNLossDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLossDescriptor {}
impl MPSCNNLossDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSCNNLossDescriptor {}
impl INSObject for MPSCNNLossDescriptor {}
impl PNSObject for MPSCNNLossDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSCNNLossDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSCNNLossDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLossDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLossDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSCNNLossDescriptor")
        }
    }
}
impl IMPSCNNLossDescriptor for MPSCNNLossDescriptor {}
pub trait IMPSCNNLossDescriptor: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn lossType(&self) -> MPSCNNLossType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossType)
    }
    unsafe fn setLossType_(&self, lossType: MPSCNNLossType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLossType : lossType)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn setReductionType_(&self, reductionType: MPSCNNReductionType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReductionType : reductionType)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
    unsafe fn setReduceAcrossBatch_(&self, reduceAcrossBatch: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReduceAcrossBatch : reduceAcrossBatch)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn setWeight_(&self, weight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWeight : weight)
    }
    unsafe fn labelSmoothing(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelSmoothing)
    }
    unsafe fn setLabelSmoothing_(&self, labelSmoothing: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabelSmoothing : labelSmoothing)
    }
    unsafe fn numberOfClasses(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfClasses)
    }
    unsafe fn setNumberOfClasses_(&self, numberOfClasses: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNumberOfClasses : numberOfClasses)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn cnnLossDescriptorWithType_reductionType_(
        lossType: MPSCNNLossType,
        reductionType: MPSCNNReductionType,
    ) -> MPSCNNLossDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossDescriptor").unwrap(), cnnLossDescriptorWithType : lossType, reductionType : reductionType)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLoss(pub id);
impl std::ops::Deref for MPSCNNLoss {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLoss {}
impl MPSCNNLoss {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLoss").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNLoss {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNLoss {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNLoss, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLoss").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLoss(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNLoss")
        }
    }
}
impl IMPSKernel for MPSCNNLoss {}
impl PNSCopying for MPSCNNLoss {}
impl PNSSecureCoding for MPSCNNLoss {}
impl INSObject for MPSCNNLoss {}
impl PNSObject for MPSCNNLoss {}
impl IMPSCNNLoss for MPSCNNLoss {}
pub trait IMPSCNNLoss: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_lossDescriptor_(
        &self,
        device: *mut u64,
        lossDescriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lossDescriptor : lossDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_labels_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        labels: MPSCNNLossLabels,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, labels : labels, destinationImage : destinationImage)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_labels_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        labels: MPSCNNLossLabels,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, labels : labels)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_labels_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        labels: NSArray,
        destinationImage: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImage, labels : labels, destinationImages : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_labels_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        labels: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImage, labels : labels)
    }
    unsafe fn lossType(&self) -> MPSCNNLossType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossType)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn labelSmoothing(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelSmoothing)
    }
    unsafe fn numberOfClasses(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfClasses)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNYOLOLossDescriptor(pub id);
impl std::ops::Deref for MPSCNNYOLOLossDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNYOLOLossDescriptor {}
impl MPSCNNYOLOLossDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNYOLOLossDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSCNNYOLOLossDescriptor {}
impl INSObject for MPSCNNYOLOLossDescriptor {}
impl PNSObject for MPSCNNYOLOLossDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSCNNYOLOLossDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSCNNYOLOLossDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNYOLOLossDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNYOLOLossDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSCNNYOLOLossDescriptor")
        }
    }
}
impl IMPSCNNYOLOLossDescriptor for MPSCNNYOLOLossDescriptor {}
pub trait IMPSCNNYOLOLossDescriptor: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn XYLossDescriptor(&self) -> MPSCNNLossDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, XYLossDescriptor)
    }
    unsafe fn setXYLossDescriptor_(&self, XYLossDescriptor: MPSCNNLossDescriptor)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setXYLossDescriptor : XYLossDescriptor)
    }
    unsafe fn WHLossDescriptor(&self) -> MPSCNNLossDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, WHLossDescriptor)
    }
    unsafe fn setWHLossDescriptor_(&self, WHLossDescriptor: MPSCNNLossDescriptor)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWHLossDescriptor : WHLossDescriptor)
    }
    unsafe fn confidenceLossDescriptor(&self) -> MPSCNNLossDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, confidenceLossDescriptor)
    }
    unsafe fn setConfidenceLossDescriptor_(&self, confidenceLossDescriptor: MPSCNNLossDescriptor)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setConfidenceLossDescriptor : confidenceLossDescriptor)
    }
    unsafe fn classesLossDescriptor(&self) -> MPSCNNLossDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, classesLossDescriptor)
    }
    unsafe fn setClassesLossDescriptor_(&self, classesLossDescriptor: MPSCNNLossDescriptor)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClassesLossDescriptor : classesLossDescriptor)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn setReductionType_(&self, reductionType: MPSCNNReductionType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReductionType : reductionType)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
    unsafe fn setReduceAcrossBatch_(&self, reduceAcrossBatch: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReduceAcrossBatch : reduceAcrossBatch)
    }
    unsafe fn rescore(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rescore)
    }
    unsafe fn setRescore_(&self, rescore: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRescore : rescore)
    }
    unsafe fn scaleXY(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleXY)
    }
    unsafe fn setScaleXY_(&self, scaleXY: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setScaleXY : scaleXY)
    }
    unsafe fn scaleWH(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleWH)
    }
    unsafe fn setScaleWH_(&self, scaleWH: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setScaleWH : scaleWH)
    }
    unsafe fn scaleNoObject(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleNoObject)
    }
    unsafe fn setScaleNoObject_(&self, scaleNoObject: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setScaleNoObject : scaleNoObject)
    }
    unsafe fn scaleObject(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleObject)
    }
    unsafe fn setScaleObject_(&self, scaleObject: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setScaleObject : scaleObject)
    }
    unsafe fn scaleClass(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleClass)
    }
    unsafe fn setScaleClass_(&self, scaleClass: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setScaleClass : scaleClass)
    }
    unsafe fn minIOUForObjectPresence(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minIOUForObjectPresence)
    }
    unsafe fn setMinIOUForObjectPresence_(&self, minIOUForObjectPresence: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinIOUForObjectPresence : minIOUForObjectPresence)
    }
    unsafe fn maxIOUForObjectAbsence(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maxIOUForObjectAbsence)
    }
    unsafe fn setMaxIOUForObjectAbsence_(&self, maxIOUForObjectAbsence: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaxIOUForObjectAbsence : maxIOUForObjectAbsence)
    }
    unsafe fn numberOfAnchorBoxes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfAnchorBoxes)
    }
    unsafe fn setNumberOfAnchorBoxes_(&self, numberOfAnchorBoxes: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNumberOfAnchorBoxes : numberOfAnchorBoxes)
    }
    unsafe fn anchorBoxes(&self) -> NSData
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, anchorBoxes)
    }
    unsafe fn setAnchorBoxes_(&self, anchorBoxes: NSData)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAnchorBoxes : anchorBoxes)
    }
    unsafe fn cnnLossDescriptorWithXYLossType_WHLossType_confidenceLossType_classesLossType_reductionType_anchorBoxes_numberOfAnchorBoxes_(
        XYLossType: MPSCNNLossType,
        WHLossType: MPSCNNLossType,
        confidenceLossType: MPSCNNLossType,
        classesLossType: MPSCNNLossType,
        reductionType: MPSCNNReductionType,
        anchorBoxes: NSData,
        numberOfAnchorBoxes: NSUInteger,
    ) -> MPSCNNYOLOLossDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNYOLOLossDescriptor").unwrap(), cnnLossDescriptorWithXYLossType : XYLossType, WHLossType : WHLossType, confidenceLossType : confidenceLossType, classesLossType : classesLossType, reductionType : reductionType, anchorBoxes : anchorBoxes, numberOfAnchorBoxes : numberOfAnchorBoxes)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNYOLOLoss(pub id);
impl std::ops::Deref for MPSCNNYOLOLoss {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNYOLOLoss {}
impl MPSCNNYOLOLoss {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNYOLOLoss").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNYOLOLoss {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNYOLOLoss {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNYOLOLoss, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNYOLOLoss").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNYOLOLoss(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNYOLOLoss")
        }
    }
}
impl IMPSKernel for MPSCNNYOLOLoss {}
impl PNSCopying for MPSCNNYOLOLoss {}
impl PNSSecureCoding for MPSCNNYOLOLoss {}
impl INSObject for MPSCNNYOLOLoss {}
impl PNSObject for MPSCNNYOLOLoss {}
impl IMPSCNNYOLOLoss for MPSCNNYOLOLoss {}
pub trait IMPSCNNYOLOLoss: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_lossDescriptor_(
        &self,
        device: *mut u64,
        lossDescriptor: MPSCNNYOLOLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lossDescriptor : lossDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_labels_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        labels: MPSCNNLossLabels,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, labels : labels, destinationImage : destinationImage)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_labels_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        labels: MPSCNNLossLabels,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, labels : labels)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_labels_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        labels: NSArray,
        destinationImage: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImage, labels : labels, destinationImages : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_labels_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        labels: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImage, labels : labels)
    }
    unsafe fn lossXY(&self) -> MPSCNNLoss
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossXY)
    }
    unsafe fn lossWH(&self) -> MPSCNNLoss
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossWH)
    }
    unsafe fn lossConfidence(&self) -> MPSCNNLoss
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossConfidence)
    }
    unsafe fn lossClasses(&self) -> MPSCNNLoss
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossClasses)
    }
    unsafe fn scaleXY(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleXY)
    }
    unsafe fn scaleWH(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleWH)
    }
    unsafe fn scaleNoObject(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleNoObject)
    }
    unsafe fn scaleObject(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleObject)
    }
    unsafe fn scaleClass(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleClass)
    }
    unsafe fn minIOUForObjectPresence(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minIOUForObjectPresence)
    }
    unsafe fn maxIOUForObjectAbsence(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maxIOUForObjectAbsence)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn numberOfAnchorBoxes(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfAnchorBoxes)
    }
    unsafe fn anchorBoxes(&self) -> NSData
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, anchorBoxes)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNForwardLoss(pub id);
impl std::ops::Deref for MPSNNForwardLoss {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNForwardLoss {}
impl MPSNNForwardLoss {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNForwardLoss").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNForwardLoss {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNForwardLoss {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNForwardLoss, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNForwardLoss").unwrap()) };
        if is_kind_of {
            Ok(MPSNNForwardLoss(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNForwardLoss")
        }
    }
}
impl IMPSKernel for MPSNNForwardLoss {}
impl PNSCopying for MPSNNForwardLoss {}
impl PNSSecureCoding for MPSNNForwardLoss {}
impl INSObject for MPSNNForwardLoss {}
impl PNSObject for MPSNNForwardLoss {}
impl IMPSNNForwardLoss for MPSNNForwardLoss {}
pub trait IMPSNNForwardLoss: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_lossDescriptor_(
        &self,
        device: *mut u64,
        lossDescriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lossDescriptor : lossDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_labels_weights_destinationStates_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        labels: NSArray,
        weights: NSArray,
        destinationStates: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, labels : labels, weights : weights, destinationStates : destinationStates, destinationImages : destinationImages)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_labels_weights_destinationStates_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        labels: NSArray,
        weights: NSArray,
        outStates: *mut *mut MPSStateBatch,
        isTemporary: BOOL,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, labels : labels, weights : weights, destinationStates : outStates, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn lossType(&self) -> MPSCNNLossType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossType)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
    unsafe fn numberOfClasses(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfClasses)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn setWeight_(&self, weight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWeight : weight)
    }
    unsafe fn labelSmoothing(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelSmoothing)
    }
    unsafe fn setLabelSmoothing_(&self, labelSmoothing: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabelSmoothing : labelSmoothing)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNLossGradient(pub id);
impl std::ops::Deref for MPSNNLossGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNLossGradient {}
impl MPSNNLossGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLossGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryKernel for MPSNNLossGradient {}
impl std::convert::TryFrom<MPSCNNBinaryKernel> for MPSNNLossGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNBinaryKernel) -> Result<MPSNNLossGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNLossGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSNNLossGradient(parent.0))
        } else {
            Err("This MPSCNNBinaryKernel cannot be downcasted to MPSNNLossGradient")
        }
    }
}
impl IMPSKernel for MPSNNLossGradient {}
impl PNSCopying for MPSNNLossGradient {}
impl PNSSecureCoding for MPSNNLossGradient {}
impl INSObject for MPSNNLossGradient {}
impl PNSObject for MPSNNLossGradient {}
impl IMPSNNLossGradient for MPSNNLossGradient {}
pub trait IMPSNNLossGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_lossDescriptor_(
        &self,
        device: *mut u64,
        lossDescriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, lossDescriptor : lossDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_labels_weights_sourceStates_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        labels: NSArray,
        weights: NSArray,
        sourceStates: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, labels : labels, weights : weights, sourceStates : sourceStates)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_labels_weights_sourceStates_destinationGradients_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        labels: NSArray,
        weights: NSArray,
        sourceStates: NSArray,
        destinationGradients: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, labels : labels, weights : weights, sourceStates : sourceStates, destinationGradients : destinationGradients)
    }
    unsafe fn lossType(&self) -> MPSCNNLossType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossType)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
    unsafe fn numberOfClasses(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfClasses)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn setWeight_(&self, weight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWeight : weight)
    }
    unsafe fn labelSmoothing(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelSmoothing)
    }
    unsafe fn setLabelSmoothing_(&self, labelSmoothing: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabelSmoothing : labelSmoothing)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn computeLabelGradients(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, computeLabelGradients)
    }
    unsafe fn setComputeLabelGradients_(&self, computeLabelGradients: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setComputeLabelGradients : computeLabelGradients)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNInitialGradient(pub id);
impl std::ops::Deref for MPSNNInitialGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNInitialGradient {}
impl MPSNNInitialGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNInitialGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNInitialGradient {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNInitialGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNInitialGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNInitialGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSNNInitialGradient(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNInitialGradient")
        }
    }
}
impl IMPSKernel for MPSNNInitialGradient {}
impl PNSCopying for MPSNNInitialGradient {}
impl PNSSecureCoding for MPSNNInitialGradient {}
impl INSObject for MPSNNInitialGradient {}
impl PNSObject for MPSNNInitialGradient {}
impl IMPSNNInitialGradient for MPSNNInitialGradient {}
pub trait IMPSNNInitialGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNArithmeticGradientState(pub id);
impl std::ops::Deref for MPSCNNArithmeticGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNArithmeticGradientState {}
impl MPSCNNArithmeticGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNArithmeticGradientState").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryGradientState for MPSCNNArithmeticGradientState {}
impl From<MPSCNNArithmeticGradientState> for MPSNNBinaryGradientState {
    fn from(child: MPSCNNArithmeticGradientState) -> MPSNNBinaryGradientState {
        MPSNNBinaryGradientState(child.0)
    }
}
impl std::convert::TryFrom<MPSNNBinaryGradientState> for MPSCNNArithmeticGradientState {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNBinaryGradientState,
    ) -> Result<MPSCNNArithmeticGradientState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNArithmeticGradientState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNArithmeticGradientState(parent.0))
        } else {
            Err ("This MPSNNBinaryGradientState cannot be downcasted to MPSCNNArithmeticGradientState" ,)
        }
    }
}
impl IMPSState for MPSCNNArithmeticGradientState {}
impl INSObject for MPSCNNArithmeticGradientState {}
impl PNSObject for MPSCNNArithmeticGradientState {}
impl IMPSCNNArithmeticGradientState for MPSCNNArithmeticGradientState {}
pub trait IMPSCNNArithmeticGradientState: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNArithmetic(pub id);
impl std::ops::Deref for MPSCNNArithmetic {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNArithmetic {}
impl MPSCNNArithmetic {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNArithmetic").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryKernel for MPSCNNArithmetic {}
impl std::convert::TryFrom<MPSCNNBinaryKernel> for MPSCNNArithmetic {
    type Error = &'static str;
    fn try_from(parent: MPSCNNBinaryKernel) -> Result<MPSCNNArithmetic, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNArithmetic").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNArithmetic(parent.0))
        } else {
            Err("This MPSCNNBinaryKernel cannot be downcasted to MPSCNNArithmetic")
        }
    }
}
impl IMPSKernel for MPSCNNArithmetic {}
impl PNSCopying for MPSCNNArithmetic {}
impl PNSSecureCoding for MPSCNNArithmetic {}
impl INSObject for MPSCNNArithmetic {}
impl PNSObject for MPSCNNArithmetic {}
impl IMPSCNNArithmetic for MPSCNNArithmetic {}
pub trait IMPSCNNArithmetic: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_destinationState_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        destinationState: MPSCNNArithmeticGradientState,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, destinationState : destinationState, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_primaryImages_secondaryImages_destinationStates_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        primaryImages: NSArray,
        secondaryImages: NSArray,
        destinationStates: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, primaryImages : primaryImages, secondaryImages : secondaryImages, destinationStates : destinationStates, destinationImages : destinationImages)
    }
    unsafe fn primaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryScale)
    }
    unsafe fn setPrimaryScale_(&self, primaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryScale : primaryScale)
    }
    unsafe fn secondaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryScale)
    }
    unsafe fn setSecondaryScale_(&self, secondaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryScale : secondaryScale)
    }
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
    unsafe fn primaryStrideInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInFeatureChannels)
    }
    unsafe fn setPrimaryStrideInFeatureChannels_(&self, primaryStrideInFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInFeatureChannels : primaryStrideInFeatureChannels)
    }
    unsafe fn secondaryStrideInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInFeatureChannels)
    }
    unsafe fn setSecondaryStrideInFeatureChannels_(
        &self,
        secondaryStrideInFeatureChannels: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInFeatureChannels : secondaryStrideInFeatureChannels)
    }
    unsafe fn minimumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimumValue)
    }
    unsafe fn setMinimumValue_(&self, minimumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimumValue : minimumValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn setMaximumValue_(&self, maximumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaximumValue : maximumValue)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNAdd(pub id);
impl std::ops::Deref for MPSCNNAdd {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNAdd {}
impl MPSCNNAdd {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNAdd").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmetic for MPSCNNAdd {}
impl From<MPSCNNAdd> for MPSCNNArithmetic {
    fn from(child: MPSCNNAdd) -> MPSCNNArithmetic {
        MPSCNNArithmetic(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNArithmetic> for MPSCNNAdd {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmetic) -> Result<MPSCNNAdd, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNAdd").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNAdd(parent.0))
        } else {
            Err("This MPSCNNArithmetic cannot be downcasted to MPSCNNAdd")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNAdd {}
impl IMPSKernel for MPSCNNAdd {}
impl PNSCopying for MPSCNNAdd {}
impl PNSSecureCoding for MPSCNNAdd {}
impl INSObject for MPSCNNAdd {}
impl PNSObject for MPSCNNAdd {}
impl IMPSCNNAdd for MPSCNNAdd {}
pub trait IMPSCNNAdd: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSubtract(pub id);
impl std::ops::Deref for MPSCNNSubtract {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSubtract {}
impl MPSCNNSubtract {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSubtract").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmetic for MPSCNNSubtract {}
impl std::convert::TryFrom<MPSCNNArithmetic> for MPSCNNSubtract {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmetic) -> Result<MPSCNNSubtract, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSubtract").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSubtract(parent.0))
        } else {
            Err("This MPSCNNArithmetic cannot be downcasted to MPSCNNSubtract")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNSubtract {}
impl IMPSKernel for MPSCNNSubtract {}
impl PNSCopying for MPSCNNSubtract {}
impl PNSSecureCoding for MPSCNNSubtract {}
impl INSObject for MPSCNNSubtract {}
impl PNSObject for MPSCNNSubtract {}
impl IMPSCNNSubtract for MPSCNNSubtract {}
pub trait IMPSCNNSubtract: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNMultiply(pub id);
impl std::ops::Deref for MPSCNNMultiply {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNMultiply {}
impl MPSCNNMultiply {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNMultiply").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmetic for MPSCNNMultiply {}
impl std::convert::TryFrom<MPSCNNArithmetic> for MPSCNNMultiply {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmetic) -> Result<MPSCNNMultiply, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNMultiply").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNMultiply(parent.0))
        } else {
            Err("This MPSCNNArithmetic cannot be downcasted to MPSCNNMultiply")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNMultiply {}
impl IMPSKernel for MPSCNNMultiply {}
impl PNSCopying for MPSCNNMultiply {}
impl PNSSecureCoding for MPSCNNMultiply {}
impl INSObject for MPSCNNMultiply {}
impl PNSObject for MPSCNNMultiply {}
impl IMPSCNNMultiply for MPSCNNMultiply {}
pub trait IMPSCNNMultiply: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDivide(pub id);
impl std::ops::Deref for MPSCNNDivide {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDivide {}
impl MPSCNNDivide {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDivide").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmetic for MPSCNNDivide {}
impl std::convert::TryFrom<MPSCNNArithmetic> for MPSCNNDivide {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmetic) -> Result<MPSCNNDivide, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDivide").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDivide(parent.0))
        } else {
            Err("This MPSCNNArithmetic cannot be downcasted to MPSCNNDivide")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNDivide {}
impl IMPSKernel for MPSCNNDivide {}
impl PNSCopying for MPSCNNDivide {}
impl PNSSecureCoding for MPSCNNDivide {}
impl INSObject for MPSCNNDivide {}
impl PNSObject for MPSCNNDivide {}
impl IMPSCNNDivide for MPSCNNDivide {}
pub trait IMPSCNNDivide: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
}
pub type MPSNNComparisonType = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNCompare(pub id);
impl std::ops::Deref for MPSNNCompare {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNCompare {}
impl MPSNNCompare {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNCompare").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmetic for MPSNNCompare {}
impl std::convert::TryFrom<MPSCNNArithmetic> for MPSNNCompare {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmetic) -> Result<MPSNNCompare, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNCompare").unwrap()) };
        if is_kind_of {
            Ok(MPSNNCompare(parent.0))
        } else {
            Err("This MPSCNNArithmetic cannot be downcasted to MPSNNCompare")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNCompare {}
impl IMPSKernel for MPSNNCompare {}
impl PNSCopying for MPSNNCompare {}
impl PNSSecureCoding for MPSNNCompare {}
impl INSObject for MPSNNCompare {}
impl PNSObject for MPSNNCompare {}
impl IMPSNNCompare for MPSNNCompare {}
pub trait IMPSNNCompare: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn comparisonType(&self) -> MPSNNComparisonType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, comparisonType)
    }
    unsafe fn setComparisonType_(&self, comparisonType: MPSNNComparisonType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setComparisonType : comparisonType)
    }
    unsafe fn threshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, threshold)
    }
    unsafe fn setThreshold_(&self, threshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setThreshold : threshold)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNArithmeticGradient(pub id);
impl std::ops::Deref for MPSCNNArithmeticGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNArithmeticGradient {}
impl MPSCNNArithmeticGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNArithmeticGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNArithmeticGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNArithmeticGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNArithmeticGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNArithmeticGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNArithmeticGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNArithmeticGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNArithmeticGradient {}
impl IMPSKernel for MPSCNNArithmeticGradient {}
impl PNSCopying for MPSCNNArithmeticGradient {}
impl PNSSecureCoding for MPSCNNArithmeticGradient {}
impl INSObject for MPSCNNArithmeticGradient {}
impl PNSObject for MPSCNNArithmeticGradient {}
impl IMPSCNNArithmeticGradient for MPSCNNArithmeticGradient {}
pub trait IMPSCNNArithmeticGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_isSecondarySourceFilter_(
        &self,
        device: *mut u64,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, isSecondarySourceFilter : isSecondarySourceFilter)
    }
    unsafe fn primaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryScale)
    }
    unsafe fn setPrimaryScale_(&self, primaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryScale : primaryScale)
    }
    unsafe fn secondaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryScale)
    }
    unsafe fn setSecondaryScale_(&self, secondaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryScale : secondaryScale)
    }
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
    unsafe fn secondaryStrideInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInFeatureChannels)
    }
    unsafe fn setSecondaryStrideInFeatureChannels_(
        &self,
        secondaryStrideInFeatureChannels: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInFeatureChannels : secondaryStrideInFeatureChannels)
    }
    unsafe fn minimumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimumValue)
    }
    unsafe fn setMinimumValue_(&self, minimumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimumValue : minimumValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn setMaximumValue_(&self, maximumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaximumValue : maximumValue)
    }
    unsafe fn isSecondarySourceFilter(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isSecondarySourceFilter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNAddGradient(pub id);
impl std::ops::Deref for MPSCNNAddGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNAddGradient {}
impl MPSCNNAddGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNAddGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmeticGradient for MPSCNNAddGradient {}
impl From<MPSCNNAddGradient> for MPSCNNArithmeticGradient {
    fn from(child: MPSCNNAddGradient) -> MPSCNNArithmeticGradient {
        MPSCNNArithmeticGradient(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNArithmeticGradient> for MPSCNNAddGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmeticGradient) -> Result<MPSCNNAddGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNAddGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNAddGradient(parent.0))
        } else {
            Err("This MPSCNNArithmeticGradient cannot be downcasted to MPSCNNAddGradient")
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNAddGradient {}
impl IMPSCNNBinaryKernel for MPSCNNAddGradient {}
impl IMPSKernel for MPSCNNAddGradient {}
impl PNSCopying for MPSCNNAddGradient {}
impl PNSSecureCoding for MPSCNNAddGradient {}
impl INSObject for MPSCNNAddGradient {}
impl PNSObject for MPSCNNAddGradient {}
impl IMPSCNNAddGradient for MPSCNNAddGradient {}
pub trait IMPSCNNAddGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_isSecondarySourceFilter_(
        &self,
        device: *mut u64,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, isSecondarySourceFilter : isSecondarySourceFilter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSubtractGradient(pub id);
impl std::ops::Deref for MPSCNNSubtractGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSubtractGradient {}
impl MPSCNNSubtractGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSubtractGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmeticGradient for MPSCNNSubtractGradient {}
impl std::convert::TryFrom<MPSCNNArithmeticGradient> for MPSCNNSubtractGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmeticGradient) -> Result<MPSCNNSubtractGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSubtractGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSubtractGradient(parent.0))
        } else {
            Err("This MPSCNNArithmeticGradient cannot be downcasted to MPSCNNSubtractGradient")
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNSubtractGradient {}
impl IMPSCNNBinaryKernel for MPSCNNSubtractGradient {}
impl IMPSKernel for MPSCNNSubtractGradient {}
impl PNSCopying for MPSCNNSubtractGradient {}
impl PNSSecureCoding for MPSCNNSubtractGradient {}
impl INSObject for MPSCNNSubtractGradient {}
impl PNSObject for MPSCNNSubtractGradient {}
impl IMPSCNNSubtractGradient for MPSCNNSubtractGradient {}
pub trait IMPSCNNSubtractGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_isSecondarySourceFilter_(
        &self,
        device: *mut u64,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, isSecondarySourceFilter : isSecondarySourceFilter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNMultiplyGradient(pub id);
impl std::ops::Deref for MPSCNNMultiplyGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNMultiplyGradient {}
impl MPSCNNMultiplyGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNMultiplyGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNArithmeticGradient for MPSCNNMultiplyGradient {}
impl std::convert::TryFrom<MPSCNNArithmeticGradient> for MPSCNNMultiplyGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNArithmeticGradient) -> Result<MPSCNNMultiplyGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNMultiplyGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNMultiplyGradient(parent.0))
        } else {
            Err("This MPSCNNArithmeticGradient cannot be downcasted to MPSCNNMultiplyGradient")
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNMultiplyGradient {}
impl IMPSCNNBinaryKernel for MPSCNNMultiplyGradient {}
impl IMPSKernel for MPSCNNMultiplyGradient {}
impl PNSCopying for MPSCNNMultiplyGradient {}
impl PNSSecureCoding for MPSCNNMultiplyGradient {}
impl INSObject for MPSCNNMultiplyGradient {}
impl PNSObject for MPSCNNMultiplyGradient {}
impl IMPSCNNMultiplyGradient for MPSCNNMultiplyGradient {}
pub trait IMPSCNNMultiplyGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_isSecondarySourceFilter_(
        &self,
        device: *mut u64,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, isSecondarySourceFilter : isSecondarySourceFilter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSoftMax(pub id);
impl std::ops::Deref for MPSCNNSoftMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSoftMax {}
impl MPSCNNSoftMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSoftMax").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNSoftMax {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNSoftMax {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNSoftMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSoftMax").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSoftMax(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNSoftMax")
        }
    }
}
impl IMPSKernel for MPSCNNSoftMax {}
impl PNSCopying for MPSCNNSoftMax {}
impl PNSSecureCoding for MPSCNNSoftMax {}
impl INSObject for MPSCNNSoftMax {}
impl PNSObject for MPSCNNSoftMax {}
impl IMPSCNNSoftMax for MPSCNNSoftMax {}
pub trait IMPSCNNSoftMax: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSoftMaxGradient(pub id);
impl std::ops::Deref for MPSCNNSoftMaxGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSoftMaxGradient {}
impl MPSCNNSoftMaxGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNSoftMaxGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNSoftMaxGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNSoftMaxGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSoftMaxGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNSoftMaxGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNSoftMaxGradient {}
impl IMPSKernel for MPSCNNSoftMaxGradient {}
impl PNSCopying for MPSCNNSoftMaxGradient {}
impl PNSSecureCoding for MPSCNNSoftMaxGradient {}
impl INSObject for MPSCNNSoftMaxGradient {}
impl PNSObject for MPSCNNSoftMaxGradient {}
impl IMPSCNNSoftMaxGradient for MPSCNNSoftMaxGradient {}
pub trait IMPSCNNSoftMaxGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLogSoftMax(pub id);
impl std::ops::Deref for MPSCNNLogSoftMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLogSoftMax {}
impl MPSCNNLogSoftMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMax").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNLogSoftMax {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNLogSoftMax {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNLogSoftMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMax").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLogSoftMax(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNLogSoftMax")
        }
    }
}
impl IMPSKernel for MPSCNNLogSoftMax {}
impl PNSCopying for MPSCNNLogSoftMax {}
impl PNSSecureCoding for MPSCNNLogSoftMax {}
impl INSObject for MPSCNNLogSoftMax {}
impl PNSObject for MPSCNNLogSoftMax {}
impl IMPSCNNLogSoftMax for MPSCNNLogSoftMax {}
pub trait IMPSCNNLogSoftMax: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLogSoftMaxGradient(pub id);
impl std::ops::Deref for MPSCNNLogSoftMaxGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLogSoftMaxGradient {}
impl MPSCNNLogSoftMaxGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNLogSoftMaxGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNLogSoftMaxGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNLogSoftMaxGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLogSoftMaxGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNLogSoftMaxGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNLogSoftMaxGradient {}
impl IMPSKernel for MPSCNNLogSoftMaxGradient {}
impl PNSCopying for MPSCNNLogSoftMaxGradient {}
impl PNSSecureCoding for MPSCNNLogSoftMaxGradient {}
impl INSObject for MPSCNNLogSoftMaxGradient {}
impl PNSObject for MPSCNNLogSoftMaxGradient {}
impl IMPSCNNLogSoftMaxGradient for MPSCNNLogSoftMaxGradient {}
pub trait IMPSCNNLogSoftMaxGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsampling(pub id);
impl std::ops::Deref for MPSCNNUpsampling {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsampling {}
impl MPSCNNUpsampling {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsampling").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNUpsampling {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNUpsampling {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNUpsampling, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsampling").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNUpsampling(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNUpsampling")
        }
    }
}
impl IMPSKernel for MPSCNNUpsampling {}
impl PNSCopying for MPSCNNUpsampling {}
impl PNSSecureCoding for MPSCNNUpsampling {}
impl INSObject for MPSCNNUpsampling {}
impl PNSObject for MPSCNNUpsampling {}
impl IMPSCNNUpsampling for MPSCNNUpsampling {}
pub trait IMPSCNNUpsampling: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn scaleFactorX(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorX)
    }
    unsafe fn scaleFactorY(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorY)
    }
    unsafe fn alignCorners(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alignCorners)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingNearest(pub id);
impl std::ops::Deref for MPSCNNUpsamplingNearest {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingNearest {}
impl MPSCNNUpsamplingNearest {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearest").unwrap(), alloc) })
    }
}
impl IMPSCNNUpsampling for MPSCNNUpsamplingNearest {}
impl From<MPSCNNUpsamplingNearest> for MPSCNNUpsampling {
    fn from(child: MPSCNNUpsamplingNearest) -> MPSCNNUpsampling {
        MPSCNNUpsampling(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNUpsampling> for MPSCNNUpsamplingNearest {
    type Error = &'static str;
    fn try_from(parent: MPSCNNUpsampling) -> Result<MPSCNNUpsamplingNearest, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearest").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNUpsamplingNearest(parent.0))
        } else {
            Err("This MPSCNNUpsampling cannot be downcasted to MPSCNNUpsamplingNearest")
        }
    }
}
impl IMPSCNNKernel for MPSCNNUpsamplingNearest {}
impl IMPSKernel for MPSCNNUpsamplingNearest {}
impl PNSCopying for MPSCNNUpsamplingNearest {}
impl PNSSecureCoding for MPSCNNUpsamplingNearest {}
impl INSObject for MPSCNNUpsamplingNearest {}
impl PNSObject for MPSCNNUpsamplingNearest {}
impl IMPSCNNUpsamplingNearest for MPSCNNUpsamplingNearest {}
pub trait IMPSCNNUpsamplingNearest: Sized + std::ops::Deref {
    unsafe fn initWithDevice_integerScaleFactorX_integerScaleFactorY_(
        &self,
        device: *mut u64,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingBilinear(pub id);
impl std::ops::Deref for MPSCNNUpsamplingBilinear {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingBilinear {}
impl MPSCNNUpsamplingBilinear {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinear").unwrap(), alloc) })
    }
}
impl IMPSCNNUpsampling for MPSCNNUpsamplingBilinear {}
impl std::convert::TryFrom<MPSCNNUpsampling> for MPSCNNUpsamplingBilinear {
    type Error = &'static str;
    fn try_from(parent: MPSCNNUpsampling) -> Result<MPSCNNUpsamplingBilinear, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinear").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNUpsamplingBilinear(parent.0))
        } else {
            Err("This MPSCNNUpsampling cannot be downcasted to MPSCNNUpsamplingBilinear")
        }
    }
}
impl IMPSCNNKernel for MPSCNNUpsamplingBilinear {}
impl IMPSKernel for MPSCNNUpsamplingBilinear {}
impl PNSCopying for MPSCNNUpsamplingBilinear {}
impl PNSSecureCoding for MPSCNNUpsamplingBilinear {}
impl INSObject for MPSCNNUpsamplingBilinear {}
impl PNSObject for MPSCNNUpsamplingBilinear {}
impl IMPSCNNUpsamplingBilinear for MPSCNNUpsamplingBilinear {}
pub trait IMPSCNNUpsamplingBilinear: Sized + std::ops::Deref {
    unsafe fn initWithDevice_integerScaleFactorX_integerScaleFactorY_(
        &self,
        device: *mut u64,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
    unsafe fn initWithDevice_integerScaleFactorX_integerScaleFactorY_alignCorners_(
        &self,
        device: *mut u64,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
        alignCorners: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY, alignCorners : alignCorners)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingGradient(pub id);
impl std::ops::Deref for MPSCNNUpsamplingGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingGradient {}
impl MPSCNNUpsamplingGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNUpsamplingGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNUpsamplingGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNUpsamplingGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNUpsamplingGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNUpsamplingGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNUpsamplingGradient {}
impl IMPSKernel for MPSCNNUpsamplingGradient {}
impl PNSCopying for MPSCNNUpsamplingGradient {}
impl PNSSecureCoding for MPSCNNUpsamplingGradient {}
impl INSObject for MPSCNNUpsamplingGradient {}
impl PNSObject for MPSCNNUpsamplingGradient {}
impl IMPSCNNUpsamplingGradient for MPSCNNUpsamplingGradient {}
pub trait IMPSCNNUpsamplingGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn scaleFactorX(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorX)
    }
    unsafe fn scaleFactorY(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingNearestGradient(pub id);
impl std::ops::Deref for MPSCNNUpsamplingNearestGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingNearestGradient {}
impl MPSCNNUpsamplingNearestGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNUpsamplingGradient for MPSCNNUpsamplingNearestGradient {}
impl From<MPSCNNUpsamplingNearestGradient> for MPSCNNUpsamplingGradient {
    fn from(child: MPSCNNUpsamplingNearestGradient) -> MPSCNNUpsamplingGradient {
        MPSCNNUpsamplingGradient(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNUpsamplingGradient> for MPSCNNUpsamplingNearestGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNUpsamplingGradient,
    ) -> Result<MPSCNNUpsamplingNearestGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNUpsamplingNearestGradient(parent.0))
        } else {
            Err ("This MPSCNNUpsamplingGradient cannot be downcasted to MPSCNNUpsamplingNearestGradient" ,)
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNUpsamplingNearestGradient {}
impl IMPSCNNBinaryKernel for MPSCNNUpsamplingNearestGradient {}
impl IMPSKernel for MPSCNNUpsamplingNearestGradient {}
impl PNSCopying for MPSCNNUpsamplingNearestGradient {}
impl PNSSecureCoding for MPSCNNUpsamplingNearestGradient {}
impl INSObject for MPSCNNUpsamplingNearestGradient {}
impl PNSObject for MPSCNNUpsamplingNearestGradient {}
impl IMPSCNNUpsamplingNearestGradient for MPSCNNUpsamplingNearestGradient {}
pub trait IMPSCNNUpsamplingNearestGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_integerScaleFactorX_integerScaleFactorY_(
        &self,
        device: *mut u64,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingBilinearGradient(pub id);
impl std::ops::Deref for MPSCNNUpsamplingBilinearGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingBilinearGradient {}
impl MPSCNNUpsamplingBilinearGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNUpsamplingGradient for MPSCNNUpsamplingBilinearGradient {}
impl std::convert::TryFrom<MPSCNNUpsamplingGradient> for MPSCNNUpsamplingBilinearGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNUpsamplingGradient,
    ) -> Result<MPSCNNUpsamplingBilinearGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNUpsamplingBilinearGradient(parent.0))
        } else {
            Err ("This MPSCNNUpsamplingGradient cannot be downcasted to MPSCNNUpsamplingBilinearGradient" ,)
        }
    }
}
impl IMPSCNNGradientKernel for MPSCNNUpsamplingBilinearGradient {}
impl IMPSCNNBinaryKernel for MPSCNNUpsamplingBilinearGradient {}
impl IMPSKernel for MPSCNNUpsamplingBilinearGradient {}
impl PNSCopying for MPSCNNUpsamplingBilinearGradient {}
impl PNSSecureCoding for MPSCNNUpsamplingBilinearGradient {}
impl INSObject for MPSCNNUpsamplingBilinearGradient {}
impl PNSObject for MPSCNNUpsamplingBilinearGradient {}
impl IMPSCNNUpsamplingBilinearGradient for MPSCNNUpsamplingBilinearGradient {}
pub trait IMPSCNNUpsamplingBilinearGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_integerScaleFactorX_integerScaleFactorY_(
        &self,
        device: *mut u64,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNormalizationGammaAndBetaState(pub id);
impl std::ops::Deref for MPSCNNNormalizationGammaAndBetaState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNormalizationGammaAndBetaState {}
impl MPSCNNNormalizationGammaAndBetaState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNormalizationGammaAndBetaState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSCNNNormalizationGammaAndBetaState {}
impl std::convert::TryFrom<MPSState> for MPSCNNNormalizationGammaAndBetaState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSCNNNormalizationGammaAndBetaState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNormalizationGammaAndBetaState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNNormalizationGammaAndBetaState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSCNNNormalizationGammaAndBetaState")
        }
    }
}
impl INSObject for MPSCNNNormalizationGammaAndBetaState {}
impl PNSObject for MPSCNNNormalizationGammaAndBetaState {}
impl IMPSCNNNormalizationGammaAndBetaState for MPSCNNNormalizationGammaAndBetaState {}
pub trait IMPSCNNNormalizationGammaAndBetaState: Sized + std::ops::Deref {
    unsafe fn initWithGamma_beta_(&self, gamma: *mut u64, beta: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithGamma : gamma, beta : beta)
    }
    unsafe fn gamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn temporaryStateWithCommandBuffer_numberOfFeatureChannels_(
        commandBuffer: *mut u64,
        numberOfFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNormalizationGammaAndBetaState").unwrap(), temporaryStateWithCommandBuffer : commandBuffer, numberOfFeatureChannels : numberOfFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalizationState(pub id);
impl std::ops::Deref for MPSCNNBatchNormalizationState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalizationState {}
impl MPSCNNBatchNormalizationState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationState").unwrap(), alloc) })
    }
}
impl IMPSNNGradientState for MPSCNNBatchNormalizationState {}
impl std::convert::TryFrom<MPSNNGradientState> for MPSCNNBatchNormalizationState {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientState) -> Result<MPSCNNBatchNormalizationState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNBatchNormalizationState(parent.0))
        } else {
            Err("This MPSNNGradientState cannot be downcasted to MPSCNNBatchNormalizationState")
        }
    }
}
impl IMPSState for MPSCNNBatchNormalizationState {}
impl INSObject for MPSCNNBatchNormalizationState {}
impl PNSObject for MPSCNNBatchNormalizationState {}
impl IMPSCNNBatchNormalizationState for MPSCNNBatchNormalizationState {}
pub trait IMPSCNNBatchNormalizationState: Sized + std::ops::Deref {
    unsafe fn initWithResource_(&self, resource: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithResource : resource)
    }
    unsafe fn reset(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reset)
    }
    unsafe fn gamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn mean(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mean)
    }
    unsafe fn variance(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, variance)
    }
    unsafe fn gradientForGamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForGamma)
    }
    unsafe fn gradientForBeta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForBeta)
    }
    unsafe fn batchNormalization(&self) -> MPSCNNBatchNormalization
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, batchNormalization)
    }
    unsafe fn temporaryStateWithCommandBuffer_bufferSize_(
        cmdBuf: *mut u64,
        bufferSize: usize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, bufferSize : bufferSize)
    }
    unsafe fn temporaryStateWithCommandBuffer_textureDescriptor_(
        cmdBuf: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, textureDescriptor : descriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNormalizationMeanAndVarianceState(pub id);
impl std::ops::Deref for MPSCNNNormalizationMeanAndVarianceState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNormalizationMeanAndVarianceState {}
impl MPSCNNNormalizationMeanAndVarianceState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNormalizationMeanAndVarianceState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSCNNNormalizationMeanAndVarianceState {}
impl std::convert::TryFrom<MPSState> for MPSCNNNormalizationMeanAndVarianceState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSCNNNormalizationMeanAndVarianceState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNormalizationMeanAndVarianceState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNNormalizationMeanAndVarianceState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSCNNNormalizationMeanAndVarianceState")
        }
    }
}
impl INSObject for MPSCNNNormalizationMeanAndVarianceState {}
impl PNSObject for MPSCNNNormalizationMeanAndVarianceState {}
impl IMPSCNNNormalizationMeanAndVarianceState for MPSCNNNormalizationMeanAndVarianceState {}
pub trait IMPSCNNNormalizationMeanAndVarianceState: Sized + std::ops::Deref {
    unsafe fn initWithMean_variance_(&self, mean: *mut u64, variance: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithMean : mean, variance : variance)
    }
    unsafe fn mean(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mean)
    }
    unsafe fn variance(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, variance)
    }
    unsafe fn temporaryStateWithCommandBuffer_numberOfFeatureChannels_(
        commandBuffer: *mut u64,
        numberOfFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNormalizationMeanAndVarianceState").unwrap(), temporaryStateWithCommandBuffer : commandBuffer, numberOfFeatureChannels : numberOfFeatureChannels)
    }
}
pub trait PMPSCNNBatchNormalizationDataSource: Sized + std::ops::Deref {
    unsafe fn numberOfFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfFeatureChannels)
    }
    unsafe fn gamma(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn mean(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, mean)
    }
    unsafe fn variance(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, variance)
    }
    unsafe fn load(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, load)
    }
    unsafe fn purge(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, purge)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn updateGammaAndBetaWithCommandBuffer_batchNormalizationState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) -> MPSCNNNormalizationGammaAndBetaState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateGammaAndBetaWithCommandBuffer : commandBuffer, batchNormalizationState : batchNormalizationState)
    }
    unsafe fn updateMeanAndVarianceWithCommandBuffer_batchNormalizationState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) -> MPSCNNNormalizationMeanAndVarianceState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateMeanAndVarianceWithCommandBuffer : commandBuffer, batchNormalizationState : batchNormalizationState)
    }
    unsafe fn updateGammaAndBetaWithBatchNormalizationState_(
        &self,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateGammaAndBetaWithBatchNormalizationState : batchNormalizationState)
    }
    unsafe fn updateMeanAndVarianceWithBatchNormalizationState_(
        &self,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateMeanAndVarianceWithBatchNormalizationState : batchNormalizationState)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn encodeWithCoder_(&self, aCoder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : aCoder)
    }
    unsafe fn initWithCoder_(&self, aDecoder: NSCoder) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn supportsSecureCoding() -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationDataSource").unwrap(), supportsSecureCoding)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalization(pub id);
impl std::ops::Deref for MPSCNNBatchNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalization {}
impl MPSCNNBatchNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalization").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNBatchNormalization {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNBatchNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNBatchNormalization, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalization").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNBatchNormalization(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNBatchNormalization")
        }
    }
}
impl IMPSKernel for MPSCNNBatchNormalization {}
impl PNSCopying for MPSCNNBatchNormalization {}
impl PNSSecureCoding for MPSCNNBatchNormalization {}
impl INSObject for MPSCNNBatchNormalization {}
impl PNSObject for MPSCNNBatchNormalization {}
impl IMPSCNNBatchNormalization for MPSCNNBatchNormalization {}
pub trait IMPSCNNBatchNormalization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_dataSource_(
        &self,
        device: *mut u64,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, dataSource : dataSource)
    }
    unsafe fn initWithDevice_dataSource_fusedNeuronDescriptor_(
        &self,
        device: *mut u64,
        dataSource: *mut u64,
        fusedNeuronDescriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, dataSource : dataSource, fusedNeuronDescriptor : fusedNeuronDescriptor)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_batchNormalizationState_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, batchNormalizationState : batchNormalizationState, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_batchNormalizationState_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, batchNormalizationState : batchNormalizationState, destinationImages : destinationImages)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationState_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        destinationState: MPSState,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationState : destinationState, destinationImage : destinationImage)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationState_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        outState: *mut MPSState,
        isTemporary: BOOL,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationState : outState, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationStates_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationStates: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationStates : destinationStates, destinationImages : destinationImages)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationStates_destinationStateIsTemporary_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        outStates: *mut *mut MPSStateBatch,
        isTemporary: BOOL,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationStates : outStates, destinationStateIsTemporary : isTemporary)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNBatchNormalizationState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNBatchNormalizationState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn reloadDataSource_(&self, dataSource: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadDataSource : dataSource)
    }
    unsafe fn reloadGammaAndBetaFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadGammaAndBetaFromDataSource)
    }
    unsafe fn reloadMeanAndVarianceFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadMeanAndVarianceFromDataSource)
    }
    unsafe fn reloadGammaAndBetaWithCommandBuffer_gammaAndBetaState_(
        &self,
        commandBuffer: *mut u64,
        gammaAndBetaState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadGammaAndBetaWithCommandBuffer : commandBuffer, gammaAndBetaState : gammaAndBetaState)
    }
    unsafe fn reloadMeanAndVarianceWithCommandBuffer_meanAndVarianceState_(
        &self,
        commandBuffer: *mut u64,
        meanAndVarianceState: MPSCNNNormalizationMeanAndVarianceState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadMeanAndVarianceWithCommandBuffer : commandBuffer, meanAndVarianceState : meanAndVarianceState)
    }
    unsafe fn numberOfFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfFeatureChannels)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalizationStatistics(pub id);
impl std::ops::Deref for MPSCNNBatchNormalizationStatistics {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalizationStatistics {}
impl MPSCNNBatchNormalizationStatistics {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationStatistics").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNBatchNormalizationStatistics {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNBatchNormalizationStatistics {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNBatchNormalizationStatistics, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationStatistics").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNBatchNormalizationStatistics(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNBatchNormalizationStatistics")
        }
    }
}
impl IMPSKernel for MPSCNNBatchNormalizationStatistics {}
impl PNSCopying for MPSCNNBatchNormalizationStatistics {}
impl PNSSecureCoding for MPSCNNBatchNormalizationStatistics {}
impl INSObject for MPSCNNBatchNormalizationStatistics {}
impl PNSObject for MPSCNNBatchNormalizationStatistics {}
impl IMPSCNNBatchNormalizationStatistics for MPSCNNBatchNormalizationStatistics {}
pub trait IMPSCNNBatchNormalizationStatistics: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_batchNormalizationState_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, batchNormalizationState : batchNormalizationState)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationImages : destinationImages)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationImage : destinationImage)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalizationGradient(pub id);
impl std::ops::Deref for MPSCNNBatchNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalizationGradient {}
impl MPSCNNBatchNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNBatchNormalizationGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNBatchNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNBatchNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNBatchNormalizationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNBatchNormalizationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNBatchNormalizationGradient {}
impl IMPSKernel for MPSCNNBatchNormalizationGradient {}
impl PNSCopying for MPSCNNBatchNormalizationGradient {}
impl PNSSecureCoding for MPSCNNBatchNormalizationGradient {}
impl INSObject for MPSCNNBatchNormalizationGradient {}
impl PNSObject for MPSCNNBatchNormalizationGradient {}
impl IMPSCNNBatchNormalizationGradient for MPSCNNBatchNormalizationGradient {}
pub trait IMPSCNNBatchNormalizationGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_fusedNeuronDescriptor_(
        &self,
        device: *mut u64,
        fusedNeuronDescriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, fusedNeuronDescriptor : fusedNeuronDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceGradient_sourceImage_batchNormalizationState_destinationGradient_(
        &self,
        commandBuffer: *mut u64,
        sourceGradient: MPSImage,
        sourceImage: MPSImage,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        destinationGradient: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceGradient : sourceGradient, sourceImage : sourceImage, batchNormalizationState : batchNormalizationState, destinationGradient : destinationGradient)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_batchNormalizationState_destinationGradients_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        destinationGradients: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, batchNormalizationState : batchNormalizationState, destinationGradients : destinationGradients)
    }
    unsafe fn encodeToCommandBuffer_sourceGradient_sourceImage_batchNormalizationState_(
        &self,
        commandBuffer: *mut u64,
        sourceGradient: MPSImage,
        sourceImage: MPSImage,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceGradient : sourceGradient, sourceImage : sourceImage, batchNormalizationState : batchNormalizationState)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_batchNormalizationState_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, batchNormalizationState : batchNormalizationState)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
        destinationImage: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage, destinationImage : destinationImage)
    }
    unsafe fn encodeBatchToCommandBuffer_primaryImages_secondaryImages_destinationImages_(
        &self,
        commandBuffer: *mut u64,
        primaryImages: NSArray,
        secondaryImages: NSArray,
        destinationImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, primaryImages : primaryImages, secondaryImages : secondaryImages, destinationImages : destinationImages)
    }
    unsafe fn encodeToCommandBuffer_primaryImage_secondaryImage_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: MPSImage,
        secondaryImage: MPSImage,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, primaryImage : primaryImage, secondaryImage : secondaryImage)
    }
    unsafe fn encodeBatchToCommandBuffer_primaryImages_secondaryImages_(
        &self,
        commandBuffer: *mut u64,
        primaryImage: NSArray,
        secondaryImage: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, primaryImages : primaryImage, secondaryImages : secondaryImage)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalizationStatisticsGradient(pub id);
impl std::ops::Deref for MPSCNNBatchNormalizationStatisticsGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalizationStatisticsGradient {}
impl MPSCNNBatchNormalizationStatisticsGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationStatisticsGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNBatchNormalizationStatisticsGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNBatchNormalizationStatisticsGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNBatchNormalizationStatisticsGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationStatisticsGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNBatchNormalizationStatisticsGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNBatchNormalizationStatisticsGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNBatchNormalizationStatisticsGradient {}
impl IMPSKernel for MPSCNNBatchNormalizationStatisticsGradient {}
impl PNSCopying for MPSCNNBatchNormalizationStatisticsGradient {}
impl PNSSecureCoding for MPSCNNBatchNormalizationStatisticsGradient {}
impl INSObject for MPSCNNBatchNormalizationStatisticsGradient {}
impl PNSObject for MPSCNNBatchNormalizationStatisticsGradient {}
impl IMPSCNNBatchNormalizationStatisticsGradient for MPSCNNBatchNormalizationStatisticsGradient {}
pub trait IMPSCNNBatchNormalizationStatisticsGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_fusedNeuronDescriptor_(
        &self,
        device: *mut u64,
        fusedNeuronDescriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, fusedNeuronDescriptor : fusedNeuronDescriptor)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_batchNormalizationState_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        batchNormalizationState: MPSCNNBatchNormalizationState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, batchNormalizationState : batchNormalizationState)
    }
    unsafe fn encodeToCommandBuffer_sourceGradient_sourceImage_gradientState_(
        &self,
        commandBuffer: *mut u64,
        sourceGradient: MPSImage,
        sourceImage: MPSImage,
        gradientState: MPSState,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn encodeToCommandBuffer_sourceGradient_sourceImage_gradientState_destinationGradient_(
        &self,
        commandBuffer: *mut u64,
        sourceGradient: MPSImage,
        sourceImage: MPSImage,
        gradientState: MPSState,
        destinationGradient: MPSImage,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, destinationGradient : destinationGradient)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_gradientStates_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        gradientStates: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, gradientStates : gradientStates)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceGradients_sourceImages_gradientStates_destinationGradients_(
        &self,
        commandBuffer: *mut u64,
        sourceGradients: NSArray,
        sourceImages: NSArray,
        gradientStates: NSArray,
        destinationGradients: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceGradients : sourceGradients, sourceImages : sourceImages, gradientStates : gradientStates, destinationGradients : destinationGradients)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNInstanceNormalizationGradientState(pub id);
impl std::ops::Deref for MPSCNNInstanceNormalizationGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNInstanceNormalizationGradientState {}
impl MPSCNNInstanceNormalizationGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientState").unwrap(), alloc) })
    }
}
impl IMPSNNGradientState for MPSCNNInstanceNormalizationGradientState {}
impl std::convert::TryFrom<MPSNNGradientState> for MPSCNNInstanceNormalizationGradientState {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientState,
    ) -> Result<MPSCNNInstanceNormalizationGradientState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNInstanceNormalizationGradientState(parent.0))
        } else {
            Err ("This MPSNNGradientState cannot be downcasted to MPSCNNInstanceNormalizationGradientState" ,)
        }
    }
}
impl IMPSState for MPSCNNInstanceNormalizationGradientState {}
impl INSObject for MPSCNNInstanceNormalizationGradientState {}
impl PNSObject for MPSCNNInstanceNormalizationGradientState {}
impl IMPSCNNInstanceNormalizationGradientState for MPSCNNInstanceNormalizationGradientState {}
pub trait IMPSCNNInstanceNormalizationGradientState: Sized + std::ops::Deref {
    unsafe fn initWithDevice_textureDescriptor_(
        &self,
        device: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, textureDescriptor : descriptor)
    }
    unsafe fn initWithResource_(&self, resource: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithResource : resource)
    }
    unsafe fn initWithDevice_bufferSize_(&self, device: *mut u64, bufferSize: usize) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, bufferSize : bufferSize)
    }
    unsafe fn instanceNormalization(&self) -> MPSCNNInstanceNormalization
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, instanceNormalization)
    }
    unsafe fn gamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn gradientForGamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForGamma)
    }
    unsafe fn gradientForBeta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForBeta)
    }
    unsafe fn temporaryStateWithCommandBuffer_textureDescriptor_(
        cmdBuf: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, textureDescriptor : descriptor)
    }
    unsafe fn temporaryStateWithCommandBuffer_(cmdBuf: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf)
    }
    unsafe fn temporaryStateWithCommandBuffer_bufferSize_(
        cmdBuf: *mut u64,
        bufferSize: usize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, bufferSize : bufferSize)
    }
}
pub trait PMPSCNNInstanceNormalizationDataSource: Sized + std::ops::Deref {
    unsafe fn gamma(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn updateGammaAndBetaWithCommandBuffer_instanceNormalizationStateBatch_(
        &self,
        commandBuffer: *mut u64,
        instanceNormalizationStateBatch: NSArray,
    ) -> MPSCNNNormalizationGammaAndBetaState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateGammaAndBetaWithCommandBuffer : commandBuffer, instanceNormalizationStateBatch : instanceNormalizationStateBatch)
    }
    unsafe fn updateGammaAndBetaWithInstanceNormalizationStateBatch_(
        &self,
        instanceNormalizationStateBatch: NSArray,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateGammaAndBetaWithInstanceNormalizationStateBatch : instanceNormalizationStateBatch)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn encodeWithCoder_(&self, aCoder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : aCoder)
    }
    unsafe fn initWithCoder_(&self, aDecoder: NSCoder) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn load(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, load)
    }
    unsafe fn purge(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, purge)
    }
    unsafe fn numberOfFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfFeatureChannels)
    }
    unsafe fn supportsSecureCoding() -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationDataSource").unwrap(), supportsSecureCoding)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNInstanceNormalization(pub id);
impl std::ops::Deref for MPSCNNInstanceNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNInstanceNormalization {}
impl MPSCNNInstanceNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalization").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNInstanceNormalization {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNInstanceNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNInstanceNormalization, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalization").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNInstanceNormalization(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNInstanceNormalization")
        }
    }
}
impl IMPSKernel for MPSCNNInstanceNormalization {}
impl PNSCopying for MPSCNNInstanceNormalization {}
impl PNSSecureCoding for MPSCNNInstanceNormalization {}
impl INSObject for MPSCNNInstanceNormalization {}
impl PNSObject for MPSCNNInstanceNormalization {}
impl IMPSCNNInstanceNormalization for MPSCNNInstanceNormalization {}
pub trait IMPSCNNInstanceNormalization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_dataSource_(
        &self,
        device: *mut u64,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, dataSource : dataSource)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn reloadDataSource_(&self, dataSource: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadDataSource : dataSource)
    }
    unsafe fn reloadGammaAndBetaFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadGammaAndBetaFromDataSource)
    }
    unsafe fn reloadGammaAndBetaWithCommandBuffer_gammaAndBetaState_(
        &self,
        commandBuffer: *mut u64,
        gammaAndBetaState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadGammaAndBetaWithCommandBuffer : commandBuffer, gammaAndBetaState : gammaAndBetaState)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNInstanceNormalizationGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNInstanceNormalizationGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNInstanceNormalizationGradient(pub id);
impl std::ops::Deref for MPSCNNInstanceNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNInstanceNormalizationGradient {}
impl MPSCNNInstanceNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNInstanceNormalizationGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNInstanceNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNInstanceNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNInstanceNormalizationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNInstanceNormalizationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNInstanceNormalizationGradient {}
impl IMPSKernel for MPSCNNInstanceNormalizationGradient {}
impl PNSCopying for MPSCNNInstanceNormalizationGradient {}
impl PNSSecureCoding for MPSCNNInstanceNormalizationGradient {}
impl INSObject for MPSCNNInstanceNormalizationGradient {}
impl PNSObject for MPSCNNInstanceNormalizationGradient {}
impl IMPSCNNInstanceNormalizationGradient for MPSCNNInstanceNormalizationGradient {}
pub trait IMPSCNNInstanceNormalizationGradient: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNGroupNormalizationGradientState(pub id);
impl std::ops::Deref for MPSCNNGroupNormalizationGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNGroupNormalizationGradientState {}
impl MPSCNNGroupNormalizationGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientState").unwrap(), alloc) })
    }
}
impl IMPSNNGradientState for MPSCNNGroupNormalizationGradientState {}
impl std::convert::TryFrom<MPSNNGradientState> for MPSCNNGroupNormalizationGradientState {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientState,
    ) -> Result<MPSCNNGroupNormalizationGradientState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientState").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNGroupNormalizationGradientState(parent.0))
        } else {
            Err ("This MPSNNGradientState cannot be downcasted to MPSCNNGroupNormalizationGradientState" ,)
        }
    }
}
impl IMPSState for MPSCNNGroupNormalizationGradientState {}
impl INSObject for MPSCNNGroupNormalizationGradientState {}
impl PNSObject for MPSCNNGroupNormalizationGradientState {}
impl IMPSCNNGroupNormalizationGradientState for MPSCNNGroupNormalizationGradientState {}
pub trait IMPSCNNGroupNormalizationGradientState: Sized + std::ops::Deref {
    unsafe fn initWithDevice_textureDescriptor_(
        &self,
        device: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, textureDescriptor : descriptor)
    }
    unsafe fn initWithResource_(&self, resource: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithResource : resource)
    }
    unsafe fn initWithDevice_bufferSize_(&self, device: *mut u64, bufferSize: usize) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, bufferSize : bufferSize)
    }
    unsafe fn groupNormalization(&self) -> MPSCNNGroupNormalization
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, groupNormalization)
    }
    unsafe fn gamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn gradientForGamma(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForGamma)
    }
    unsafe fn gradientForBeta(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientForBeta)
    }
    unsafe fn temporaryStateWithCommandBuffer_textureDescriptor_(
        cmdBuf: *mut u64,
        descriptor: MTLTextureDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, textureDescriptor : descriptor)
    }
    unsafe fn temporaryStateWithCommandBuffer_(cmdBuf: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf)
    }
    unsafe fn temporaryStateWithCommandBuffer_bufferSize_(
        cmdBuf: *mut u64,
        bufferSize: usize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientState").unwrap(), temporaryStateWithCommandBuffer : cmdBuf, bufferSize : bufferSize)
    }
}
pub trait PMPSCNNGroupNormalizationDataSource: Sized + std::ops::Deref {
    unsafe fn gamma(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gamma)
    }
    unsafe fn beta(&self) -> *mut f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn updateGammaAndBetaWithCommandBuffer_groupNormalizationStateBatch_(
        &self,
        commandBuffer: *mut u64,
        groupNormalizationStateBatch: NSArray,
    ) -> MPSCNNNormalizationGammaAndBetaState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateGammaAndBetaWithCommandBuffer : commandBuffer, groupNormalizationStateBatch : groupNormalizationStateBatch)
    }
    unsafe fn updateGammaAndBetaWithGroupNormalizationStateBatch_(
        &self,
        groupNormalizationStateBatch: NSArray,
    ) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, updateGammaAndBetaWithGroupNormalizationStateBatch : groupNormalizationStateBatch)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn encodeWithCoder_(&self, aCoder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : aCoder)
    }
    unsafe fn initWithCoder_(&self, aDecoder: NSCoder) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn numberOfFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfFeatureChannels)
    }
    unsafe fn numberOfGroups(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfGroups)
    }
    unsafe fn setNumberOfGroups_(&self, numberOfGroups: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNumberOfGroups : numberOfGroups)
    }
    unsafe fn supportsSecureCoding() -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationDataSource").unwrap(), supportsSecureCoding)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNGroupNormalization(pub id);
impl std::ops::Deref for MPSCNNGroupNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNGroupNormalization {}
impl MPSCNNGroupNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalization").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNGroupNormalization {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNGroupNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNGroupNormalization, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalization").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNGroupNormalization(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNGroupNormalization")
        }
    }
}
impl IMPSKernel for MPSCNNGroupNormalization {}
impl PNSCopying for MPSCNNGroupNormalization {}
impl PNSSecureCoding for MPSCNNGroupNormalization {}
impl INSObject for MPSCNNGroupNormalization {}
impl PNSObject for MPSCNNGroupNormalization {}
impl IMPSCNNGroupNormalization for MPSCNNGroupNormalization {}
pub trait IMPSCNNGroupNormalization: Sized + std::ops::Deref {
    unsafe fn initWithDevice_dataSource_(
        &self,
        device: *mut u64,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, dataSource : dataSource)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn reloadGammaAndBetaFromDataSource(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadGammaAndBetaFromDataSource)
    }
    unsafe fn reloadGammaAndBetaWithCommandBuffer_gammaAndBetaState_(
        &self,
        commandBuffer: *mut u64,
        gammaAndBetaState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reloadGammaAndBetaWithCommandBuffer : commandBuffer, gammaAndBetaState : gammaAndBetaState)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNGroupNormalizationGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNGroupNormalizationGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn dataSource(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNGroupNormalizationGradient(pub id);
impl std::ops::Deref for MPSCNNGroupNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNGroupNormalizationGradient {}
impl MPSCNNGroupNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNGroupNormalizationGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNGroupNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNGradientKernel,
    ) -> Result<MPSCNNGroupNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNGroupNormalizationGradient(parent.0))
        } else {
            Err ("This MPSCNNGradientKernel cannot be downcasted to MPSCNNGroupNormalizationGradient" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNGroupNormalizationGradient {}
impl IMPSKernel for MPSCNNGroupNormalizationGradient {}
impl PNSCopying for MPSCNNGroupNormalizationGradient {}
impl PNSSecureCoding for MPSCNNGroupNormalizationGradient {}
impl INSObject for MPSCNNGroupNormalizationGradient {}
impl PNSObject for MPSCNNGroupNormalizationGradient {}
impl IMPSCNNGroupNormalizationGradient for MPSCNNGroupNormalizationGradient {}
pub trait IMPSCNNGroupNormalizationGradient: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDropoutGradientState(pub id);
impl std::ops::Deref for MPSCNNDropoutGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDropoutGradientState {}
impl MPSCNNDropoutGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradientState").unwrap(), alloc) })
    }
}
impl IMPSNNGradientState for MPSCNNDropoutGradientState {}
impl std::convert::TryFrom<MPSNNGradientState> for MPSCNNDropoutGradientState {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientState) -> Result<MPSCNNDropoutGradientState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradientState").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDropoutGradientState(parent.0))
        } else {
            Err("This MPSNNGradientState cannot be downcasted to MPSCNNDropoutGradientState")
        }
    }
}
impl IMPSState for MPSCNNDropoutGradientState {}
impl INSObject for MPSCNNDropoutGradientState {}
impl PNSObject for MPSCNNDropoutGradientState {}
impl IMPSCNNDropoutGradientState for MPSCNNDropoutGradientState {}
pub trait IMPSCNNDropoutGradientState: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn maskData(&self) -> NSData
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskData)
    }
}
pub type MPSCNNDropoutGradientStateBatch = NSArray;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDropout(pub id);
impl std::ops::Deref for MPSCNNDropout {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDropout {}
impl MPSCNNDropout {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropout").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSCNNDropout {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSCNNDropout {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSCNNDropout, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDropout").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDropout(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSCNNDropout")
        }
    }
}
impl IMPSKernel for MPSCNNDropout {}
impl PNSCopying for MPSCNNDropout {}
impl PNSSecureCoding for MPSCNNDropout {}
impl INSObject for MPSCNNDropout {}
impl PNSObject for MPSCNNDropout {}
impl IMPSCNNDropout for MPSCNNDropout {}
pub trait IMPSCNNDropout: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_keepProbability_seed_maskStrideInPixels_(
        &self,
        device: *mut u64,
        keepProbability: f32,
        seed: NSUInteger,
        maskStrideInPixels: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, keepProbability : keepProbability, seed : seed, maskStrideInPixels : maskStrideInPixels)
    }
    unsafe fn resultStateForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNDropoutGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn resultStateBatchForSourceImage_sourceStates_destinationImage_(
        &self,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> MPSCNNDropoutGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateBatchForSourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        sourceStates: NSArray,
        destinationImage: MPSImage,
    ) -> MPSCNNDropoutGradientState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn temporaryResultStateBatchForCommandBuffer_sourceImage_sourceStates_destinationImage_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: NSArray,
        sourceStates: NSArray,
        destinationImage: NSArray,
    ) -> *mut MPSCNNDropoutGradientStateBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, temporaryResultStateBatchForCommandBuffer : commandBuffer, sourceImage : sourceImage, sourceStates : sourceStates, destinationImage : destinationImage)
    }
    unsafe fn keepProbability(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, keepProbability)
    }
    unsafe fn seed(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, seed)
    }
    unsafe fn maskStrideInPixels(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskStrideInPixels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDropoutGradient(pub id);
impl std::ops::Deref for MPSCNNDropoutGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDropoutGradient {}
impl MPSCNNDropoutGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSCNNDropoutGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSCNNDropoutGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSCNNDropoutGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDropoutGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSCNNDropoutGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSCNNDropoutGradient {}
impl IMPSKernel for MPSCNNDropoutGradient {}
impl PNSCopying for MPSCNNDropoutGradient {}
impl PNSSecureCoding for MPSCNNDropoutGradient {}
impl INSObject for MPSCNNDropoutGradient {}
impl PNSObject for MPSCNNDropoutGradient {}
impl IMPSCNNDropoutGradient for MPSCNNDropoutGradient {}
pub trait IMPSCNNDropoutGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_keepProbability_seed_maskStrideInPixels_(
        &self,
        device: *mut u64,
        keepProbability: f32,
        seed: NSUInteger,
        maskStrideInPixels: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, keepProbability : keepProbability, seed : seed, maskStrideInPixels : maskStrideInPixels)
    }
    unsafe fn keepProbability(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, keepProbability)
    }
    unsafe fn seed(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, seed)
    }
    unsafe fn maskStrideInPixels(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskStrideInPixels)
    }
}
pub type MPSRNNSequenceDirection = NSUInteger;
pub type MPSRNNBidirectionalCombineMode = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNDescriptor(pub id);
impl std::ops::Deref for MPSRNNDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNDescriptor {}
impl MPSRNNDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNDescriptor").unwrap(), alloc) })
    }
}
impl INSObject for MPSRNNDescriptor {}
impl PNSObject for MPSRNNDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSRNNDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSRNNDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSRNNDescriptor")
        }
    }
}
impl IMPSRNNDescriptor for MPSRNNDescriptor {}
pub trait IMPSRNNDescriptor: Sized + std::ops::Deref {
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn setInputFeatureChannels_(&self, inputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputFeatureChannels : inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn setOutputFeatureChannels_(&self, outputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputFeatureChannels : outputFeatureChannels)
    }
    unsafe fn useLayerInputUnitTransformMode(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, useLayerInputUnitTransformMode)
    }
    unsafe fn setUseLayerInputUnitTransformMode_(&self, useLayerInputUnitTransformMode: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setUseLayerInputUnitTransformMode : useLayerInputUnitTransformMode)
    }
    unsafe fn useFloat32Weights(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, useFloat32Weights)
    }
    unsafe fn setUseFloat32Weights_(&self, useFloat32Weights: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setUseFloat32Weights : useFloat32Weights)
    }
    unsafe fn layerSequenceDirection(&self) -> MPSRNNSequenceDirection
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, layerSequenceDirection)
    }
    unsafe fn setLayerSequenceDirection_(&self, layerSequenceDirection: MPSRNNSequenceDirection)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLayerSequenceDirection : layerSequenceDirection)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNSingleGateDescriptor(pub id);
impl std::ops::Deref for MPSRNNSingleGateDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNSingleGateDescriptor {}
impl MPSRNNSingleGateDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNSingleGateDescriptor").unwrap(), alloc) })
    }
}
impl IMPSRNNDescriptor for MPSRNNSingleGateDescriptor {}
impl From<MPSRNNSingleGateDescriptor> for MPSRNNDescriptor {
    fn from(child: MPSRNNSingleGateDescriptor) -> MPSRNNDescriptor {
        MPSRNNDescriptor(child.0)
    }
}
impl std::convert::TryFrom<MPSRNNDescriptor> for MPSRNNSingleGateDescriptor {
    type Error = &'static str;
    fn try_from(parent: MPSRNNDescriptor) -> Result<MPSRNNSingleGateDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNSingleGateDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNSingleGateDescriptor(parent.0))
        } else {
            Err("This MPSRNNDescriptor cannot be downcasted to MPSRNNSingleGateDescriptor")
        }
    }
}
impl INSObject for MPSRNNSingleGateDescriptor {}
impl PNSObject for MPSRNNSingleGateDescriptor {}
impl IMPSRNNSingleGateDescriptor for MPSRNNSingleGateDescriptor {}
pub trait IMPSRNNSingleGateDescriptor: Sized + std::ops::Deref {
    unsafe fn inputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputWeights)
    }
    unsafe fn setInputWeights_(&self, inputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputWeights : inputWeights)
    }
    unsafe fn recurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, recurrentWeights)
    }
    unsafe fn setRecurrentWeights_(&self, recurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRecurrentWeights : recurrentWeights)
    }
    unsafe fn createRNNSingleGateDescriptorWithInputFeatureChannels_outputFeatureChannels_(
        inputFeatureChannels: NSUInteger,
        outputFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNSingleGateDescriptor").unwrap(), createRNNSingleGateDescriptorWithInputFeatureChannels : inputFeatureChannels, outputFeatureChannels : outputFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSGRUDescriptor(pub id);
impl std::ops::Deref for MPSGRUDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSGRUDescriptor {}
impl MPSGRUDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSGRUDescriptor").unwrap(), alloc) })
    }
}
impl IMPSRNNDescriptor for MPSGRUDescriptor {}
impl std::convert::TryFrom<MPSRNNDescriptor> for MPSGRUDescriptor {
    type Error = &'static str;
    fn try_from(parent: MPSRNNDescriptor) -> Result<MPSGRUDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSGRUDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSGRUDescriptor(parent.0))
        } else {
            Err("This MPSRNNDescriptor cannot be downcasted to MPSGRUDescriptor")
        }
    }
}
impl INSObject for MPSGRUDescriptor {}
impl PNSObject for MPSGRUDescriptor {}
impl IMPSGRUDescriptor for MPSGRUDescriptor {}
pub trait IMPSGRUDescriptor: Sized + std::ops::Deref {
    unsafe fn inputGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputGateInputWeights)
    }
    unsafe fn setInputGateInputWeights_(&self, inputGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputGateInputWeights : inputGateInputWeights)
    }
    unsafe fn inputGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputGateRecurrentWeights)
    }
    unsafe fn setInputGateRecurrentWeights_(&self, inputGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputGateRecurrentWeights : inputGateRecurrentWeights)
    }
    unsafe fn recurrentGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, recurrentGateInputWeights)
    }
    unsafe fn setRecurrentGateInputWeights_(&self, recurrentGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRecurrentGateInputWeights : recurrentGateInputWeights)
    }
    unsafe fn recurrentGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, recurrentGateRecurrentWeights)
    }
    unsafe fn setRecurrentGateRecurrentWeights_(&self, recurrentGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRecurrentGateRecurrentWeights : recurrentGateRecurrentWeights)
    }
    unsafe fn outputGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputGateInputWeights)
    }
    unsafe fn setOutputGateInputWeights_(&self, outputGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputGateInputWeights : outputGateInputWeights)
    }
    unsafe fn outputGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputGateRecurrentWeights)
    }
    unsafe fn setOutputGateRecurrentWeights_(&self, outputGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputGateRecurrentWeights : outputGateRecurrentWeights)
    }
    unsafe fn outputGateInputGateWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputGateInputGateWeights)
    }
    unsafe fn setOutputGateInputGateWeights_(&self, outputGateInputGateWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputGateInputGateWeights : outputGateInputGateWeights)
    }
    unsafe fn gatePnormValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gatePnormValue)
    }
    unsafe fn setGatePnormValue_(&self, gatePnormValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGatePnormValue : gatePnormValue)
    }
    unsafe fn flipOutputGates(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, flipOutputGates)
    }
    unsafe fn setFlipOutputGates_(&self, flipOutputGates: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFlipOutputGates : flipOutputGates)
    }
    unsafe fn createGRUDescriptorWithInputFeatureChannels_outputFeatureChannels_(
        inputFeatureChannels: NSUInteger,
        outputFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSGRUDescriptor").unwrap(), createGRUDescriptorWithInputFeatureChannels : inputFeatureChannels, outputFeatureChannels : outputFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSLSTMDescriptor(pub id);
impl std::ops::Deref for MPSLSTMDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSLSTMDescriptor {}
impl MPSLSTMDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSLSTMDescriptor").unwrap(), alloc) })
    }
}
impl IMPSRNNDescriptor for MPSLSTMDescriptor {}
impl std::convert::TryFrom<MPSRNNDescriptor> for MPSLSTMDescriptor {
    type Error = &'static str;
    fn try_from(parent: MPSRNNDescriptor) -> Result<MPSLSTMDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSLSTMDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSLSTMDescriptor(parent.0))
        } else {
            Err("This MPSRNNDescriptor cannot be downcasted to MPSLSTMDescriptor")
        }
    }
}
impl INSObject for MPSLSTMDescriptor {}
impl PNSObject for MPSLSTMDescriptor {}
impl IMPSLSTMDescriptor for MPSLSTMDescriptor {}
pub trait IMPSLSTMDescriptor: Sized + std::ops::Deref {
    unsafe fn memoryWeightsAreDiagonal(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, memoryWeightsAreDiagonal)
    }
    unsafe fn setMemoryWeightsAreDiagonal_(&self, memoryWeightsAreDiagonal: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMemoryWeightsAreDiagonal : memoryWeightsAreDiagonal)
    }
    unsafe fn inputGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputGateInputWeights)
    }
    unsafe fn setInputGateInputWeights_(&self, inputGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputGateInputWeights : inputGateInputWeights)
    }
    unsafe fn inputGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputGateRecurrentWeights)
    }
    unsafe fn setInputGateRecurrentWeights_(&self, inputGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputGateRecurrentWeights : inputGateRecurrentWeights)
    }
    unsafe fn inputGateMemoryWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputGateMemoryWeights)
    }
    unsafe fn setInputGateMemoryWeights_(&self, inputGateMemoryWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInputGateMemoryWeights : inputGateMemoryWeights)
    }
    unsafe fn forgetGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, forgetGateInputWeights)
    }
    unsafe fn setForgetGateInputWeights_(&self, forgetGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setForgetGateInputWeights : forgetGateInputWeights)
    }
    unsafe fn forgetGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, forgetGateRecurrentWeights)
    }
    unsafe fn setForgetGateRecurrentWeights_(&self, forgetGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setForgetGateRecurrentWeights : forgetGateRecurrentWeights)
    }
    unsafe fn forgetGateMemoryWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, forgetGateMemoryWeights)
    }
    unsafe fn setForgetGateMemoryWeights_(&self, forgetGateMemoryWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setForgetGateMemoryWeights : forgetGateMemoryWeights)
    }
    unsafe fn outputGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputGateInputWeights)
    }
    unsafe fn setOutputGateInputWeights_(&self, outputGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputGateInputWeights : outputGateInputWeights)
    }
    unsafe fn outputGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputGateRecurrentWeights)
    }
    unsafe fn setOutputGateRecurrentWeights_(&self, outputGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputGateRecurrentWeights : outputGateRecurrentWeights)
    }
    unsafe fn outputGateMemoryWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputGateMemoryWeights)
    }
    unsafe fn setOutputGateMemoryWeights_(&self, outputGateMemoryWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputGateMemoryWeights : outputGateMemoryWeights)
    }
    unsafe fn cellGateInputWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellGateInputWeights)
    }
    unsafe fn setCellGateInputWeights_(&self, cellGateInputWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellGateInputWeights : cellGateInputWeights)
    }
    unsafe fn cellGateRecurrentWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellGateRecurrentWeights)
    }
    unsafe fn setCellGateRecurrentWeights_(&self, cellGateRecurrentWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellGateRecurrentWeights : cellGateRecurrentWeights)
    }
    unsafe fn cellGateMemoryWeights(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellGateMemoryWeights)
    }
    unsafe fn setCellGateMemoryWeights_(&self, cellGateMemoryWeights: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellGateMemoryWeights : cellGateMemoryWeights)
    }
    unsafe fn cellToOutputNeuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellToOutputNeuronType)
    }
    unsafe fn setCellToOutputNeuronType_(&self, cellToOutputNeuronType: MPSCNNNeuronType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellToOutputNeuronType : cellToOutputNeuronType)
    }
    unsafe fn cellToOutputNeuronParamA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellToOutputNeuronParamA)
    }
    unsafe fn setCellToOutputNeuronParamA_(&self, cellToOutputNeuronParamA: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellToOutputNeuronParamA : cellToOutputNeuronParamA)
    }
    unsafe fn cellToOutputNeuronParamB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellToOutputNeuronParamB)
    }
    unsafe fn setCellToOutputNeuronParamB_(&self, cellToOutputNeuronParamB: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellToOutputNeuronParamB : cellToOutputNeuronParamB)
    }
    unsafe fn cellToOutputNeuronParamC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cellToOutputNeuronParamC)
    }
    unsafe fn setCellToOutputNeuronParamC_(&self, cellToOutputNeuronParamC: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCellToOutputNeuronParamC : cellToOutputNeuronParamC)
    }
    unsafe fn createLSTMDescriptorWithInputFeatureChannels_outputFeatureChannels_(
        inputFeatureChannels: NSUInteger,
        outputFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSLSTMDescriptor").unwrap(), createLSTMDescriptorWithInputFeatureChannels : inputFeatureChannels, outputFeatureChannels : outputFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNRecurrentImageState(pub id);
impl std::ops::Deref for MPSRNNRecurrentImageState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNRecurrentImageState {}
impl MPSRNNRecurrentImageState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNRecurrentImageState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSRNNRecurrentImageState {}
impl std::convert::TryFrom<MPSState> for MPSRNNRecurrentImageState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSRNNRecurrentImageState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNRecurrentImageState").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNRecurrentImageState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSRNNRecurrentImageState")
        }
    }
}
impl INSObject for MPSRNNRecurrentImageState {}
impl PNSObject for MPSRNNRecurrentImageState {}
impl IMPSRNNRecurrentImageState for MPSRNNRecurrentImageState {}
pub trait IMPSRNNRecurrentImageState: Sized + std::ops::Deref {
    unsafe fn getRecurrentOutputImageForLayerIndex_(&self, layerIndex: NSUInteger) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, getRecurrentOutputImageForLayerIndex : layerIndex)
    }
    unsafe fn getMemoryCellImageForLayerIndex_(&self, layerIndex: NSUInteger) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, getMemoryCellImageForLayerIndex : layerIndex)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNImageInferenceLayer(pub id);
impl std::ops::Deref for MPSRNNImageInferenceLayer {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNImageInferenceLayer {}
impl MPSRNNImageInferenceLayer {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNImageInferenceLayer").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSRNNImageInferenceLayer {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSRNNImageInferenceLayer {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSRNNImageInferenceLayer, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNImageInferenceLayer").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNImageInferenceLayer(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSRNNImageInferenceLayer")
        }
    }
}
impl IMPSKernel for MPSRNNImageInferenceLayer {}
impl PNSCopying for MPSRNNImageInferenceLayer {}
impl PNSSecureCoding for MPSRNNImageInferenceLayer {}
impl INSObject for MPSRNNImageInferenceLayer {}
impl PNSObject for MPSRNNImageInferenceLayer {}
impl IMPSRNNImageInferenceLayer for MPSRNNImageInferenceLayer {}
pub trait IMPSRNNImageInferenceLayer: Sized + std::ops::Deref {
    unsafe fn initWithDevice_rnnDescriptor_(
        &self,
        device: *mut u64,
        rnnDescriptor: MPSRNNDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rnnDescriptor : rnnDescriptor)
    }
    unsafe fn initWithDevice_rnnDescriptors_(
        &self,
        device: *mut u64,
        rnnDescriptors: NSArray,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rnnDescriptors : rnnDescriptors)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeSequenceToCommandBuffer_sourceImages_destinationImages_recurrentInputState_recurrentOutputStates_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        destinationImages: NSArray,
        recurrentInputState: MPSRNNRecurrentImageState,
        recurrentOutputStates: NSMutableArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeSequenceToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationImages : destinationImages, recurrentInputState : recurrentInputState, recurrentOutputStates : recurrentOutputStates)
    }
    unsafe fn encodeBidirectionalSequenceToCommandBuffer_sourceSequence_destinationForwardImages_destinationBackwardImages_(
        &self,
        commandBuffer: *mut u64,
        sourceSequence: NSArray,
        destinationForwardImages: NSArray,
        destinationBackwardImages: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBidirectionalSequenceToCommandBuffer : commandBuffer, sourceSequence : sourceSequence, destinationForwardImages : destinationForwardImages, destinationBackwardImages : destinationBackwardImages)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn numberOfLayers(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfLayers)
    }
    unsafe fn recurrentOutputIsTemporary(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, recurrentOutputIsTemporary)
    }
    unsafe fn setRecurrentOutputIsTemporary_(&self, recurrentOutputIsTemporary: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRecurrentOutputIsTemporary : recurrentOutputIsTemporary)
    }
    unsafe fn storeAllIntermediateStates(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, storeAllIntermediateStates)
    }
    unsafe fn setStoreAllIntermediateStates_(&self, storeAllIntermediateStates: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStoreAllIntermediateStates : storeAllIntermediateStates)
    }
    unsafe fn bidirectionalCombineMode(&self) -> MPSRNNBidirectionalCombineMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bidirectionalCombineMode)
    }
    unsafe fn setBidirectionalCombineMode_(
        &self,
        bidirectionalCombineMode: MPSRNNBidirectionalCombineMode,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBidirectionalCombineMode : bidirectionalCombineMode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNRecurrentMatrixState(pub id);
impl std::ops::Deref for MPSRNNRecurrentMatrixState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNRecurrentMatrixState {}
impl MPSRNNRecurrentMatrixState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNRecurrentMatrixState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSRNNRecurrentMatrixState {}
impl std::convert::TryFrom<MPSState> for MPSRNNRecurrentMatrixState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSRNNRecurrentMatrixState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNRecurrentMatrixState").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNRecurrentMatrixState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSRNNRecurrentMatrixState")
        }
    }
}
impl INSObject for MPSRNNRecurrentMatrixState {}
impl PNSObject for MPSRNNRecurrentMatrixState {}
impl IMPSRNNRecurrentMatrixState for MPSRNNRecurrentMatrixState {}
pub trait IMPSRNNRecurrentMatrixState: Sized + std::ops::Deref {
    unsafe fn getRecurrentOutputMatrixForLayerIndex_(&self, layerIndex: NSUInteger) -> MPSMatrix
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, getRecurrentOutputMatrixForLayerIndex : layerIndex)
    }
    unsafe fn getMemoryCellMatrixForLayerIndex_(&self, layerIndex: NSUInteger) -> MPSMatrix
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, getMemoryCellMatrixForLayerIndex : layerIndex)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNMatrixInferenceLayer(pub id);
impl std::ops::Deref for MPSRNNMatrixInferenceLayer {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNMatrixInferenceLayer {}
impl MPSRNNMatrixInferenceLayer {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNMatrixInferenceLayer").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSRNNMatrixInferenceLayer {}
impl PNSCopying for MPSRNNMatrixInferenceLayer {}
impl PNSSecureCoding for MPSRNNMatrixInferenceLayer {}
impl std::convert::TryFrom<MPSKernel> for MPSRNNMatrixInferenceLayer {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSRNNMatrixInferenceLayer, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNMatrixInferenceLayer").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNMatrixInferenceLayer(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSRNNMatrixInferenceLayer")
        }
    }
}
impl INSObject for MPSRNNMatrixInferenceLayer {}
impl PNSObject for MPSRNNMatrixInferenceLayer {}
impl IMPSRNNMatrixInferenceLayer for MPSRNNMatrixInferenceLayer {}
pub trait IMPSRNNMatrixInferenceLayer: Sized + std::ops::Deref {
    unsafe fn initWithDevice_rnnDescriptor_(
        &self,
        device: *mut u64,
        rnnDescriptor: MPSRNNDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rnnDescriptor : rnnDescriptor)
    }
    unsafe fn initWithDevice_rnnDescriptors_(
        &self,
        device: *mut u64,
        rnnDescriptors: NSArray,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rnnDescriptors : rnnDescriptors)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeSequenceToCommandBuffer_sourceMatrices_sourceOffsets_destinationMatrices_destinationOffsets_recurrentInputState_recurrentOutputStates_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrices: NSArray,
        sourceOffsets: *mut NSUInteger,
        destinationMatrices: NSArray,
        destinationOffsets: *mut NSUInteger,
        recurrentInputState: MPSRNNRecurrentMatrixState,
        recurrentOutputStates: NSMutableArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeSequenceToCommandBuffer : commandBuffer, sourceMatrices : sourceMatrices, sourceOffsets : sourceOffsets, destinationMatrices : destinationMatrices, destinationOffsets : destinationOffsets, recurrentInputState : recurrentInputState, recurrentOutputStates : recurrentOutputStates)
    }
    unsafe fn encodeSequenceToCommandBuffer_sourceMatrices_destinationMatrices_recurrentInputState_recurrentOutputStates_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrices: NSArray,
        destinationMatrices: NSArray,
        recurrentInputState: MPSRNNRecurrentMatrixState,
        recurrentOutputStates: NSMutableArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeSequenceToCommandBuffer : commandBuffer, sourceMatrices : sourceMatrices, destinationMatrices : destinationMatrices, recurrentInputState : recurrentInputState, recurrentOutputStates : recurrentOutputStates)
    }
    unsafe fn encodeBidirectionalSequenceToCommandBuffer_sourceSequence_destinationForwardMatrices_destinationBackwardMatrices_(
        &self,
        commandBuffer: *mut u64,
        sourceSequence: NSArray,
        destinationForwardMatrices: NSArray,
        destinationBackwardMatrices: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBidirectionalSequenceToCommandBuffer : commandBuffer, sourceSequence : sourceSequence, destinationForwardMatrices : destinationForwardMatrices, destinationBackwardMatrices : destinationBackwardMatrices)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn numberOfLayers(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfLayers)
    }
    unsafe fn recurrentOutputIsTemporary(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, recurrentOutputIsTemporary)
    }
    unsafe fn setRecurrentOutputIsTemporary_(&self, recurrentOutputIsTemporary: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRecurrentOutputIsTemporary : recurrentOutputIsTemporary)
    }
    unsafe fn storeAllIntermediateStates(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, storeAllIntermediateStates)
    }
    unsafe fn setStoreAllIntermediateStates_(&self, storeAllIntermediateStates: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStoreAllIntermediateStates : storeAllIntermediateStates)
    }
    unsafe fn bidirectionalCombineMode(&self) -> MPSRNNBidirectionalCombineMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bidirectionalCombineMode)
    }
    unsafe fn setBidirectionalCombineMode_(
        &self,
        bidirectionalCombineMode: MPSRNNBidirectionalCombineMode,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBidirectionalCombineMode : bidirectionalCombineMode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNMatrixTrainingState(pub id);
impl std::ops::Deref for MPSRNNMatrixTrainingState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNMatrixTrainingState {}
impl MPSRNNMatrixTrainingState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNMatrixTrainingState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSRNNMatrixTrainingState {}
impl std::convert::TryFrom<MPSState> for MPSRNNMatrixTrainingState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSRNNMatrixTrainingState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNMatrixTrainingState").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNMatrixTrainingState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSRNNMatrixTrainingState")
        }
    }
}
impl INSObject for MPSRNNMatrixTrainingState {}
impl PNSObject for MPSRNNMatrixTrainingState {}
impl IMPSRNNMatrixTrainingState for MPSRNNMatrixTrainingState {}
pub trait IMPSRNNMatrixTrainingState: Sized + std::ops::Deref {}
pub type MPSRNNMatrixId = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRNNMatrixTrainingLayer(pub id);
impl std::ops::Deref for MPSRNNMatrixTrainingLayer {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRNNMatrixTrainingLayer {}
impl MPSRNNMatrixTrainingLayer {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRNNMatrixTrainingLayer").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSRNNMatrixTrainingLayer {}
impl PNSCopying for MPSRNNMatrixTrainingLayer {}
impl PNSSecureCoding for MPSRNNMatrixTrainingLayer {}
impl std::convert::TryFrom<MPSKernel> for MPSRNNMatrixTrainingLayer {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSRNNMatrixTrainingLayer, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRNNMatrixTrainingLayer").unwrap()) };
        if is_kind_of {
            Ok(MPSRNNMatrixTrainingLayer(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSRNNMatrixTrainingLayer")
        }
    }
}
impl INSObject for MPSRNNMatrixTrainingLayer {}
impl PNSObject for MPSRNNMatrixTrainingLayer {}
impl IMPSRNNMatrixTrainingLayer for MPSRNNMatrixTrainingLayer {}
pub trait IMPSRNNMatrixTrainingLayer: Sized + std::ops::Deref {
    unsafe fn initWithDevice_rnnDescriptor_trainableWeights_(
        &self,
        device: *mut u64,
        rnnDescriptor: MPSRNNDescriptor,
        trainableWeights: NSMutableArray,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, rnnDescriptor : rnnDescriptor, trainableWeights : trainableWeights)
    }
    unsafe fn createWeightGradientMatrices_dataType_(
        &self,
        matricesOut: NSMutableArray,
        dataType: MPSDataType,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, createWeightGradientMatrices : matricesOut, dataType : dataType)
    }
    unsafe fn createTemporaryWeightGradientMatrices_dataType_commandBuffer_(
        &self,
        matricesOut: NSMutableArray,
        dataType: MPSDataType,
        commandBuffer: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, createTemporaryWeightGradientMatrices : matricesOut, dataType : dataType, commandBuffer : commandBuffer)
    }
    unsafe fn createWeightMatrices_(&self, matricesOut: NSMutableArray)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, createWeightMatrices : matricesOut)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeCopyWeightsToCommandBuffer_weights_matrixId_matrix_copyFromWeightsToMatrix_matrixOffset_(
        &self,
        commandBuffer: *mut u64,
        weights: NSArray,
        matrixId: MPSRNNMatrixId,
        matrix: MPSMatrix,
        copyFromWeightsToMatrix: BOOL,
        matrixOffset: MTLOrigin,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeCopyWeightsToCommandBuffer : commandBuffer, weights : weights, matrixId : matrixId, matrix : matrix, copyFromWeightsToMatrix : copyFromWeightsToMatrix, matrixOffset : matrixOffset)
    }
    unsafe fn encodeForwardSequenceToCommandBuffer_sourceMatrices_sourceOffsets_destinationMatrices_destinationOffsets_trainingStates_recurrentInputState_recurrentOutputStates_weights_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrices: NSArray,
        sourceOffsets: *mut NSUInteger,
        destinationMatrices: NSArray,
        destinationOffsets: *mut NSUInteger,
        trainingStates: NSMutableArray,
        recurrentInputState: MPSRNNRecurrentMatrixState,
        recurrentOutputStates: NSMutableArray,
        weights: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeForwardSequenceToCommandBuffer : commandBuffer, sourceMatrices : sourceMatrices, sourceOffsets : sourceOffsets, destinationMatrices : destinationMatrices, destinationOffsets : destinationOffsets, trainingStates : trainingStates, recurrentInputState : recurrentInputState, recurrentOutputStates : recurrentOutputStates, weights : weights)
    }
    unsafe fn encodeForwardSequenceToCommandBuffer_sourceMatrices_destinationMatrices_trainingStates_weights_(
        &self,
        commandBuffer: *mut u64,
        sourceMatrices: NSArray,
        destinationMatrices: NSArray,
        trainingStates: NSMutableArray,
        weights: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeForwardSequenceToCommandBuffer : commandBuffer, sourceMatrices : sourceMatrices, destinationMatrices : destinationMatrices, trainingStates : trainingStates, weights : weights)
    }
    unsafe fn encodeGradientSequenceToCommandBuffer_forwardSources_forwardSourceOffsets_sourceGradients_sourceGradientOffsets_destinationGradients_destinationOffsets_weightGradients_trainingStates_recurrentInputState_recurrentOutputStates_weights_(
        &self,
        commandBuffer: *mut u64,
        forwardSources: NSArray,
        forwardSourceOffsets: *mut NSUInteger,
        sourceGradients: NSArray,
        sourceGradientOffsets: *mut NSUInteger,
        destinationGradients: NSArray,
        destinationOffsets: *mut NSUInteger,
        weightGradients: NSArray,
        trainingStates: NSArray,
        recurrentInputState: MPSRNNRecurrentMatrixState,
        recurrentOutputStates: NSMutableArray,
        weights: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeGradientSequenceToCommandBuffer : commandBuffer, forwardSources : forwardSources, forwardSourceOffsets : forwardSourceOffsets, sourceGradients : sourceGradients, sourceGradientOffsets : sourceGradientOffsets, destinationGradients : destinationGradients, destinationOffsets : destinationOffsets, weightGradients : weightGradients, trainingStates : trainingStates, recurrentInputState : recurrentInputState, recurrentOutputStates : recurrentOutputStates, weights : weights)
    }
    unsafe fn encodeGradientSequenceToCommandBuffer_forwardSources_sourceGradients_destinationGradients_weightGradients_trainingStates_weights_(
        &self,
        commandBuffer: *mut u64,
        forwardSources: NSArray,
        sourceGradients: NSArray,
        destinationGradients: NSArray,
        weightGradients: NSArray,
        trainingStates: NSArray,
        weights: NSArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeGradientSequenceToCommandBuffer : commandBuffer, forwardSources : forwardSources, sourceGradients : sourceGradients, destinationGradients : destinationGradients, weightGradients : weightGradients, trainingStates : trainingStates, weights : weights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn inputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputFeatureChannels)
    }
    unsafe fn outputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputFeatureChannels)
    }
    unsafe fn storeAllIntermediateStates(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, storeAllIntermediateStates)
    }
    unsafe fn setStoreAllIntermediateStates_(&self, storeAllIntermediateStates: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStoreAllIntermediateStates : storeAllIntermediateStates)
    }
    unsafe fn recurrentOutputIsTemporary(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, recurrentOutputIsTemporary)
    }
    unsafe fn setRecurrentOutputIsTemporary_(&self, recurrentOutputIsTemporary: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRecurrentOutputIsTemporary : recurrentOutputIsTemporary)
    }
    unsafe fn trainingStateIsTemporary(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, trainingStateIsTemporary)
    }
    unsafe fn setTrainingStateIsTemporary_(&self, trainingStateIsTemporary: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTrainingStateIsTemporary : trainingStateIsTemporary)
    }
    unsafe fn accumulateWeightGradients(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, accumulateWeightGradients)
    }
    unsafe fn setAccumulateWeightGradients_(&self, accumulateWeightGradients: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAccumulateWeightGradients : accumulateWeightGradients)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixNeuron(pub id);
impl std::ops::Deref for MPSMatrixNeuron {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixNeuron {}
impl MPSMatrixNeuron {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixNeuron").unwrap(), alloc) })
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixNeuron {}
impl std::convert::TryFrom<MPSMatrixUnaryKernel> for MPSMatrixNeuron {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixUnaryKernel) -> Result<MPSMatrixNeuron, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixNeuron").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixNeuron(parent.0))
        } else {
            Err("This MPSMatrixUnaryKernel cannot be downcasted to MPSMatrixNeuron")
        }
    }
}
impl IMPSKernel for MPSMatrixNeuron {}
impl PNSCopying for MPSMatrixNeuron {}
impl PNSSecureCoding for MPSMatrixNeuron {}
impl INSObject for MPSMatrixNeuron {}
impl PNSObject for MPSMatrixNeuron {}
impl IMPSMatrixNeuron for MPSMatrixNeuron {}
pub trait IMPSMatrixNeuron: Sized + std::ops::Deref {
    unsafe fn setNeuronType_parameterA_parameterB_parameterC_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
        parameterC: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB, parameterC : parameterC)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
    unsafe fn setNeuronToPReLUWithParametersA_(&self, A: NSData)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronToPReLUWithParametersA : A)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_inputMatrix_biasVector_resultMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputMatrix: MPSMatrix,
        biasVector: MPSVector,
        resultMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputMatrix : inputMatrix, biasVector : biasVector, resultMatrix : resultMatrix)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceNumberOfFeatureVectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceNumberOfFeatureVectors)
    }
    unsafe fn setSourceNumberOfFeatureVectors_(&self, sourceNumberOfFeatureVectors: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceNumberOfFeatureVectors : sourceNumberOfFeatureVectors)
    }
    unsafe fn sourceInputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceInputFeatureChannels)
    }
    unsafe fn setSourceInputFeatureChannels_(&self, sourceInputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceInputFeatureChannels : sourceInputFeatureChannels)
    }
    unsafe fn alpha(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixNeuronGradient(pub id);
impl std::ops::Deref for MPSMatrixNeuronGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixNeuronGradient {}
impl MPSMatrixNeuronGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixNeuronGradient").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixNeuronGradient {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixNeuronGradient {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixBinaryKernel) -> Result<MPSMatrixNeuronGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixNeuronGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixNeuronGradient(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixNeuronGradient")
        }
    }
}
impl IMPSKernel for MPSMatrixNeuronGradient {}
impl PNSCopying for MPSMatrixNeuronGradient {}
impl PNSSecureCoding for MPSMatrixNeuronGradient {}
impl INSObject for MPSMatrixNeuronGradient {}
impl PNSObject for MPSMatrixNeuronGradient {}
impl IMPSMatrixNeuronGradient for MPSMatrixNeuronGradient {}
pub trait IMPSMatrixNeuronGradient: Sized + std::ops::Deref {
    unsafe fn setNeuronType_parameterA_parameterB_parameterC_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
        parameterC: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB, parameterC : parameterC)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
    unsafe fn setNeuronToPReLUWithParametersA_(&self, A: NSData)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronToPReLUWithParametersA : A)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_gradientMatrix_inputMatrix_biasVector_resultGradientForDataMatrix_resultGradientForBiasVector_(
        &self,
        commandBuffer: *mut u64,
        gradientMatrix: MPSMatrix,
        inputMatrix: MPSMatrix,
        biasVector: MPSVector,
        resultGradientForDataMatrix: MPSMatrix,
        resultGradientForBiasVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, gradientMatrix : gradientMatrix, inputMatrix : inputMatrix, biasVector : biasVector, resultGradientForDataMatrix : resultGradientForDataMatrix, resultGradientForBiasVector : resultGradientForBiasVector)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceNumberOfFeatureVectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceNumberOfFeatureVectors)
    }
    unsafe fn setSourceNumberOfFeatureVectors_(&self, sourceNumberOfFeatureVectors: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceNumberOfFeatureVectors : sourceNumberOfFeatureVectors)
    }
    unsafe fn sourceInputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceInputFeatureChannels)
    }
    unsafe fn setSourceInputFeatureChannels_(&self, sourceInputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceInputFeatureChannels : sourceInputFeatureChannels)
    }
    unsafe fn alpha(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixFullyConnected(pub id);
impl std::ops::Deref for MPSMatrixFullyConnected {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixFullyConnected {}
impl MPSMatrixFullyConnected {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixFullyConnected").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixFullyConnected {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixFullyConnected {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixBinaryKernel) -> Result<MPSMatrixFullyConnected, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixFullyConnected").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixFullyConnected(parent.0))
        } else {
            Err("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixFullyConnected")
        }
    }
}
impl IMPSKernel for MPSMatrixFullyConnected {}
impl PNSCopying for MPSMatrixFullyConnected {}
impl PNSSecureCoding for MPSMatrixFullyConnected {}
impl INSObject for MPSMatrixFullyConnected {}
impl PNSObject for MPSMatrixFullyConnected {}
impl IMPSMatrixFullyConnected for MPSMatrixFullyConnected {}
pub trait IMPSMatrixFullyConnected: Sized + std::ops::Deref {
    unsafe fn setNeuronType_parameterA_parameterB_parameterC_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
        parameterC: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB, parameterC : parameterC)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_inputMatrix_weightMatrix_biasVector_resultMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputMatrix: MPSMatrix,
        weightMatrix: MPSMatrix,
        biasVector: MPSVector,
        resultMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputMatrix : inputMatrix, weightMatrix : weightMatrix, biasVector : biasVector, resultMatrix : resultMatrix)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceNumberOfFeatureVectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceNumberOfFeatureVectors)
    }
    unsafe fn setSourceNumberOfFeatureVectors_(&self, sourceNumberOfFeatureVectors: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceNumberOfFeatureVectors : sourceNumberOfFeatureVectors)
    }
    unsafe fn sourceInputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceInputFeatureChannels)
    }
    unsafe fn setSourceInputFeatureChannels_(&self, sourceInputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceInputFeatureChannels : sourceInputFeatureChannels)
    }
    unsafe fn sourceOutputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceOutputFeatureChannels)
    }
    unsafe fn setSourceOutputFeatureChannels_(&self, sourceOutputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceOutputFeatureChannels : sourceOutputFeatureChannels)
    }
    unsafe fn alpha(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixFullyConnectedGradient(pub id);
impl std::ops::Deref for MPSMatrixFullyConnectedGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixFullyConnectedGradient {}
impl MPSMatrixFullyConnectedGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixFullyConnectedGradient").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixFullyConnectedGradient {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixFullyConnectedGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSMatrixBinaryKernel,
    ) -> Result<MPSMatrixFullyConnectedGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixFullyConnectedGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSMatrixFullyConnectedGradient(parent.0))
        } else {
            Err ("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixFullyConnectedGradient" ,)
        }
    }
}
impl IMPSKernel for MPSMatrixFullyConnectedGradient {}
impl PNSCopying for MPSMatrixFullyConnectedGradient {}
impl PNSSecureCoding for MPSMatrixFullyConnectedGradient {}
impl INSObject for MPSMatrixFullyConnectedGradient {}
impl PNSObject for MPSMatrixFullyConnectedGradient {}
impl IMPSMatrixFullyConnectedGradient for MPSMatrixFullyConnectedGradient {}
pub trait IMPSMatrixFullyConnectedGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeGradientForDataToCommandBuffer_gradientMatrix_weightMatrix_resultGradientForDataMatrix_(
        &self,
        commandBuffer: *mut u64,
        gradientMatrix: MPSMatrix,
        weightMatrix: MPSMatrix,
        resultGradientForDataMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeGradientForDataToCommandBuffer : commandBuffer, gradientMatrix : gradientMatrix, weightMatrix : weightMatrix, resultGradientForDataMatrix : resultGradientForDataMatrix)
    }
    unsafe fn encodeGradientForWeightsAndBiasToCommandBuffer_gradientMatrix_inputMatrix_resultGradientForWeightMatrix_resultGradientForBiasVector_(
        &self,
        commandBuffer: *mut u64,
        gradientMatrix: MPSMatrix,
        inputMatrix: MPSMatrix,
        resultGradientForWeightMatrix: MPSMatrix,
        resultGradientForBiasVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeGradientForWeightsAndBiasToCommandBuffer : commandBuffer, gradientMatrix : gradientMatrix, inputMatrix : inputMatrix, resultGradientForWeightMatrix : resultGradientForWeightMatrix, resultGradientForBiasVector : resultGradientForBiasVector)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceNumberOfFeatureVectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceNumberOfFeatureVectors)
    }
    unsafe fn setSourceNumberOfFeatureVectors_(&self, sourceNumberOfFeatureVectors: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceNumberOfFeatureVectors : sourceNumberOfFeatureVectors)
    }
    unsafe fn sourceOutputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceOutputFeatureChannels)
    }
    unsafe fn setSourceOutputFeatureChannels_(&self, sourceOutputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceOutputFeatureChannels : sourceOutputFeatureChannels)
    }
    unsafe fn sourceInputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceInputFeatureChannels)
    }
    unsafe fn setSourceInputFeatureChannels_(&self, sourceInputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceInputFeatureChannels : sourceInputFeatureChannels)
    }
    unsafe fn alpha(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixSum(pub id);
impl std::ops::Deref for MPSMatrixSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixSum {}
impl MPSMatrixSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixSum").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSMatrixSum {}
impl PNSCopying for MPSMatrixSum {}
impl PNSSecureCoding for MPSMatrixSum {}
impl std::convert::TryFrom<MPSKernel> for MPSMatrixSum {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSMatrixSum, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixSum").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixSum(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSMatrixSum")
        }
    }
}
impl INSObject for MPSMatrixSum {}
impl PNSObject for MPSMatrixSum {}
impl IMPSMatrixSum for MPSMatrixSum {}
pub trait IMPSMatrixSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_count_rows_columns_transpose_(
        &self,
        device: *mut u64,
        count: NSUInteger,
        rows: NSUInteger,
        columns: NSUInteger,
        transpose: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, count : count, rows : rows, columns : columns, transpose : transpose)
    }
    unsafe fn setNeuronType_parameterA_parameterB_parameterC_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
        parameterC: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB, parameterC : parameterC)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn encodeToCommandBuffer_sourceMatrices_resultMatrix_scaleVector_offsetVector_biasVector_startIndex_(
        &self,
        buffer: *mut u64,
        sourceMatrices: NSArray,
        resultMatrix: MPSMatrix,
        scaleVector: MPSVector,
        offsetVector: MPSVector,
        biasVector: MPSVector,
        startIndex: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : buffer, sourceMatrices : sourceMatrices, resultMatrix : resultMatrix, scaleVector : scaleVector, offsetVector : offsetVector, biasVector : biasVector, startIndex : startIndex)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn rows(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rows)
    }
    unsafe fn columns(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, columns)
    }
    unsafe fn count(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, count)
    }
    unsafe fn transpose(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transpose)
    }
    unsafe fn resultMatrixOrigin(&self) -> MTLOrigin
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultMatrixOrigin)
    }
    unsafe fn setResultMatrixOrigin_(&self, resultMatrixOrigin: MTLOrigin)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setResultMatrixOrigin : resultMatrixOrigin)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixBatchNormalization(pub id);
impl std::ops::Deref for MPSMatrixBatchNormalization {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixBatchNormalization {}
impl MPSMatrixBatchNormalization {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixBatchNormalization").unwrap(), alloc) })
    }
}
impl IMPSMatrixUnaryKernel for MPSMatrixBatchNormalization {}
impl std::convert::TryFrom<MPSMatrixUnaryKernel> for MPSMatrixBatchNormalization {
    type Error = &'static str;
    fn try_from(parent: MPSMatrixUnaryKernel) -> Result<MPSMatrixBatchNormalization, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixBatchNormalization").unwrap()) };
        if is_kind_of {
            Ok(MPSMatrixBatchNormalization(parent.0))
        } else {
            Err("This MPSMatrixUnaryKernel cannot be downcasted to MPSMatrixBatchNormalization")
        }
    }
}
impl IMPSKernel for MPSMatrixBatchNormalization {}
impl PNSCopying for MPSMatrixBatchNormalization {}
impl PNSSecureCoding for MPSMatrixBatchNormalization {}
impl INSObject for MPSMatrixBatchNormalization {}
impl PNSObject for MPSMatrixBatchNormalization {}
impl IMPSMatrixBatchNormalization for MPSMatrixBatchNormalization {}
pub trait IMPSMatrixBatchNormalization: Sized + std::ops::Deref {
    unsafe fn setNeuronType_parameterA_parameterB_parameterC_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
        parameterC: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB, parameterC : parameterC)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_inputMatrix_meanVector_varianceVector_gammaVector_betaVector_resultMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputMatrix: MPSMatrix,
        meanVector: MPSVector,
        varianceVector: MPSVector,
        gammaVector: MPSVector,
        betaVector: MPSVector,
        resultMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputMatrix : inputMatrix, meanVector : meanVector, varianceVector : varianceVector, gammaVector : gammaVector, betaVector : betaVector, resultMatrix : resultMatrix)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceNumberOfFeatureVectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceNumberOfFeatureVectors)
    }
    unsafe fn setSourceNumberOfFeatureVectors_(&self, sourceNumberOfFeatureVectors: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceNumberOfFeatureVectors : sourceNumberOfFeatureVectors)
    }
    unsafe fn sourceInputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceInputFeatureChannels)
    }
    unsafe fn setSourceInputFeatureChannels_(&self, sourceInputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceInputFeatureChannels : sourceInputFeatureChannels)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
    unsafe fn computeStatistics(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, computeStatistics)
    }
    unsafe fn setComputeStatistics_(&self, computeStatistics: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setComputeStatistics : computeStatistics)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSMatrixBatchNormalizationGradient(pub id);
impl std::ops::Deref for MPSMatrixBatchNormalizationGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSMatrixBatchNormalizationGradient {}
impl MPSMatrixBatchNormalizationGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSMatrixBatchNormalizationGradient").unwrap(), alloc) })
    }
}
impl IMPSMatrixBinaryKernel for MPSMatrixBatchNormalizationGradient {}
impl std::convert::TryFrom<MPSMatrixBinaryKernel> for MPSMatrixBatchNormalizationGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSMatrixBinaryKernel,
    ) -> Result<MPSMatrixBatchNormalizationGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSMatrixBatchNormalizationGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSMatrixBatchNormalizationGradient(parent.0))
        } else {
            Err ("This MPSMatrixBinaryKernel cannot be downcasted to MPSMatrixBatchNormalizationGradient" ,)
        }
    }
}
impl IMPSKernel for MPSMatrixBatchNormalizationGradient {}
impl PNSCopying for MPSMatrixBatchNormalizationGradient {}
impl PNSSecureCoding for MPSMatrixBatchNormalizationGradient {}
impl INSObject for MPSMatrixBatchNormalizationGradient {}
impl PNSObject for MPSMatrixBatchNormalizationGradient {}
impl IMPSMatrixBatchNormalizationGradient for MPSMatrixBatchNormalizationGradient {}
pub trait IMPSMatrixBatchNormalizationGradient: Sized + std::ops::Deref {
    unsafe fn setNeuronType_parameterA_parameterB_parameterC_(
        &self,
        neuronType: MPSCNNNeuronType,
        parameterA: f32,
        parameterB: f32,
        parameterC: f32,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNeuronType : neuronType, parameterA : parameterA, parameterB : parameterB, parameterC : parameterC)
    }
    unsafe fn neuronType(&self) -> MPSCNNNeuronType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronType)
    }
    unsafe fn neuronParameterA(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterA)
    }
    unsafe fn neuronParameterB(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterB)
    }
    unsafe fn neuronParameterC(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, neuronParameterC)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn encodeToCommandBuffer_gradientMatrix_inputMatrix_meanVector_varianceVector_gammaVector_betaVector_resultGradientForDataMatrix_resultGradientForGammaVector_resultGradientForBetaVector_(
        &self,
        commandBuffer: *mut u64,
        gradientMatrix: MPSMatrix,
        inputMatrix: MPSMatrix,
        meanVector: MPSVector,
        varianceVector: MPSVector,
        gammaVector: MPSVector,
        betaVector: MPSVector,
        resultGradientForDataMatrix: MPSMatrix,
        resultGradientForGammaVector: MPSVector,
        resultGradientForBetaVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, gradientMatrix : gradientMatrix, inputMatrix : inputMatrix, meanVector : meanVector, varianceVector : varianceVector, gammaVector : gammaVector, betaVector : betaVector, resultGradientForDataMatrix : resultGradientForDataMatrix, resultGradientForGammaVector : resultGradientForGammaVector, resultGradientForBetaVector : resultGradientForBetaVector)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn sourceNumberOfFeatureVectors(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceNumberOfFeatureVectors)
    }
    unsafe fn setSourceNumberOfFeatureVectors_(&self, sourceNumberOfFeatureVectors: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceNumberOfFeatureVectors : sourceNumberOfFeatureVectors)
    }
    unsafe fn sourceInputFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceInputFeatureChannels)
    }
    unsafe fn setSourceInputFeatureChannels_(&self, sourceInputFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSourceInputFeatureChannels : sourceInputFeatureChannels)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn setEpsilon_(&self, epsilon: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setEpsilon : epsilon)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGridSample(pub id);
impl std::ops::Deref for MPSNNGridSample {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGridSample {}
impl MPSNNGridSample {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGridSample").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryKernel for MPSNNGridSample {}
impl std::convert::TryFrom<MPSCNNBinaryKernel> for MPSNNGridSample {
    type Error = &'static str;
    fn try_from(parent: MPSCNNBinaryKernel) -> Result<MPSNNGridSample, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGridSample").unwrap()) };
        if is_kind_of {
            Ok(MPSNNGridSample(parent.0))
        } else {
            Err("This MPSCNNBinaryKernel cannot be downcasted to MPSNNGridSample")
        }
    }
}
impl IMPSKernel for MPSNNGridSample {}
impl PNSCopying for MPSNNGridSample {}
impl PNSSecureCoding for MPSNNGridSample {}
impl INSObject for MPSNNGridSample {}
impl PNSObject for MPSNNGridSample {}
impl IMPSNNGridSample for MPSNNGridSample {}
pub trait IMPSNNGridSample: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn useGridValueAsInputCoordinate(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, useGridValueAsInputCoordinate)
    }
    unsafe fn setUseGridValueAsInputCoordinate_(&self, useGridValueAsInputCoordinate: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setUseGridValueAsInputCoordinate : useGridValueAsInputCoordinate)
    }
}
pub type MPSNNRegularizationType = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNOptimizerDescriptor(pub id);
impl std::ops::Deref for MPSNNOptimizerDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNOptimizerDescriptor {}
impl MPSNNOptimizerDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizerDescriptor").unwrap(), alloc) })
    }
}
impl INSObject for MPSNNOptimizerDescriptor {}
impl PNSObject for MPSNNOptimizerDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSNNOptimizerDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNNOptimizerDescriptor, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNOptimizerDescriptor").unwrap()) };
        if is_kind_of {
            Ok(MPSNNOptimizerDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNNOptimizerDescriptor")
        }
    }
}
impl IMPSNNOptimizerDescriptor for MPSNNOptimizerDescriptor {}
pub trait IMPSNNOptimizerDescriptor: Sized + std::ops::Deref {
    unsafe fn initWithLearningRate_gradientRescale_regularizationType_regularizationScale_(
        &self,
        learningRate: f32,
        gradientRescale: f32,
        regularizationType: MPSNNRegularizationType,
        regularizationScale: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithLearningRate : learningRate, gradientRescale : gradientRescale, regularizationType : regularizationType, regularizationScale : regularizationScale)
    }
    unsafe fn initWithLearningRate_gradientRescale_applyGradientClipping_gradientClipMax_gradientClipMin_regularizationType_regularizationScale_(
        &self,
        learningRate: f32,
        gradientRescale: f32,
        applyGradientClipping: BOOL,
        gradientClipMax: f32,
        gradientClipMin: f32,
        regularizationType: MPSNNRegularizationType,
        regularizationScale: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithLearningRate : learningRate, gradientRescale : gradientRescale, applyGradientClipping : applyGradientClipping, gradientClipMax : gradientClipMax, gradientClipMin : gradientClipMin, regularizationType : regularizationType, regularizationScale : regularizationScale)
    }
    unsafe fn learningRate(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, learningRate)
    }
    unsafe fn setLearningRate_(&self, learningRate: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLearningRate : learningRate)
    }
    unsafe fn gradientRescale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientRescale)
    }
    unsafe fn setGradientRescale_(&self, gradientRescale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGradientRescale : gradientRescale)
    }
    unsafe fn applyGradientClipping(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, applyGradientClipping)
    }
    unsafe fn setApplyGradientClipping_(&self, applyGradientClipping: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setApplyGradientClipping : applyGradientClipping)
    }
    unsafe fn gradientClipMax(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientClipMax)
    }
    unsafe fn setGradientClipMax_(&self, gradientClipMax: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGradientClipMax : gradientClipMax)
    }
    unsafe fn gradientClipMin(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientClipMin)
    }
    unsafe fn setGradientClipMin_(&self, gradientClipMin: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setGradientClipMin : gradientClipMin)
    }
    unsafe fn regularizationScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, regularizationScale)
    }
    unsafe fn setRegularizationScale_(&self, regularizationScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRegularizationScale : regularizationScale)
    }
    unsafe fn regularizationType(&self) -> MPSNNRegularizationType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, regularizationType)
    }
    unsafe fn setRegularizationType_(&self, regularizationType: MPSNNRegularizationType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRegularizationType : regularizationType)
    }
    unsafe fn optimizerDescriptorWithLearningRate_gradientRescale_regularizationType_regularizationScale_(
        learningRate: f32,
        gradientRescale: f32,
        regularizationType: MPSNNRegularizationType,
        regularizationScale: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizerDescriptor").unwrap(), optimizerDescriptorWithLearningRate : learningRate, gradientRescale : gradientRescale, regularizationType : regularizationType, regularizationScale : regularizationScale)
    }
    unsafe fn optimizerDescriptorWithLearningRate_gradientRescale_applyGradientClipping_gradientClipMax_gradientClipMin_regularizationType_regularizationScale_(
        learningRate: f32,
        gradientRescale: f32,
        applyGradientClipping: BOOL,
        gradientClipMax: f32,
        gradientClipMin: f32,
        regularizationType: MPSNNRegularizationType,
        regularizationScale: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizerDescriptor").unwrap(), optimizerDescriptorWithLearningRate : learningRate, gradientRescale : gradientRescale, applyGradientClipping : applyGradientClipping, gradientClipMax : gradientClipMax, gradientClipMin : gradientClipMin, regularizationType : regularizationType, regularizationScale : regularizationScale)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNOptimizer(pub id);
impl std::ops::Deref for MPSNNOptimizer {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNOptimizer {}
impl MPSNNOptimizer {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizer").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSNNOptimizer {}
impl PNSCopying for MPSNNOptimizer {}
impl PNSSecureCoding for MPSNNOptimizer {}
impl std::convert::TryFrom<MPSKernel> for MPSNNOptimizer {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSNNOptimizer, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNOptimizer").unwrap()) };
        if is_kind_of {
            Ok(MPSNNOptimizer(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSNNOptimizer")
        }
    }
}
impl INSObject for MPSNNOptimizer {}
impl PNSObject for MPSNNOptimizer {}
impl IMPSNNOptimizer for MPSNNOptimizer {}
pub trait IMPSNNOptimizer: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn setLearningRate_(&self, newLearningRate: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLearningRate : newLearningRate)
    }
    unsafe fn learningRate(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, learningRate)
    }
    unsafe fn gradientRescale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientRescale)
    }
    unsafe fn applyGradientClipping(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, applyGradientClipping)
    }
    unsafe fn setApplyGradientClipping_(&self, applyGradientClipping: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setApplyGradientClipping : applyGradientClipping)
    }
    unsafe fn gradientClipMax(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientClipMax)
    }
    unsafe fn gradientClipMin(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientClipMin)
    }
    unsafe fn regularizationScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, regularizationScale)
    }
    unsafe fn regularizationType(&self) -> MPSNNRegularizationType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, regularizationType)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNOptimizerStochasticGradientDescent(pub id);
impl std::ops::Deref for MPSNNOptimizerStochasticGradientDescent {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNOptimizerStochasticGradientDescent {}
impl MPSNNOptimizerStochasticGradientDescent {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizerStochasticGradientDescent").unwrap(), alloc) })
    }
}
impl IMPSNNOptimizer for MPSNNOptimizerStochasticGradientDescent {}
impl From<MPSNNOptimizerStochasticGradientDescent> for MPSNNOptimizer {
    fn from(child: MPSNNOptimizerStochasticGradientDescent) -> MPSNNOptimizer {
        MPSNNOptimizer(child.0)
    }
}
impl std::convert::TryFrom<MPSNNOptimizer> for MPSNNOptimizerStochasticGradientDescent {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNOptimizer,
    ) -> Result<MPSNNOptimizerStochasticGradientDescent, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNOptimizerStochasticGradientDescent").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNOptimizerStochasticGradientDescent(parent.0))
        } else {
            Err ("This MPSNNOptimizer cannot be downcasted to MPSNNOptimizerStochasticGradientDescent" ,)
        }
    }
}
impl IMPSKernel for MPSNNOptimizerStochasticGradientDescent {}
impl PNSCopying for MPSNNOptimizerStochasticGradientDescent {}
impl PNSSecureCoding for MPSNNOptimizerStochasticGradientDescent {}
impl INSObject for MPSNNOptimizerStochasticGradientDescent {}
impl PNSObject for MPSNNOptimizerStochasticGradientDescent {}
impl IMPSNNOptimizerStochasticGradientDescent for MPSNNOptimizerStochasticGradientDescent {}
pub trait IMPSNNOptimizerStochasticGradientDescent: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_learningRate_(
        &self,
        device: *mut u64,
        learningRate: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, learningRate : learningRate)
    }
    unsafe fn initWithDevice_momentumScale_useNesterovMomentum_optimizerDescriptor_(
        &self,
        device: *mut u64,
        momentumScale: f32,
        useNesterovMomentum: BOOL,
        optimizerDescriptor: MPSNNOptimizerDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, momentumScale : momentumScale, useNesterovMomentum : useNesterovMomentum, optimizerDescriptor : optimizerDescriptor)
    }
    unsafe fn initWithDevice_momentumScale_useNestrovMomentum_optimizerDescriptor_(
        &self,
        device: *mut u64,
        momentumScale: f32,
        useNestrovMomentum: BOOL,
        optimizerDescriptor: MPSNNOptimizerDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, momentumScale : momentumScale, useNestrovMomentum : useNestrovMomentum, optimizerDescriptor : optimizerDescriptor)
    }
    unsafe fn encodeToCommandBuffer_inputGradientVector_inputValuesVector_inputMomentumVector_resultValuesVector_(
        &self,
        commandBuffer: *mut u64,
        inputGradientVector: MPSVector,
        inputValuesVector: MPSVector,
        inputMomentumVector: MPSVector,
        resultValuesVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientVector : inputGradientVector, inputValuesVector : inputValuesVector, inputMomentumVector : inputMomentumVector, resultValuesVector : resultValuesVector)
    }
    unsafe fn encodeToCommandBuffer_inputGradientMatrix_inputValuesMatrix_inputMomentumMatrix_resultValuesMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputGradientMatrix: MPSMatrix,
        inputValuesMatrix: MPSMatrix,
        inputMomentumMatrix: MPSMatrix,
        resultValuesMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientMatrix : inputGradientMatrix, inputValuesMatrix : inputValuesMatrix, inputMomentumMatrix : inputMomentumMatrix, resultValuesMatrix : resultValuesMatrix)
    }
    unsafe fn encodeToCommandBuffer_convolutionGradientState_convolutionSourceState_inputMomentumVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        convolutionGradientState: MPSCNNConvolutionGradientState,
        convolutionSourceState: MPSCNNConvolutionWeightsAndBiasesState,
        inputMomentumVectors: NSArray,
        resultState: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, convolutionGradientState : convolutionGradientState, convolutionSourceState : convolutionSourceState, inputMomentumVectors : inputMomentumVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationState_inputMomentumVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        inputMomentumVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationState : batchNormalizationState, inputMomentumVectors : inputMomentumVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationGradientState_batchNormalizationSourceState_inputMomentumVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationGradientState: MPSCNNBatchNormalizationState,
        batchNormalizationSourceState: MPSCNNBatchNormalizationState,
        inputMomentumVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationGradientState : batchNormalizationGradientState, batchNormalizationSourceState : batchNormalizationSourceState, inputMomentumVectors : inputMomentumVectors, resultState : resultState)
    }
    unsafe fn momentumScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, momentumScale)
    }
    unsafe fn useNesterovMomentum(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, useNesterovMomentum)
    }
    unsafe fn useNestrovMomentum(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, useNestrovMomentum)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNOptimizerRMSProp(pub id);
impl std::ops::Deref for MPSNNOptimizerRMSProp {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNOptimizerRMSProp {}
impl MPSNNOptimizerRMSProp {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizerRMSProp").unwrap(), alloc) })
    }
}
impl IMPSNNOptimizer for MPSNNOptimizerRMSProp {}
impl std::convert::TryFrom<MPSNNOptimizer> for MPSNNOptimizerRMSProp {
    type Error = &'static str;
    fn try_from(parent: MPSNNOptimizer) -> Result<MPSNNOptimizerRMSProp, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNOptimizerRMSProp").unwrap()) };
        if is_kind_of {
            Ok(MPSNNOptimizerRMSProp(parent.0))
        } else {
            Err("This MPSNNOptimizer cannot be downcasted to MPSNNOptimizerRMSProp")
        }
    }
}
impl IMPSKernel for MPSNNOptimizerRMSProp {}
impl PNSCopying for MPSNNOptimizerRMSProp {}
impl PNSSecureCoding for MPSNNOptimizerRMSProp {}
impl INSObject for MPSNNOptimizerRMSProp {}
impl PNSObject for MPSNNOptimizerRMSProp {}
impl IMPSNNOptimizerRMSProp for MPSNNOptimizerRMSProp {}
pub trait IMPSNNOptimizerRMSProp: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_learningRate_(
        &self,
        device: *mut u64,
        learningRate: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, learningRate : learningRate)
    }
    unsafe fn initWithDevice_decay_epsilon_optimizerDescriptor_(
        &self,
        device: *mut u64,
        decay: f64,
        epsilon: f32,
        optimizerDescriptor: MPSNNOptimizerDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, decay : decay, epsilon : epsilon, optimizerDescriptor : optimizerDescriptor)
    }
    unsafe fn encodeToCommandBuffer_inputGradientVector_inputValuesVector_inputSumOfSquaresVector_resultValuesVector_(
        &self,
        commandBuffer: *mut u64,
        inputGradientVector: MPSVector,
        inputValuesVector: MPSVector,
        inputSumOfSquaresVector: MPSVector,
        resultValuesVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientVector : inputGradientVector, inputValuesVector : inputValuesVector, inputSumOfSquaresVector : inputSumOfSquaresVector, resultValuesVector : resultValuesVector)
    }
    unsafe fn encodeToCommandBuffer_inputGradientMatrix_inputValuesMatrix_inputSumOfSquaresMatrix_resultValuesMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputGradientMatrix: MPSMatrix,
        inputValuesMatrix: MPSMatrix,
        inputSumOfSquaresMatrix: MPSMatrix,
        resultValuesMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientMatrix : inputGradientMatrix, inputValuesMatrix : inputValuesMatrix, inputSumOfSquaresMatrix : inputSumOfSquaresMatrix, resultValuesMatrix : resultValuesMatrix)
    }
    unsafe fn encodeToCommandBuffer_convolutionGradientState_convolutionSourceState_inputSumOfSquaresVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        convolutionGradientState: MPSCNNConvolutionGradientState,
        convolutionSourceState: MPSCNNConvolutionWeightsAndBiasesState,
        inputSumOfSquaresVectors: NSArray,
        resultState: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, convolutionGradientState : convolutionGradientState, convolutionSourceState : convolutionSourceState, inputSumOfSquaresVectors : inputSumOfSquaresVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationState_inputSumOfSquaresVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        inputSumOfSquaresVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationState : batchNormalizationState, inputSumOfSquaresVectors : inputSumOfSquaresVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationGradientState_batchNormalizationSourceState_inputSumOfSquaresVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationGradientState: MPSCNNBatchNormalizationState,
        batchNormalizationSourceState: MPSCNNBatchNormalizationState,
        inputSumOfSquaresVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationGradientState : batchNormalizationGradientState, batchNormalizationSourceState : batchNormalizationSourceState, inputSumOfSquaresVectors : inputSumOfSquaresVectors, resultState : resultState)
    }
    unsafe fn decay(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, decay)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNOptimizerAdam(pub id);
impl std::ops::Deref for MPSNNOptimizerAdam {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNOptimizerAdam {}
impl MPSNNOptimizerAdam {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNOptimizerAdam").unwrap(), alloc) })
    }
}
impl IMPSNNOptimizer for MPSNNOptimizerAdam {}
impl std::convert::TryFrom<MPSNNOptimizer> for MPSNNOptimizerAdam {
    type Error = &'static str;
    fn try_from(parent: MPSNNOptimizer) -> Result<MPSNNOptimizerAdam, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNOptimizerAdam").unwrap()) };
        if is_kind_of {
            Ok(MPSNNOptimizerAdam(parent.0))
        } else {
            Err("This MPSNNOptimizer cannot be downcasted to MPSNNOptimizerAdam")
        }
    }
}
impl IMPSKernel for MPSNNOptimizerAdam {}
impl PNSCopying for MPSNNOptimizerAdam {}
impl PNSSecureCoding for MPSNNOptimizerAdam {}
impl INSObject for MPSNNOptimizerAdam {}
impl PNSObject for MPSNNOptimizerAdam {}
impl IMPSNNOptimizerAdam for MPSNNOptimizerAdam {}
pub trait IMPSNNOptimizerAdam: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_learningRate_(
        &self,
        device: *mut u64,
        learningRate: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, learningRate : learningRate)
    }
    unsafe fn initWithDevice_beta1_beta2_epsilon_timeStep_optimizerDescriptor_(
        &self,
        device: *mut u64,
        beta1: f64,
        beta2: f64,
        epsilon: f32,
        timeStep: NSUInteger,
        optimizerDescriptor: MPSNNOptimizerDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, beta1 : beta1, beta2 : beta2, epsilon : epsilon, timeStep : timeStep, optimizerDescriptor : optimizerDescriptor)
    }
    unsafe fn encodeToCommandBuffer_inputGradientVector_inputValuesVector_inputMomentumVector_inputVelocityVector_resultValuesVector_(
        &self,
        commandBuffer: *mut u64,
        inputGradientVector: MPSVector,
        inputValuesVector: MPSVector,
        inputMomentumVector: MPSVector,
        inputVelocityVector: MPSVector,
        resultValuesVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientVector : inputGradientVector, inputValuesVector : inputValuesVector, inputMomentumVector : inputMomentumVector, inputVelocityVector : inputVelocityVector, resultValuesVector : resultValuesVector)
    }
    unsafe fn encodeToCommandBuffer_inputGradientMatrix_inputValuesMatrix_inputMomentumMatrix_inputVelocityMatrix_resultValuesMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputGradientMatrix: MPSMatrix,
        inputValuesMatrix: MPSMatrix,
        inputMomentumMatrix: MPSMatrix,
        inputVelocityMatrix: MPSMatrix,
        resultValuesMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientMatrix : inputGradientMatrix, inputValuesMatrix : inputValuesMatrix, inputMomentumMatrix : inputMomentumMatrix, inputVelocityMatrix : inputVelocityMatrix, resultValuesMatrix : resultValuesMatrix)
    }
    unsafe fn encodeToCommandBuffer_inputGradientVector_inputValuesVector_inputMomentumVector_inputVelocityVector_maximumVelocityVector_resultValuesVector_(
        &self,
        commandBuffer: *mut u64,
        inputGradientVector: MPSVector,
        inputValuesVector: MPSVector,
        inputMomentumVector: MPSVector,
        inputVelocityVector: MPSVector,
        maximumVelocityVector: MPSVector,
        resultValuesVector: MPSVector,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientVector : inputGradientVector, inputValuesVector : inputValuesVector, inputMomentumVector : inputMomentumVector, inputVelocityVector : inputVelocityVector, maximumVelocityVector : maximumVelocityVector, resultValuesVector : resultValuesVector)
    }
    unsafe fn encodeToCommandBuffer_inputGradientMatrix_inputValuesMatrix_inputMomentumMatrix_inputVelocityMatrix_maximumVelocityMatrix_resultValuesMatrix_(
        &self,
        commandBuffer: *mut u64,
        inputGradientMatrix: MPSMatrix,
        inputValuesMatrix: MPSMatrix,
        inputMomentumMatrix: MPSMatrix,
        inputVelocityMatrix: MPSMatrix,
        maximumVelocityMatrix: MPSMatrix,
        resultValuesMatrix: MPSMatrix,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, inputGradientMatrix : inputGradientMatrix, inputValuesMatrix : inputValuesMatrix, inputMomentumMatrix : inputMomentumMatrix, inputVelocityMatrix : inputVelocityMatrix, maximumVelocityMatrix : maximumVelocityMatrix, resultValuesMatrix : resultValuesMatrix)
    }
    unsafe fn encodeToCommandBuffer_convolutionGradientState_convolutionSourceState_inputMomentumVectors_inputVelocityVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        convolutionGradientState: MPSCNNConvolutionGradientState,
        convolutionSourceState: MPSCNNConvolutionWeightsAndBiasesState,
        inputMomentumVectors: NSArray,
        inputVelocityVectors: NSArray,
        resultState: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, convolutionGradientState : convolutionGradientState, convolutionSourceState : convolutionSourceState, inputMomentumVectors : inputMomentumVectors, inputVelocityVectors : inputVelocityVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_convolutionGradientState_convolutionSourceState_inputMomentumVectors_inputVelocityVectors_maximumVelocityVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        convolutionGradientState: MPSCNNConvolutionGradientState,
        convolutionSourceState: MPSCNNConvolutionWeightsAndBiasesState,
        inputMomentumVectors: NSArray,
        inputVelocityVectors: NSArray,
        maximumVelocityVectors: NSArray,
        resultState: MPSCNNConvolutionWeightsAndBiasesState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, convolutionGradientState : convolutionGradientState, convolutionSourceState : convolutionSourceState, inputMomentumVectors : inputMomentumVectors, inputVelocityVectors : inputVelocityVectors, maximumVelocityVectors : maximumVelocityVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationState_inputMomentumVectors_inputVelocityVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        inputMomentumVectors: NSArray,
        inputVelocityVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationState : batchNormalizationState, inputMomentumVectors : inputMomentumVectors, inputVelocityVectors : inputVelocityVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationState_inputMomentumVectors_inputVelocityVectors_maximumVelocityVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationState: MPSCNNBatchNormalizationState,
        inputMomentumVectors: NSArray,
        inputVelocityVectors: NSArray,
        maximumVelocityVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationState : batchNormalizationState, inputMomentumVectors : inputMomentumVectors, inputVelocityVectors : inputVelocityVectors, maximumVelocityVectors : maximumVelocityVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationGradientState_batchNormalizationSourceState_inputMomentumVectors_inputVelocityVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationGradientState: MPSCNNBatchNormalizationState,
        batchNormalizationSourceState: MPSCNNBatchNormalizationState,
        inputMomentumVectors: NSArray,
        inputVelocityVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationGradientState : batchNormalizationGradientState, batchNormalizationSourceState : batchNormalizationSourceState, inputMomentumVectors : inputMomentumVectors, inputVelocityVectors : inputVelocityVectors, resultState : resultState)
    }
    unsafe fn encodeToCommandBuffer_batchNormalizationGradientState_batchNormalizationSourceState_inputMomentumVectors_inputVelocityVectors_maximumVelocityVectors_resultState_(
        &self,
        commandBuffer: *mut u64,
        batchNormalizationGradientState: MPSCNNBatchNormalizationState,
        batchNormalizationSourceState: MPSCNNBatchNormalizationState,
        inputMomentumVectors: NSArray,
        inputVelocityVectors: NSArray,
        maximumVelocityVectors: NSArray,
        resultState: MPSCNNNormalizationGammaAndBetaState,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, batchNormalizationGradientState : batchNormalizationGradientState, batchNormalizationSourceState : batchNormalizationSourceState, inputMomentumVectors : inputMomentumVectors, inputVelocityVectors : inputVelocityVectors, maximumVelocityVectors : maximumVelocityVectors, resultState : resultState)
    }
    unsafe fn beta1(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta1)
    }
    unsafe fn beta2(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta2)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn timeStep(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, timeStep)
    }
    unsafe fn setTimeStep_(&self, timeStep: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTimeStep : timeStep)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceUnary(pub id);
impl std::ops::Deref for MPSNNReduceUnary {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceUnary {}
impl MPSNNReduceUnary {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceUnary").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNReduceUnary {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNReduceUnary {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNReduceUnary, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceUnary").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceUnary(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNReduceUnary")
        }
    }
}
impl IMPSKernel for MPSNNReduceUnary {}
impl PNSCopying for MPSNNReduceUnary {}
impl PNSSecureCoding for MPSNNReduceUnary {}
impl INSObject for MPSNNReduceUnary {}
impl PNSObject for MPSNNReduceUnary {}
impl IMPSNNReduceUnary for MPSNNReduceUnary {}
pub trait IMPSNNReduceUnary: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
    unsafe fn offset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, offset)
    }
    unsafe fn setOffset_(&self, offset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOffset : offset)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceRowMin(pub id);
impl std::ops::Deref for MPSNNReduceRowMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceRowMin {}
impl MPSNNReduceRowMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceRowMin").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceRowMin {}
impl From<MPSNNReduceRowMin> for MPSNNReduceUnary {
    fn from(child: MPSNNReduceRowMin) -> MPSNNReduceUnary {
        MPSNNReduceUnary(child.0)
    }
}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceRowMin {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceRowMin, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceRowMin").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceRowMin(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceRowMin")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceRowMin {}
impl IMPSKernel for MPSNNReduceRowMin {}
impl PNSCopying for MPSNNReduceRowMin {}
impl PNSSecureCoding for MPSNNReduceRowMin {}
impl INSObject for MPSNNReduceRowMin {}
impl PNSObject for MPSNNReduceRowMin {}
impl IMPSNNReduceRowMin for MPSNNReduceRowMin {}
pub trait IMPSNNReduceRowMin: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceColumnMin(pub id);
impl std::ops::Deref for MPSNNReduceColumnMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceColumnMin {}
impl MPSNNReduceColumnMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceColumnMin").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceColumnMin {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceColumnMin {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceColumnMin, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceColumnMin").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceColumnMin(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceColumnMin")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceColumnMin {}
impl IMPSKernel for MPSNNReduceColumnMin {}
impl PNSCopying for MPSNNReduceColumnMin {}
impl PNSSecureCoding for MPSNNReduceColumnMin {}
impl INSObject for MPSNNReduceColumnMin {}
impl PNSObject for MPSNNReduceColumnMin {}
impl IMPSNNReduceColumnMin for MPSNNReduceColumnMin {}
pub trait IMPSNNReduceColumnMin: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsMin(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsMin {}
impl MPSNNReduceFeatureChannelsMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsMin").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceFeatureChannelsMin {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceFeatureChannelsMin {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceFeatureChannelsMin, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsMin").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsMin(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceFeatureChannelsMin")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceFeatureChannelsMin {}
impl IMPSKernel for MPSNNReduceFeatureChannelsMin {}
impl PNSCopying for MPSNNReduceFeatureChannelsMin {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsMin {}
impl INSObject for MPSNNReduceFeatureChannelsMin {}
impl PNSObject for MPSNNReduceFeatureChannelsMin {}
impl IMPSNNReduceFeatureChannelsMin for MPSNNReduceFeatureChannelsMin {}
pub trait IMPSNNReduceFeatureChannelsMin: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsArgumentMin(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsArgumentMin {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsArgumentMin {}
impl MPSNNReduceFeatureChannelsArgumentMin {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsArgumentMin").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceFeatureChannelsArgumentMin {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceFeatureChannelsArgumentMin {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNReduceUnary,
    ) -> Result<MPSNNReduceFeatureChannelsArgumentMin, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsArgumentMin").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsArgumentMin(parent.0))
        } else {
            Err ("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceFeatureChannelsArgumentMin" ,)
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceFeatureChannelsArgumentMin {}
impl IMPSKernel for MPSNNReduceFeatureChannelsArgumentMin {}
impl PNSCopying for MPSNNReduceFeatureChannelsArgumentMin {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsArgumentMin {}
impl INSObject for MPSNNReduceFeatureChannelsArgumentMin {}
impl PNSObject for MPSNNReduceFeatureChannelsArgumentMin {}
impl IMPSNNReduceFeatureChannelsArgumentMin for MPSNNReduceFeatureChannelsArgumentMin {}
pub trait IMPSNNReduceFeatureChannelsArgumentMin: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceRowMax(pub id);
impl std::ops::Deref for MPSNNReduceRowMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceRowMax {}
impl MPSNNReduceRowMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceRowMax").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceRowMax {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceRowMax {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceRowMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceRowMax").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceRowMax(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceRowMax")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceRowMax {}
impl IMPSKernel for MPSNNReduceRowMax {}
impl PNSCopying for MPSNNReduceRowMax {}
impl PNSSecureCoding for MPSNNReduceRowMax {}
impl INSObject for MPSNNReduceRowMax {}
impl PNSObject for MPSNNReduceRowMax {}
impl IMPSNNReduceRowMax for MPSNNReduceRowMax {}
pub trait IMPSNNReduceRowMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceColumnMax(pub id);
impl std::ops::Deref for MPSNNReduceColumnMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceColumnMax {}
impl MPSNNReduceColumnMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceColumnMax").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceColumnMax {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceColumnMax {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceColumnMax, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceColumnMax").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceColumnMax(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceColumnMax")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceColumnMax {}
impl IMPSKernel for MPSNNReduceColumnMax {}
impl PNSCopying for MPSNNReduceColumnMax {}
impl PNSSecureCoding for MPSNNReduceColumnMax {}
impl INSObject for MPSNNReduceColumnMax {}
impl PNSObject for MPSNNReduceColumnMax {}
impl IMPSNNReduceColumnMax for MPSNNReduceColumnMax {}
pub trait IMPSNNReduceColumnMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsMax(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsMax {}
impl MPSNNReduceFeatureChannelsMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsMax").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceFeatureChannelsMax {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceFeatureChannelsMax {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceFeatureChannelsMax, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsMax").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsMax(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceFeatureChannelsMax")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceFeatureChannelsMax {}
impl IMPSKernel for MPSNNReduceFeatureChannelsMax {}
impl PNSCopying for MPSNNReduceFeatureChannelsMax {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsMax {}
impl INSObject for MPSNNReduceFeatureChannelsMax {}
impl PNSObject for MPSNNReduceFeatureChannelsMax {}
impl IMPSNNReduceFeatureChannelsMax for MPSNNReduceFeatureChannelsMax {}
pub trait IMPSNNReduceFeatureChannelsMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsArgumentMax(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsArgumentMax {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsArgumentMax {}
impl MPSNNReduceFeatureChannelsArgumentMax {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsArgumentMax").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceFeatureChannelsArgumentMax {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceFeatureChannelsArgumentMax {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNReduceUnary,
    ) -> Result<MPSNNReduceFeatureChannelsArgumentMax, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsArgumentMax").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsArgumentMax(parent.0))
        } else {
            Err ("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceFeatureChannelsArgumentMax" ,)
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceFeatureChannelsArgumentMax {}
impl IMPSKernel for MPSNNReduceFeatureChannelsArgumentMax {}
impl PNSCopying for MPSNNReduceFeatureChannelsArgumentMax {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsArgumentMax {}
impl INSObject for MPSNNReduceFeatureChannelsArgumentMax {}
impl PNSObject for MPSNNReduceFeatureChannelsArgumentMax {}
impl IMPSNNReduceFeatureChannelsArgumentMax for MPSNNReduceFeatureChannelsArgumentMax {}
pub trait IMPSNNReduceFeatureChannelsArgumentMax: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceRowMean(pub id);
impl std::ops::Deref for MPSNNReduceRowMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceRowMean {}
impl MPSNNReduceRowMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceRowMean").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceRowMean {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceRowMean {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceRowMean, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceRowMean").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceRowMean(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceRowMean")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceRowMean {}
impl IMPSKernel for MPSNNReduceRowMean {}
impl PNSCopying for MPSNNReduceRowMean {}
impl PNSSecureCoding for MPSNNReduceRowMean {}
impl INSObject for MPSNNReduceRowMean {}
impl PNSObject for MPSNNReduceRowMean {}
impl IMPSNNReduceRowMean for MPSNNReduceRowMean {}
pub trait IMPSNNReduceRowMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceColumnMean(pub id);
impl std::ops::Deref for MPSNNReduceColumnMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceColumnMean {}
impl MPSNNReduceColumnMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceColumnMean").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceColumnMean {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceColumnMean {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceColumnMean, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceColumnMean").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceColumnMean(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceColumnMean")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceColumnMean {}
impl IMPSKernel for MPSNNReduceColumnMean {}
impl PNSCopying for MPSNNReduceColumnMean {}
impl PNSSecureCoding for MPSNNReduceColumnMean {}
impl INSObject for MPSNNReduceColumnMean {}
impl PNSObject for MPSNNReduceColumnMean {}
impl IMPSNNReduceColumnMean for MPSNNReduceColumnMean {}
pub trait IMPSNNReduceColumnMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsMean(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsMean {}
impl MPSNNReduceFeatureChannelsMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsMean").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceFeatureChannelsMean {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceFeatureChannelsMean {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceFeatureChannelsMean, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsMean").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsMean(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceFeatureChannelsMean")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceFeatureChannelsMean {}
impl IMPSKernel for MPSNNReduceFeatureChannelsMean {}
impl PNSCopying for MPSNNReduceFeatureChannelsMean {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsMean {}
impl INSObject for MPSNNReduceFeatureChannelsMean {}
impl PNSObject for MPSNNReduceFeatureChannelsMean {}
impl IMPSNNReduceFeatureChannelsMean for MPSNNReduceFeatureChannelsMean {}
pub trait IMPSNNReduceFeatureChannelsMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceRowSum(pub id);
impl std::ops::Deref for MPSNNReduceRowSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceRowSum {}
impl MPSNNReduceRowSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceRowSum").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceRowSum {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceRowSum {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceRowSum, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceRowSum").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceRowSum(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceRowSum")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceRowSum {}
impl IMPSKernel for MPSNNReduceRowSum {}
impl PNSCopying for MPSNNReduceRowSum {}
impl PNSSecureCoding for MPSNNReduceRowSum {}
impl INSObject for MPSNNReduceRowSum {}
impl PNSObject for MPSNNReduceRowSum {}
impl IMPSNNReduceRowSum for MPSNNReduceRowSum {}
pub trait IMPSNNReduceRowSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceColumnSum(pub id);
impl std::ops::Deref for MPSNNReduceColumnSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceColumnSum {}
impl MPSNNReduceColumnSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceColumnSum").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceColumnSum {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceColumnSum {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceColumnSum, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceColumnSum").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceColumnSum(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceColumnSum")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceColumnSum {}
impl IMPSKernel for MPSNNReduceColumnSum {}
impl PNSCopying for MPSNNReduceColumnSum {}
impl PNSSecureCoding for MPSNNReduceColumnSum {}
impl INSObject for MPSNNReduceColumnSum {}
impl PNSObject for MPSNNReduceColumnSum {}
impl IMPSNNReduceColumnSum for MPSNNReduceColumnSum {}
pub trait IMPSNNReduceColumnSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsSum(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsSum {}
impl MPSNNReduceFeatureChannelsSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsSum").unwrap(), alloc) })
    }
}
impl IMPSNNReduceUnary for MPSNNReduceFeatureChannelsSum {}
impl std::convert::TryFrom<MPSNNReduceUnary> for MPSNNReduceFeatureChannelsSum {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceUnary) -> Result<MPSNNReduceFeatureChannelsSum, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsSum").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsSum(parent.0))
        } else {
            Err("This MPSNNReduceUnary cannot be downcasted to MPSNNReduceFeatureChannelsSum")
        }
    }
}
impl IMPSCNNKernel for MPSNNReduceFeatureChannelsSum {}
impl IMPSKernel for MPSNNReduceFeatureChannelsSum {}
impl PNSCopying for MPSNNReduceFeatureChannelsSum {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsSum {}
impl INSObject for MPSNNReduceFeatureChannelsSum {}
impl PNSObject for MPSNNReduceFeatureChannelsSum {}
impl IMPSNNReduceFeatureChannelsSum for MPSNNReduceFeatureChannelsSum {}
pub trait IMPSNNReduceFeatureChannelsSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn setWeight_(&self, weight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWeight : weight)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceBinary(pub id);
impl std::ops::Deref for MPSNNReduceBinary {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceBinary {}
impl MPSNNReduceBinary {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceBinary").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryKernel for MPSNNReduceBinary {}
impl std::convert::TryFrom<MPSCNNBinaryKernel> for MPSNNReduceBinary {
    type Error = &'static str;
    fn try_from(parent: MPSCNNBinaryKernel) -> Result<MPSNNReduceBinary, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceBinary").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReduceBinary(parent.0))
        } else {
            Err("This MPSCNNBinaryKernel cannot be downcasted to MPSNNReduceBinary")
        }
    }
}
impl IMPSKernel for MPSNNReduceBinary {}
impl PNSCopying for MPSNNReduceBinary {}
impl PNSSecureCoding for MPSNNReduceBinary {}
impl INSObject for MPSNNReduceBinary {}
impl PNSObject for MPSNNReduceBinary {}
impl IMPSNNReduceBinary for MPSNNReduceBinary {}
pub trait IMPSNNReduceBinary: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn primarySourceClipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primarySourceClipRect)
    }
    unsafe fn setPrimarySourceClipRect_(&self, primarySourceClipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimarySourceClipRect : primarySourceClipRect)
    }
    unsafe fn secondarySourceClipRect(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondarySourceClipRect)
    }
    unsafe fn setSecondarySourceClipRect_(&self, secondarySourceClipRect: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondarySourceClipRect : secondarySourceClipRect)
    }
    unsafe fn primaryOffset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryOffset)
    }
    unsafe fn setPrimaryOffset_(&self, primaryOffset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryOffset : primaryOffset)
    }
    unsafe fn secondaryOffset(&self) -> MPSOffset
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryOffset)
    }
    unsafe fn setSecondaryOffset_(&self, secondaryOffset: MPSOffset)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryOffset : secondaryOffset)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsAndWeightsMean(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsAndWeightsMean {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl MPSNNReduceFeatureChannelsAndWeightsMean {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsAndWeightsMean").unwrap(), alloc) })
    }
}
impl IMPSNNReduceBinary for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl From<MPSNNReduceFeatureChannelsAndWeightsMean> for MPSNNReduceBinary {
    fn from(child: MPSNNReduceFeatureChannelsAndWeightsMean) -> MPSNNReduceBinary {
        MPSNNReduceBinary(child.0)
    }
}
impl std::convert::TryFrom<MPSNNReduceBinary> for MPSNNReduceFeatureChannelsAndWeightsMean {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNReduceBinary,
    ) -> Result<MPSNNReduceFeatureChannelsAndWeightsMean, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsAndWeightsMean").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsAndWeightsMean(parent.0))
        } else {
            Err ("This MPSNNReduceBinary cannot be downcasted to MPSNNReduceFeatureChannelsAndWeightsMean" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl IMPSKernel for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl PNSCopying for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl INSObject for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl PNSObject for MPSNNReduceFeatureChannelsAndWeightsMean {}
impl IMPSNNReduceFeatureChannelsAndWeightsMean for MPSNNReduceFeatureChannelsAndWeightsMean {}
pub trait IMPSNNReduceFeatureChannelsAndWeightsMean: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReduceFeatureChannelsAndWeightsSum(pub id);
impl std::ops::Deref for MPSNNReduceFeatureChannelsAndWeightsSum {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl MPSNNReduceFeatureChannelsAndWeightsSum {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsAndWeightsSum").unwrap(), alloc) })
    }
}
impl IMPSNNReduceBinary for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl std::convert::TryFrom<MPSNNReduceBinary> for MPSNNReduceFeatureChannelsAndWeightsSum {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNReduceBinary,
    ) -> Result<MPSNNReduceFeatureChannelsAndWeightsSum, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReduceFeatureChannelsAndWeightsSum").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReduceFeatureChannelsAndWeightsSum(parent.0))
        } else {
            Err ("This MPSNNReduceBinary cannot be downcasted to MPSNNReduceFeatureChannelsAndWeightsSum" ,)
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl IMPSKernel for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl PNSCopying for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl PNSSecureCoding for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl INSObject for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl PNSObject for MPSNNReduceFeatureChannelsAndWeightsSum {}
impl IMPSNNReduceFeatureChannelsAndWeightsSum for MPSNNReduceFeatureChannelsAndWeightsSum {}
pub trait IMPSNNReduceFeatureChannelsAndWeightsSum: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_doWeightedSumByNonZeroWeights_(
        &self,
        device: *mut u64,
        doWeightedSumByNonZeroWeights: bool,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, doWeightedSumByNonZeroWeights : doWeightedSumByNonZeroWeights)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn doWeightedSumByNonZeroWeights(&self) -> bool
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, doWeightedSumByNonZeroWeights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNLocalCorrelation(pub id);
impl std::ops::Deref for MPSNNLocalCorrelation {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNLocalCorrelation {}
impl MPSNNLocalCorrelation {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLocalCorrelation").unwrap(), alloc) })
    }
}
impl IMPSNNReduceBinary for MPSNNLocalCorrelation {}
impl std::convert::TryFrom<MPSNNReduceBinary> for MPSNNLocalCorrelation {
    type Error = &'static str;
    fn try_from(parent: MPSNNReduceBinary) -> Result<MPSNNLocalCorrelation, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNLocalCorrelation").unwrap()) };
        if is_kind_of {
            Ok(MPSNNLocalCorrelation(parent.0))
        } else {
            Err("This MPSNNReduceBinary cannot be downcasted to MPSNNLocalCorrelation")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNLocalCorrelation {}
impl IMPSKernel for MPSNNLocalCorrelation {}
impl PNSCopying for MPSNNLocalCorrelation {}
impl PNSSecureCoding for MPSNNLocalCorrelation {}
impl INSObject for MPSNNLocalCorrelation {}
impl PNSObject for MPSNNLocalCorrelation {}
impl IMPSNNLocalCorrelation for MPSNNLocalCorrelation {}
pub trait IMPSNNLocalCorrelation: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_windowInX_windowInY_strideInX_strideInY_(
        &self,
        device: *mut u64,
        windowInX: NSUInteger,
        windowInY: NSUInteger,
        strideInX: NSUInteger,
        strideInY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, windowInX : windowInX, windowInY : windowInY, strideInX : strideInX, strideInY : strideInY)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn windowInX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, windowInX)
    }
    unsafe fn setWindowInX_(&self, windowInX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWindowInX : windowInX)
    }
    unsafe fn windowInY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, windowInY)
    }
    unsafe fn setWindowInY_(&self, windowInY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWindowInY : windowInY)
    }
    unsafe fn strideInX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInX)
    }
    unsafe fn setStrideInX_(&self, strideInX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrideInX : strideInX)
    }
    unsafe fn strideInY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInY)
    }
    unsafe fn setStrideInY_(&self, strideInY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrideInY : strideInY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReshape(pub id);
impl std::ops::Deref for MPSNNReshape {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReshape {}
impl MPSNNReshape {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReshape").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNReshape {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNReshape {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNReshape, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReshape").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReshape(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNReshape")
        }
    }
}
impl IMPSKernel for MPSNNReshape {}
impl PNSCopying for MPSNNReshape {}
impl PNSSecureCoding for MPSNNReshape {}
impl INSObject for MPSNNReshape {}
impl PNSObject for MPSNNReshape {}
impl IMPSNNReshape for MPSNNReshape {}
pub trait IMPSNNReshape: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_reshapedWidth_reshapedHeight_reshapedFeatureChannels_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        reshapedWidth: NSUInteger,
        reshapedHeight: NSUInteger,
        reshapedFeatureChannels: NSUInteger,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, reshapedWidth : reshapedWidth, reshapedHeight : reshapedHeight, reshapedFeatureChannels : reshapedFeatureChannels)
    }
    unsafe fn encodeToCommandBuffer_sourceImage_destinationState_destinationStateIsTemporary_reshapedWidth_reshapedHeight_reshapedFeatureChannels_(
        &self,
        commandBuffer: *mut u64,
        sourceImage: MPSImage,
        outState: *mut MPSState,
        isTemporary: BOOL,
        reshapedWidth: NSUInteger,
        reshapedHeight: NSUInteger,
        reshapedFeatureChannels: NSUInteger,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImage : sourceImage, destinationState : outState, destinationStateIsTemporary : isTemporary, reshapedWidth : reshapedWidth, reshapedHeight : reshapedHeight, reshapedFeatureChannels : reshapedFeatureChannels)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_reshapedWidth_reshapedHeight_reshapedFeatureChannels_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        reshapedWidth: NSUInteger,
        reshapedHeight: NSUInteger,
        reshapedFeatureChannels: NSUInteger,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, reshapedWidth : reshapedWidth, reshapedHeight : reshapedHeight, reshapedFeatureChannels : reshapedFeatureChannels)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_destinationStates_destinationStateIsTemporary_reshapedWidth_reshapedHeight_reshapedFeatureChannels_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        outStates: *mut *mut MPSStateBatch,
        isTemporary: BOOL,
        reshapedWidth: NSUInteger,
        reshapedHeight: NSUInteger,
        reshapedFeatureChannels: NSUInteger,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, destinationStates : outStates, destinationStateIsTemporary : isTemporary, reshapedWidth : reshapedWidth, reshapedHeight : reshapedHeight, reshapedFeatureChannels : reshapedFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReshapeGradient(pub id);
impl std::ops::Deref for MPSNNReshapeGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReshapeGradient {}
impl MPSNNReshapeGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReshapeGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSNNReshapeGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSNNReshapeGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSNNReshapeGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReshapeGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReshapeGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSNNReshapeGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNReshapeGradient {}
impl IMPSKernel for MPSNNReshapeGradient {}
impl PNSCopying for MPSNNReshapeGradient {}
impl PNSSecureCoding for MPSNNReshapeGradient {}
impl INSObject for MPSNNReshapeGradient {}
impl PNSObject for MPSNNReshapeGradient {}
impl IMPSNNReshapeGradient for MPSNNReshapeGradient {}
pub trait IMPSNNReshapeGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNPad(pub id);
impl std::ops::Deref for MPSNNPad {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNPad {}
impl MPSNNPad {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNPad").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNPad {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNPad {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNPad, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNPad").unwrap()) };
        if is_kind_of {
            Ok(MPSNNPad(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNPad")
        }
    }
}
impl IMPSKernel for MPSNNPad {}
impl PNSCopying for MPSNNPad {}
impl PNSSecureCoding for MPSNNPad {}
impl INSObject for MPSNNPad {}
impl PNSObject for MPSNNPad {}
impl IMPSNNPad for MPSNNPad {}
pub trait IMPSNNPad: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_paddingSizeBefore_paddingSizeAfter_(
        &self,
        device: *mut u64,
        paddingSizeBefore: MPSImageCoordinate,
        paddingSizeAfter: MPSImageCoordinate,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, paddingSizeBefore : paddingSizeBefore, paddingSizeAfter : paddingSizeAfter)
    }
    unsafe fn initWithDevice_paddingSizeBefore_paddingSizeAfter_fillValueArray_(
        &self,
        device: *mut u64,
        paddingSizeBefore: MPSImageCoordinate,
        paddingSizeAfter: MPSImageCoordinate,
        fillValueArray: NSData,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, paddingSizeBefore : paddingSizeBefore, paddingSizeAfter : paddingSizeAfter, fillValueArray : fillValueArray)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn paddingSizeBefore(&self) -> MPSImageCoordinate
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, paddingSizeBefore)
    }
    unsafe fn setPaddingSizeBefore_(&self, paddingSizeBefore: MPSImageCoordinate)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPaddingSizeBefore : paddingSizeBefore)
    }
    unsafe fn paddingSizeAfter(&self) -> MPSImageCoordinate
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, paddingSizeAfter)
    }
    unsafe fn setPaddingSizeAfter_(&self, paddingSizeAfter: MPSImageCoordinate)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPaddingSizeAfter : paddingSizeAfter)
    }
    unsafe fn fillValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, fillValue)
    }
    unsafe fn setFillValue_(&self, fillValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFillValue : fillValue)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNPadGradient(pub id);
impl std::ops::Deref for MPSNNPadGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNPadGradient {}
impl MPSNNPadGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNPadGradient").unwrap(), alloc) })
    }
}
impl IMPSCNNGradientKernel for MPSNNPadGradient {}
impl std::convert::TryFrom<MPSCNNGradientKernel> for MPSNNPadGradient {
    type Error = &'static str;
    fn try_from(parent: MPSCNNGradientKernel) -> Result<MPSNNPadGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNPadGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSNNPadGradient(parent.0))
        } else {
            Err("This MPSCNNGradientKernel cannot be downcasted to MPSNNPadGradient")
        }
    }
}
impl IMPSCNNBinaryKernel for MPSNNPadGradient {}
impl IMPSKernel for MPSNNPadGradient {}
impl PNSCopying for MPSNNPadGradient {}
impl PNSSecureCoding for MPSNNPadGradient {}
impl INSObject for MPSNNPadGradient {}
impl PNSObject for MPSNNPadGradient {}
impl IMPSNNPadGradient for MPSNNPadGradient {}
pub trait IMPSNNPadGradient: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNResizeBilinear(pub id);
impl std::ops::Deref for MPSNNResizeBilinear {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNResizeBilinear {}
impl MPSNNResizeBilinear {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNResizeBilinear").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNResizeBilinear {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNResizeBilinear {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNResizeBilinear, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNResizeBilinear").unwrap()) };
        if is_kind_of {
            Ok(MPSNNResizeBilinear(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNResizeBilinear")
        }
    }
}
impl IMPSKernel for MPSNNResizeBilinear {}
impl PNSCopying for MPSNNResizeBilinear {}
impl PNSSecureCoding for MPSNNResizeBilinear {}
impl INSObject for MPSNNResizeBilinear {}
impl PNSObject for MPSNNResizeBilinear {}
impl IMPSNNResizeBilinear for MPSNNResizeBilinear {}
pub trait IMPSNNResizeBilinear: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_resizeWidth_resizeHeight_alignCorners_(
        &self,
        device: *mut u64,
        resizeWidth: NSUInteger,
        resizeHeight: NSUInteger,
        alignCorners: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resizeWidth : resizeWidth, resizeHeight : resizeHeight, alignCorners : alignCorners)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn resizeWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resizeWidth)
    }
    unsafe fn resizeHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resizeHeight)
    }
    unsafe fn alignCorners(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alignCorners)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNCropAndResizeBilinear(pub id);
impl std::ops::Deref for MPSNNCropAndResizeBilinear {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNCropAndResizeBilinear {}
impl MPSNNCropAndResizeBilinear {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNCropAndResizeBilinear").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNCropAndResizeBilinear {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNCropAndResizeBilinear {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNCropAndResizeBilinear, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNCropAndResizeBilinear").unwrap()) };
        if is_kind_of {
            Ok(MPSNNCropAndResizeBilinear(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNCropAndResizeBilinear")
        }
    }
}
impl IMPSKernel for MPSNNCropAndResizeBilinear {}
impl PNSCopying for MPSNNCropAndResizeBilinear {}
impl PNSSecureCoding for MPSNNCropAndResizeBilinear {}
impl INSObject for MPSNNCropAndResizeBilinear {}
impl PNSObject for MPSNNCropAndResizeBilinear {}
impl IMPSNNCropAndResizeBilinear for MPSNNCropAndResizeBilinear {}
pub trait IMPSNNCropAndResizeBilinear: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_resizeWidth_resizeHeight_numberOfRegions_regions_(
        &self,
        device: *mut u64,
        resizeWidth: NSUInteger,
        resizeHeight: NSUInteger,
        numberOfRegions: NSUInteger,
        regions: *const MPSRegion,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resizeWidth : resizeWidth, resizeHeight : resizeHeight, numberOfRegions : numberOfRegions, regions : regions)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn resizeWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resizeWidth)
    }
    unsafe fn resizeHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resizeHeight)
    }
    unsafe fn numberOfRegions(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfRegions)
    }
    unsafe fn regions(&self) -> *const MPSRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, regions)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNSlice(pub id);
impl std::ops::Deref for MPSNNSlice {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNSlice {}
impl MPSNNSlice {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNSlice").unwrap(), alloc) })
    }
}
impl IMPSCNNKernel for MPSNNSlice {}
impl std::convert::TryFrom<MPSCNNKernel> for MPSNNSlice {
    type Error = &'static str;
    fn try_from(parent: MPSCNNKernel) -> Result<MPSNNSlice, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNSlice").unwrap()) };
        if is_kind_of {
            Ok(MPSNNSlice(parent.0))
        } else {
            Err("This MPSCNNKernel cannot be downcasted to MPSNNSlice")
        }
    }
}
impl IMPSKernel for MPSNNSlice {}
impl PNSCopying for MPSNNSlice {}
impl PNSSecureCoding for MPSNNSlice {}
impl INSObject for MPSNNSlice {}
impl PNSObject for MPSNNSlice {}
impl IMPSNNSlice for MPSNNSlice {}
pub trait IMPSNNSlice: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
}
pub trait PMPSHandle: Sized + std::ops::Deref {
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
}
pub trait PMPSNNTrainableNode: Sized + std::ops::Deref {
    unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, trainingStyle)
    }
    unsafe fn setTrainingStyle_(&self, trainingStyle: MPSNNTrainingStyle)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTrainingStyle : trainingStyle)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNImageNode(pub id);
impl std::ops::Deref for MPSNNImageNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNImageNode {}
impl MPSNNImageNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNImageNode").unwrap(), alloc) })
    }
}
impl INSObject for MPSNNImageNode {}
impl PNSObject for MPSNNImageNode {}
impl std::convert::TryFrom<NSObject> for MPSNNImageNode {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNNImageNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNImageNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNImageNode(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNNImageNode")
        }
    }
}
impl IMPSNNImageNode for MPSNNImageNode {}
pub trait IMPSNNImageNode: Sized + std::ops::Deref {
    unsafe fn initWithHandle_(&self, handle: NSObject) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithHandle : handle)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn handle(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, handle)
    }
    unsafe fn setHandle_(&self, handle: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHandle : handle)
    }
    unsafe fn format(&self) -> MPSImageFeatureChannelFormat
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, format)
    }
    unsafe fn setFormat_(&self, format: MPSImageFeatureChannelFormat)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFormat : format)
    }
    unsafe fn imageAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, imageAllocator)
    }
    unsafe fn setImageAllocator_(&self, imageAllocator: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setImageAllocator : imageAllocator)
    }
    unsafe fn exportFromGraph(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, exportFromGraph)
    }
    unsafe fn setExportFromGraph_(&self, exportFromGraph: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setExportFromGraph : exportFromGraph)
    }
    unsafe fn synchronizeResource(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, synchronizeResource)
    }
    unsafe fn setSynchronizeResource_(&self, synchronizeResource: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSynchronizeResource : synchronizeResource)
    }
    unsafe fn stopGradient(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, stopGradient)
    }
    unsafe fn setStopGradient_(&self, stopGradient: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStopGradient : stopGradient)
    }
    unsafe fn nodeWithHandle_(handle: NSObject) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNImageNode").unwrap(), nodeWithHandle : handle)
    }
    unsafe fn exportedNodeWithHandle_(handle: NSObject) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNImageNode").unwrap(), exportedNodeWithHandle : handle)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNStateNode(pub id);
impl std::ops::Deref for MPSNNStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNStateNode {}
impl MPSNNStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNStateNode").unwrap(), alloc) })
    }
}
impl INSObject for MPSNNStateNode {}
impl PNSObject for MPSNNStateNode {}
impl std::convert::TryFrom<NSObject> for MPSNNStateNode {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNNStateNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNStateNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNStateNode(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNNStateNode")
        }
    }
}
impl IMPSNNStateNode for MPSNNStateNode {}
pub trait IMPSNNStateNode: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn handle(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, handle)
    }
    unsafe fn setHandle_(&self, handle: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHandle : handle)
    }
    unsafe fn exportFromGraph(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, exportFromGraph)
    }
    unsafe fn setExportFromGraph_(&self, exportFromGraph: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setExportFromGraph : exportFromGraph)
    }
    unsafe fn synchronizeResource(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, synchronizeResource)
    }
    unsafe fn setSynchronizeResource_(&self, synchronizeResource: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSynchronizeResource : synchronizeResource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGradientStateNode(pub id);
impl std::ops::Deref for MPSNNGradientStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGradientStateNode {}
impl MPSNNGradientStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGradientStateNode").unwrap(), alloc) })
    }
}
impl IMPSNNStateNode for MPSNNGradientStateNode {}
impl From<MPSNNGradientStateNode> for MPSNNStateNode {
    fn from(child: MPSNNGradientStateNode) -> MPSNNStateNode {
        MPSNNStateNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNStateNode> for MPSNNGradientStateNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNStateNode) -> Result<MPSNNGradientStateNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGradientStateNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNGradientStateNode(parent.0))
        } else {
            Err("This MPSNNStateNode cannot be downcasted to MPSNNGradientStateNode")
        }
    }
}
impl INSObject for MPSNNGradientStateNode {}
impl PNSObject for MPSNNGradientStateNode {}
impl IMPSNNGradientStateNode for MPSNNGradientStateNode {}
pub trait IMPSNNGradientStateNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionGradientStateNode(pub id);
impl std::ops::Deref for MPSCNNConvolutionGradientStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionGradientStateNode {}
impl MPSCNNConvolutionGradientStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientStateNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientStateNode for MPSCNNConvolutionGradientStateNode {}
impl From<MPSCNNConvolutionGradientStateNode> for MPSNNGradientStateNode {
    fn from(child: MPSCNNConvolutionGradientStateNode) -> MPSNNGradientStateNode {
        MPSNNGradientStateNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNGradientStateNode> for MPSCNNConvolutionGradientStateNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientStateNode,
    ) -> Result<MPSCNNConvolutionGradientStateNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientStateNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionGradientStateNode(parent.0))
        } else {
            Err ("This MPSNNGradientStateNode cannot be downcasted to MPSCNNConvolutionGradientStateNode" ,)
        }
    }
}
impl IMPSNNStateNode for MPSCNNConvolutionGradientStateNode {}
impl INSObject for MPSCNNConvolutionGradientStateNode {}
impl PNSObject for MPSCNNConvolutionGradientStateNode {}
impl IMPSCNNConvolutionGradientStateNode for MPSCNNConvolutionGradientStateNode {}
pub trait IMPSCNNConvolutionGradientStateNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionTransposeGradientStateNode(pub id);
impl std::ops::Deref for MPSCNNConvolutionTransposeGradientStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionTransposeGradientStateNode {}
impl MPSCNNConvolutionTransposeGradientStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientStateNode").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionGradientStateNode for MPSCNNConvolutionTransposeGradientStateNode {}
impl From<MPSCNNConvolutionTransposeGradientStateNode> for MPSCNNConvolutionGradientStateNode {
    fn from(
        child: MPSCNNConvolutionTransposeGradientStateNode,
    ) -> MPSCNNConvolutionGradientStateNode {
        MPSCNNConvolutionGradientStateNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolutionGradientStateNode>
    for MPSCNNConvolutionTransposeGradientStateNode
{
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionGradientStateNode,
    ) -> Result<MPSCNNConvolutionTransposeGradientStateNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientStateNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionTransposeGradientStateNode(parent.0))
        } else {
            Err ("This MPSCNNConvolutionGradientStateNode cannot be downcasted to MPSCNNConvolutionTransposeGradientStateNode" ,)
        }
    }
}
impl IMPSNNGradientStateNode for MPSCNNConvolutionTransposeGradientStateNode {}
impl IMPSNNStateNode for MPSCNNConvolutionTransposeGradientStateNode {}
impl INSObject for MPSCNNConvolutionTransposeGradientStateNode {}
impl PNSObject for MPSCNNConvolutionTransposeGradientStateNode {}
impl IMPSCNNConvolutionTransposeGradientStateNode for MPSCNNConvolutionTransposeGradientStateNode {}
pub trait IMPSCNNConvolutionTransposeGradientStateNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNBinaryGradientStateNode(pub id);
impl std::ops::Deref for MPSNNBinaryGradientStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNBinaryGradientStateNode {}
impl MPSNNBinaryGradientStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNBinaryGradientStateNode").unwrap(), alloc) })
    }
}
impl IMPSNNStateNode for MPSNNBinaryGradientStateNode {}
impl std::convert::TryFrom<MPSNNStateNode> for MPSNNBinaryGradientStateNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNStateNode) -> Result<MPSNNBinaryGradientStateNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNBinaryGradientStateNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNBinaryGradientStateNode(parent.0))
        } else {
            Err("This MPSNNStateNode cannot be downcasted to MPSNNBinaryGradientStateNode")
        }
    }
}
impl INSObject for MPSNNBinaryGradientStateNode {}
impl PNSObject for MPSNNBinaryGradientStateNode {}
impl IMPSNNBinaryGradientStateNode for MPSNNBinaryGradientStateNode {}
pub trait IMPSNNBinaryGradientStateNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNMultiaryGradientStateNode(pub id);
impl std::ops::Deref for MPSNNMultiaryGradientStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNMultiaryGradientStateNode {}
impl MPSNNMultiaryGradientStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNMultiaryGradientStateNode").unwrap(), alloc) })
    }
}
impl IMPSNNStateNode for MPSNNMultiaryGradientStateNode {}
impl std::convert::TryFrom<MPSNNStateNode> for MPSNNMultiaryGradientStateNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNStateNode) -> Result<MPSNNMultiaryGradientStateNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNMultiaryGradientStateNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNMultiaryGradientStateNode(parent.0))
        } else {
            Err("This MPSNNStateNode cannot be downcasted to MPSNNMultiaryGradientStateNode")
        }
    }
}
impl INSObject for MPSNNMultiaryGradientStateNode {}
impl PNSObject for MPSNNMultiaryGradientStateNode {}
impl IMPSNNMultiaryGradientStateNode for MPSNNMultiaryGradientStateNode {}
pub trait IMPSNNMultiaryGradientStateNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNArithmeticGradientStateNode(pub id);
impl std::ops::Deref for MPSNNArithmeticGradientStateNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNArithmeticGradientStateNode {}
impl MPSNNArithmeticGradientStateNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNArithmeticGradientStateNode").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryGradientStateNode for MPSNNArithmeticGradientStateNode {}
impl From<MPSNNArithmeticGradientStateNode> for MPSNNBinaryGradientStateNode {
    fn from(child: MPSNNArithmeticGradientStateNode) -> MPSNNBinaryGradientStateNode {
        MPSNNBinaryGradientStateNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNBinaryGradientStateNode> for MPSNNArithmeticGradientStateNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNBinaryGradientStateNode,
    ) -> Result<MPSNNArithmeticGradientStateNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNArithmeticGradientStateNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNArithmeticGradientStateNode(parent.0))
        } else {
            Err ("This MPSNNBinaryGradientStateNode cannot be downcasted to MPSNNArithmeticGradientStateNode" ,)
        }
    }
}
impl IMPSNNStateNode for MPSNNArithmeticGradientStateNode {}
impl INSObject for MPSNNArithmeticGradientStateNode {}
impl PNSObject for MPSNNArithmeticGradientStateNode {}
impl IMPSNNArithmeticGradientStateNode for MPSNNArithmeticGradientStateNode {}
pub trait IMPSNNArithmeticGradientStateNode: Sized + std::ops::Deref {}
pub type MPSGradientNodeBlock = *mut ::std::os::raw::c_void;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNFilterNode(pub id);
impl std::ops::Deref for MPSNNFilterNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNFilterNode {}
impl MPSNNFilterNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNFilterNode").unwrap(), alloc) })
    }
}
impl INSObject for MPSNNFilterNode {}
impl PNSObject for MPSNNFilterNode {}
impl std::convert::TryFrom<NSObject> for MPSNNFilterNode {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNNFilterNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNFilterNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNFilterNode(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNNFilterNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNFilterNode {}
pub trait IMPSNNFilterNode: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn gradientFilterWithSource_(
        &self,
        gradientImage: MPSNNImageNode,
    ) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSource : gradientImage)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn gradientFiltersWithSources_(&self, gradientImages: NSArray) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSources : gradientImages)
    }
    unsafe fn gradientFiltersWithSource_(&self, gradientImage: MPSNNImageNode) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSource : gradientImage)
    }
    unsafe fn trainingGraphWithSourceGradient_nodeHandler_(
        &self,
        gradientImage: MPSNNImageNode,
        nodeHandler: MPSGradientNodeBlock,
    ) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, trainingGraphWithSourceGradient : gradientImage, nodeHandler : nodeHandler)
    }
    unsafe fn resultImage(&self) -> MPSNNImageNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultImage)
    }
    unsafe fn resultState(&self) -> MPSNNStateNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultState)
    }
    unsafe fn resultStates(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultStates)
    }
    unsafe fn paddingPolicy(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, paddingPolicy)
    }
    unsafe fn setPaddingPolicy_(&self, paddingPolicy: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPaddingPolicy : paddingPolicy)
    }
    unsafe fn label(&self) -> NSString
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, label)
    }
    unsafe fn setLabel_(&self, label: NSString)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLabel : label)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGradientFilterNode(pub id);
impl std::ops::Deref for MPSNNGradientFilterNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGradientFilterNode {}
impl MPSNNGradientFilterNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGradientFilterNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNGradientFilterNode {}
impl From<MPSNNGradientFilterNode> for MPSNNFilterNode {
    fn from(child: MPSNNGradientFilterNode) -> MPSNNFilterNode {
        MPSNNFilterNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNGradientFilterNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNGradientFilterNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGradientFilterNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNGradientFilterNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNGradientFilterNode")
        }
    }
}
impl INSObject for MPSNNGradientFilterNode {}
impl PNSObject for MPSNNGradientFilterNode {}
impl IMPSNNGradientFilterNode for MPSNNGradientFilterNode {}
pub trait IMPSNNGradientFilterNode: Sized + std::ops::Deref {
    unsafe fn gradientFilterWithSources_(&self, sourceGradient: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : sourceGradient)
    }
    unsafe fn gradientFiltersWithSources_(&self, sourceGradient: NSArray) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSources : sourceGradient)
    }
    unsafe fn gradientFilterWithSource_(
        &self,
        sourceGradient: MPSNNImageNode,
    ) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSource : sourceGradient)
    }
    unsafe fn gradientFiltersWithSource_(&self, sourceGradient: MPSNNImageNode) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSource : sourceGradient)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionNode(pub id);
impl std::ops::Deref for MPSCNNConvolutionNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionNode {}
impl MPSCNNConvolutionNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNConvolutionNode {}
impl IMPSNNFilterNode for MPSCNNConvolutionNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNConvolutionNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNConvolutionNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNConvolutionNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNConvolutionNode")
        }
    }
}
impl INSObject for MPSCNNConvolutionNode {}
impl PNSObject for MPSCNNConvolutionNode {}
impl IMPSCNNConvolutionNode for MPSCNNConvolutionNode {}
pub trait IMPSCNNConvolutionNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_weights_(
        &self,
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, weights : weights)
    }
    unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, trainingStyle)
    }
    unsafe fn setTrainingStyle_(&self, trainingStyle: MPSNNTrainingStyle)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTrainingStyle : trainingStyle)
    }
    unsafe fn accumulatorPrecision(&self) -> MPSNNConvolutionAccumulatorPrecisionOption
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, accumulatorPrecision)
    }
    unsafe fn setAccumulatorPrecision_(
        &self,
        accumulatorPrecision: MPSNNConvolutionAccumulatorPrecisionOption,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAccumulatorPrecision : accumulatorPrecision)
    }
    unsafe fn convolutionGradientState(&self) -> MPSCNNConvolutionGradientStateNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, convolutionGradientState)
    }
    unsafe fn nodeWithSource_weights_(sourceNode: MPSNNImageNode, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionNode").unwrap(), nodeWithSource : sourceNode, weights : weights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNFullyConnectedNode(pub id);
impl std::ops::Deref for MPSCNNFullyConnectedNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNFullyConnectedNode {}
impl MPSCNNFullyConnectedNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedNode").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionNode for MPSCNNFullyConnectedNode {}
impl PMPSNNTrainableNode for MPSCNNFullyConnectedNode {}
impl From<MPSCNNFullyConnectedNode> for MPSCNNConvolutionNode {
    fn from(child: MPSCNNFullyConnectedNode) -> MPSCNNConvolutionNode {
        MPSCNNConvolutionNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolutionNode> for MPSCNNFullyConnectedNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNConvolutionNode) -> Result<MPSCNNFullyConnectedNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNFullyConnectedNode(parent.0))
        } else {
            Err("This MPSCNNConvolutionNode cannot be downcasted to MPSCNNFullyConnectedNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNFullyConnectedNode {}
impl INSObject for MPSCNNFullyConnectedNode {}
impl PNSObject for MPSCNNFullyConnectedNode {}
impl IMPSCNNFullyConnectedNode for MPSCNNFullyConnectedNode {}
pub trait IMPSCNNFullyConnectedNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_weights_(
        &self,
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, weights : weights)
    }
    unsafe fn nodeWithSource_weights_(sourceNode: MPSNNImageNode, weights: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedNode").unwrap(), nodeWithSource : sourceNode, weights : weights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBinaryConvolutionNode(pub id);
impl std::ops::Deref for MPSCNNBinaryConvolutionNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBinaryConvolutionNode {}
impl MPSCNNBinaryConvolutionNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryConvolutionNode").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionNode for MPSCNNBinaryConvolutionNode {}
impl PMPSNNTrainableNode for MPSCNNBinaryConvolutionNode {}
impl std::convert::TryFrom<MPSCNNConvolutionNode> for MPSCNNBinaryConvolutionNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNConvolutionNode) -> Result<MPSCNNBinaryConvolutionNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBinaryConvolutionNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNBinaryConvolutionNode(parent.0))
        } else {
            Err("This MPSCNNConvolutionNode cannot be downcasted to MPSCNNBinaryConvolutionNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNBinaryConvolutionNode {}
impl INSObject for MPSCNNBinaryConvolutionNode {}
impl PNSObject for MPSCNNBinaryConvolutionNode {}
impl IMPSCNNBinaryConvolutionNode for MPSCNNBinaryConvolutionNode {}
pub trait IMPSCNNBinaryConvolutionNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_weights_scaleValue_type_flags_(
        &self,
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        scaleValue: f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, weights : weights, scaleValue : scaleValue, r#type : type_, flags : flags)
    }
    unsafe fn initWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags_(
        &self,
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        outputBiasTerms: *const f32,
        outputScaleTerms: *const f32,
        inputBiasTerms: *const f32,
        inputScaleTerms: *const f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, weights : weights, outputBiasTerms : outputBiasTerms, outputScaleTerms : outputScaleTerms, inputBiasTerms : inputBiasTerms, inputScaleTerms : inputScaleTerms, r#type : type_, flags : flags)
    }
    unsafe fn convolutionGradientState(&self) -> MPSCNNConvolutionGradientStateNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, convolutionGradientState)
    }
    unsafe fn nodeWithSource_weights_scaleValue_type_flags_(
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        scaleValue: f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryConvolutionNode").unwrap(), nodeWithSource : sourceNode, weights : weights, scaleValue : scaleValue, r#type : type_, flags : flags)
    }
    unsafe fn nodeWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags_(
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        outputBiasTerms: *const f32,
        outputScaleTerms: *const f32,
        inputBiasTerms: *const f32,
        inputScaleTerms: *const f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryConvolutionNode").unwrap(), nodeWithSource : sourceNode, weights : weights, outputBiasTerms : outputBiasTerms, outputScaleTerms : outputScaleTerms, inputBiasTerms : inputBiasTerms, inputScaleTerms : inputScaleTerms, r#type : type_, flags : flags)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBinaryFullyConnectedNode(pub id);
impl std::ops::Deref for MPSCNNBinaryFullyConnectedNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBinaryFullyConnectedNode {}
impl MPSCNNBinaryFullyConnectedNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryFullyConnectedNode").unwrap(), alloc) })
    }
}
impl IMPSCNNBinaryConvolutionNode for MPSCNNBinaryFullyConnectedNode {}
impl From<MPSCNNBinaryFullyConnectedNode> for MPSCNNBinaryConvolutionNode {
    fn from(child: MPSCNNBinaryFullyConnectedNode) -> MPSCNNBinaryConvolutionNode {
        MPSCNNBinaryConvolutionNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNBinaryConvolutionNode> for MPSCNNBinaryFullyConnectedNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNBinaryConvolutionNode,
    ) -> Result<MPSCNNBinaryFullyConnectedNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBinaryFullyConnectedNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNBinaryFullyConnectedNode(parent.0))
        } else {
            Err ("This MPSCNNBinaryConvolutionNode cannot be downcasted to MPSCNNBinaryFullyConnectedNode" ,)
        }
    }
}
impl IMPSCNNConvolutionNode for MPSCNNBinaryFullyConnectedNode {}
impl PMPSNNTrainableNode for MPSCNNBinaryFullyConnectedNode {}
impl IMPSNNFilterNode for MPSCNNBinaryFullyConnectedNode {}
impl INSObject for MPSCNNBinaryFullyConnectedNode {}
impl PNSObject for MPSCNNBinaryFullyConnectedNode {}
impl IMPSCNNBinaryFullyConnectedNode for MPSCNNBinaryFullyConnectedNode {}
pub trait IMPSCNNBinaryFullyConnectedNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_weights_scaleValue_type_flags_(
        &self,
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        scaleValue: f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, weights : weights, scaleValue : scaleValue, r#type : type_, flags : flags)
    }
    unsafe fn initWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags_(
        &self,
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        outputBiasTerms: *const f32,
        outputScaleTerms: *const f32,
        inputBiasTerms: *const f32,
        inputScaleTerms: *const f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, weights : weights, outputBiasTerms : outputBiasTerms, outputScaleTerms : outputScaleTerms, inputBiasTerms : inputBiasTerms, inputScaleTerms : inputScaleTerms, r#type : type_, flags : flags)
    }
    unsafe fn nodeWithSource_weights_scaleValue_type_flags_(
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        scaleValue: f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryFullyConnectedNode").unwrap(), nodeWithSource : sourceNode, weights : weights, scaleValue : scaleValue, r#type : type_, flags : flags)
    }
    unsafe fn nodeWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags_(
        sourceNode: MPSNNImageNode,
        weights: *mut u64,
        outputBiasTerms: *const f32,
        outputScaleTerms: *const f32,
        inputBiasTerms: *const f32,
        inputScaleTerms: *const f32,
        type_: MPSCNNBinaryConvolutionType,
        flags: MPSCNNBinaryConvolutionFlags,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBinaryFullyConnectedNode").unwrap(), nodeWithSource : sourceNode, weights : weights, outputBiasTerms : outputBiasTerms, outputScaleTerms : outputScaleTerms, inputBiasTerms : inputBiasTerms, inputScaleTerms : inputScaleTerms, r#type : type_, flags : flags)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionTransposeNode(pub id);
impl std::ops::Deref for MPSCNNConvolutionTransposeNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionTransposeNode {}
impl MPSCNNConvolutionTransposeNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeNode").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionNode for MPSCNNConvolutionTransposeNode {}
impl PMPSNNTrainableNode for MPSCNNConvolutionTransposeNode {}
impl std::convert::TryFrom<MPSCNNConvolutionNode> for MPSCNNConvolutionTransposeNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionNode,
    ) -> Result<MPSCNNConvolutionTransposeNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionTransposeNode(parent.0))
        } else {
            Err("This MPSCNNConvolutionNode cannot be downcasted to MPSCNNConvolutionTransposeNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNConvolutionTransposeNode {}
impl INSObject for MPSCNNConvolutionTransposeNode {}
impl PNSObject for MPSCNNConvolutionTransposeNode {}
impl IMPSCNNConvolutionTransposeNode for MPSCNNConvolutionTransposeNode {}
pub trait IMPSCNNConvolutionTransposeNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_convolutionGradientState_weights_(
        &self,
        sourceNode: MPSNNImageNode,
        convolutionGradientState: MPSCNNConvolutionGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, convolutionGradientState : convolutionGradientState, weights : weights)
    }
    unsafe fn convolutionGradientState(&self) -> MPSCNNConvolutionGradientStateNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, convolutionGradientState)
    }
    unsafe fn nodeWithSource_convolutionGradientState_weights_(
        sourceNode: MPSNNImageNode,
        convolutionGradientState: MPSCNNConvolutionGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeNode").unwrap(), nodeWithSource : sourceNode, convolutionGradientState : convolutionGradientState, weights : weights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionGradientNode(pub id);
impl std::ops::Deref for MPSCNNConvolutionGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionGradientNode {}
impl MPSCNNConvolutionGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNConvolutionGradientNode {}
impl IMPSNNGradientFilterNode for MPSCNNConvolutionGradientNode {}
impl From<MPSCNNConvolutionGradientNode> for MPSNNGradientFilterNode {
    fn from(child: MPSCNNConvolutionGradientNode) -> MPSNNGradientFilterNode {
        MPSNNGradientFilterNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNConvolutionGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNConvolutionGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNConvolutionGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNConvolutionGradientNode {}
impl INSObject for MPSCNNConvolutionGradientNode {}
impl PNSObject for MPSCNNConvolutionGradientNode {}
impl IMPSCNNConvolutionGradientNode for MPSCNNConvolutionGradientNode {}
pub trait IMPSCNNConvolutionGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_convolutionGradientState_weights_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSCNNConvolutionGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, convolutionGradientState : gradientState, weights : weights)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_convolutionGradientState_weights_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSCNNConvolutionGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, convolutionGradientState : gradientState, weights : weights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNFullyConnectedGradientNode(pub id);
impl std::ops::Deref for MPSCNNFullyConnectedGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNFullyConnectedGradientNode {}
impl MPSCNNFullyConnectedGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedGradientNode").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionGradientNode for MPSCNNFullyConnectedGradientNode {}
impl PMPSNNTrainableNode for MPSCNNFullyConnectedGradientNode {}
impl From<MPSCNNFullyConnectedGradientNode> for MPSCNNConvolutionGradientNode {
    fn from(child: MPSCNNFullyConnectedGradientNode) -> MPSCNNConvolutionGradientNode {
        MPSCNNConvolutionGradientNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNConvolutionGradientNode> for MPSCNNFullyConnectedGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionGradientNode,
    ) -> Result<MPSCNNFullyConnectedGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNFullyConnectedGradientNode(parent.0))
        } else {
            Err ("This MPSCNNConvolutionGradientNode cannot be downcasted to MPSCNNFullyConnectedGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSCNNFullyConnectedGradientNode {}
impl IMPSNNFilterNode for MPSCNNFullyConnectedGradientNode {}
impl INSObject for MPSCNNFullyConnectedGradientNode {}
impl PNSObject for MPSCNNFullyConnectedGradientNode {}
impl IMPSCNNFullyConnectedGradientNode for MPSCNNFullyConnectedGradientNode {}
pub trait IMPSCNNFullyConnectedGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_convolutionGradientState_weights_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSCNNConvolutionGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, convolutionGradientState : gradientState, weights : weights)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_convolutionGradientState_weights_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSCNNConvolutionGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNFullyConnectedGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, convolutionGradientState : gradientState, weights : weights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNConvolutionTransposeGradientNode(pub id);
impl std::ops::Deref for MPSCNNConvolutionTransposeGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNConvolutionTransposeGradientNode {}
impl MPSCNNConvolutionTransposeGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientNode").unwrap(), alloc) })
    }
}
impl IMPSCNNConvolutionGradientNode for MPSCNNConvolutionTransposeGradientNode {}
impl PMPSNNTrainableNode for MPSCNNConvolutionTransposeGradientNode {}
impl std::convert::TryFrom<MPSCNNConvolutionGradientNode>
    for MPSCNNConvolutionTransposeGradientNode
{
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNConvolutionGradientNode,
    ) -> Result<MPSCNNConvolutionTransposeGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNConvolutionTransposeGradientNode(parent.0))
        } else {
            Err ("This MPSCNNConvolutionGradientNode cannot be downcasted to MPSCNNConvolutionTransposeGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSCNNConvolutionTransposeGradientNode {}
impl IMPSNNFilterNode for MPSCNNConvolutionTransposeGradientNode {}
impl INSObject for MPSCNNConvolutionTransposeGradientNode {}
impl PNSObject for MPSCNNConvolutionTransposeGradientNode {}
impl IMPSCNNConvolutionTransposeGradientNode for MPSCNNConvolutionTransposeGradientNode {}
pub trait IMPSCNNConvolutionTransposeGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_convolutionTransposeGradientState_weights_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSCNNConvolutionTransposeGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, convolutionTransposeGradientState : gradientState, weights : weights)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_convolutionTransposeGradientState_weights_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSCNNConvolutionTransposeGradientStateNode,
        weights: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNConvolutionTransposeGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, convolutionTransposeGradientState : gradientState, weights : weights)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronNode(pub id);
impl std::ops::Deref for MPSCNNNeuronNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronNode {}
impl MPSCNNNeuronNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNNeuronNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNNeuronNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNNeuronNode")
        }
    }
}
impl INSObject for MPSCNNNeuronNode {}
impl PNSObject for MPSCNNNeuronNode {}
impl IMPSCNNNeuronNode for MPSCNNNeuronNode {}
pub trait IMPSCNNNeuronNode: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn a(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, a)
    }
    unsafe fn b(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, b)
    }
    unsafe fn c(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, c)
    }
    unsafe fn nodeWithSource_descriptor_(
        sourceNode: MPSNNImageNode,
        descriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronNode").unwrap(), nodeWithSource : sourceNode, descriptor : descriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronAbsoluteNode(pub id);
impl std::ops::Deref for MPSCNNNeuronAbsoluteNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronAbsoluteNode {}
impl MPSCNNNeuronAbsoluteNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronAbsoluteNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronAbsoluteNode {}
impl From<MPSCNNNeuronAbsoluteNode> for MPSCNNNeuronNode {
    fn from(child: MPSCNNNeuronAbsoluteNode) -> MPSCNNNeuronNode {
        MPSCNNNeuronNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronAbsoluteNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronAbsoluteNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronAbsoluteNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronAbsoluteNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronAbsoluteNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronAbsoluteNode {}
impl INSObject for MPSCNNNeuronAbsoluteNode {}
impl PNSObject for MPSCNNNeuronAbsoluteNode {}
impl IMPSCNNNeuronAbsoluteNode for MPSCNNNeuronAbsoluteNode {}
pub trait IMPSCNNNeuronAbsoluteNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronAbsoluteNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronELUNode(pub id);
impl std::ops::Deref for MPSCNNNeuronELUNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronELUNode {}
impl MPSCNNNeuronELUNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronELUNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronELUNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronELUNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronELUNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronELUNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronELUNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronELUNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronELUNode {}
impl INSObject for MPSCNNNeuronELUNode {}
impl PNSObject for MPSCNNNeuronELUNode {}
impl IMPSCNNNeuronELUNode for MPSCNNNeuronELUNode {}
pub trait IMPSCNNNeuronELUNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn initWithSource_a_(&self, sourceNode: MPSNNImageNode, a: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a)
    }
    unsafe fn nodeWithSource_a_(sourceNode: MPSNNImageNode, a: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronELUNode").unwrap(), nodeWithSource : sourceNode, a : a)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronELUNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronReLUNNode(pub id);
impl std::ops::Deref for MPSCNNNeuronReLUNNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronReLUNNode {}
impl MPSCNNNeuronReLUNNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronReLUNNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronReLUNNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronReLUNNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronReLUNNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronReLUNNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronReLUNNode {}
impl INSObject for MPSCNNNeuronReLUNNode {}
impl PNSObject for MPSCNNNeuronReLUNNode {}
impl IMPSCNNNeuronReLUNNode for MPSCNNNeuronReLUNNode {}
pub trait IMPSCNNNeuronReLUNNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_(&self, sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_(sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronLinearNode(pub id);
impl std::ops::Deref for MPSCNNNeuronLinearNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronLinearNode {}
impl MPSCNNNeuronLinearNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLinearNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronLinearNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronLinearNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronLinearNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronLinearNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronLinearNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronLinearNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronLinearNode {}
impl INSObject for MPSCNNNeuronLinearNode {}
impl PNSObject for MPSCNNNeuronLinearNode {}
impl IMPSCNNNeuronLinearNode for MPSCNNNeuronLinearNode {}
pub trait IMPSCNNNeuronLinearNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_(&self, sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_(sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLinearNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLinearNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronReLUNode(pub id);
impl std::ops::Deref for MPSCNNNeuronReLUNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronReLUNode {}
impl MPSCNNNeuronReLUNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronReLUNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronReLUNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronReLUNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronReLUNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronReLUNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronReLUNode {}
impl INSObject for MPSCNNNeuronReLUNode {}
impl PNSObject for MPSCNNNeuronReLUNode {}
impl IMPSCNNNeuronReLUNode for MPSCNNNeuronReLUNode {}
pub trait IMPSCNNNeuronReLUNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn initWithSource_a_(&self, sourceNode: MPSNNImageNode, a: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a)
    }
    unsafe fn nodeWithSource_a_(sourceNode: MPSNNImageNode, a: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNode").unwrap(), nodeWithSource : sourceNode, a : a)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronReLUNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronSigmoidNode(pub id);
impl std::ops::Deref for MPSCNNNeuronSigmoidNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronSigmoidNode {}
impl MPSCNNNeuronSigmoidNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSigmoidNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronSigmoidNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronSigmoidNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronSigmoidNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronSigmoidNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronSigmoidNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronSigmoidNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronSigmoidNode {}
impl INSObject for MPSCNNNeuronSigmoidNode {}
impl PNSObject for MPSCNNNeuronSigmoidNode {}
impl IMPSCNNNeuronSigmoidNode for MPSCNNNeuronSigmoidNode {}
pub trait IMPSCNNNeuronSigmoidNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSigmoidNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronHardSigmoidNode(pub id);
impl std::ops::Deref for MPSCNNNeuronHardSigmoidNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronHardSigmoidNode {}
impl MPSCNNNeuronHardSigmoidNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronHardSigmoidNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronHardSigmoidNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronHardSigmoidNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronHardSigmoidNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronHardSigmoidNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronHardSigmoidNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronHardSigmoidNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronHardSigmoidNode {}
impl INSObject for MPSCNNNeuronHardSigmoidNode {}
impl PNSObject for MPSCNNNeuronHardSigmoidNode {}
impl IMPSCNNNeuronHardSigmoidNode for MPSCNNNeuronHardSigmoidNode {}
pub trait IMPSCNNNeuronHardSigmoidNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_(&self, sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_(sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronHardSigmoidNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronHardSigmoidNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronSoftPlusNode(pub id);
impl std::ops::Deref for MPSCNNNeuronSoftPlusNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronSoftPlusNode {}
impl MPSCNNNeuronSoftPlusNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftPlusNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronSoftPlusNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronSoftPlusNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronSoftPlusNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftPlusNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronSoftPlusNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronSoftPlusNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronSoftPlusNode {}
impl INSObject for MPSCNNNeuronSoftPlusNode {}
impl PNSObject for MPSCNNNeuronSoftPlusNode {}
impl IMPSCNNNeuronSoftPlusNode for MPSCNNNeuronSoftPlusNode {}
pub trait IMPSCNNNeuronSoftPlusNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_(&self, sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_(sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftPlusNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftPlusNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronSoftSignNode(pub id);
impl std::ops::Deref for MPSCNNNeuronSoftSignNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronSoftSignNode {}
impl MPSCNNNeuronSoftSignNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftSignNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronSoftSignNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronSoftSignNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronSoftSignNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftSignNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronSoftSignNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronSoftSignNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronSoftSignNode {}
impl INSObject for MPSCNNNeuronSoftSignNode {}
impl PNSObject for MPSCNNNeuronSoftSignNode {}
impl IMPSCNNNeuronSoftSignNode for MPSCNNNeuronSoftSignNode {}
pub trait IMPSCNNNeuronSoftSignNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronSoftSignNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronTanHNode(pub id);
impl std::ops::Deref for MPSCNNNeuronTanHNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronTanHNode {}
impl MPSCNNNeuronTanHNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronTanHNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronTanHNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronTanHNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronTanHNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronTanHNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronTanHNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronTanHNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronTanHNode {}
impl INSObject for MPSCNNNeuronTanHNode {}
impl PNSObject for MPSCNNNeuronTanHNode {}
impl IMPSCNNNeuronTanHNode for MPSCNNNeuronTanHNode {}
pub trait IMPSCNNNeuronTanHNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_(&self, sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_(sourceNode: MPSNNImageNode, a: f32, b: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronTanHNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronTanHNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronPReLUNode(pub id);
impl std::ops::Deref for MPSCNNNeuronPReLUNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronPReLUNode {}
impl MPSCNNNeuronPReLUNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPReLUNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronPReLUNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronPReLUNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronPReLUNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronPReLUNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronPReLUNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronPReLUNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronPReLUNode {}
impl INSObject for MPSCNNNeuronPReLUNode {}
impl PNSObject for MPSCNNNeuronPReLUNode {}
impl IMPSCNNNeuronPReLUNode for MPSCNNNeuronPReLUNode {}
pub trait IMPSCNNNeuronPReLUNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_aData_(
        &self,
        sourceNode: MPSNNImageNode,
        aData: NSData,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, aData : aData)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_aData_(sourceNode: MPSNNImageNode, aData: NSData) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPReLUNode").unwrap(), nodeWithSource : sourceNode, aData : aData)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPReLUNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronPowerNode(pub id);
impl std::ops::Deref for MPSCNNNeuronPowerNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronPowerNode {}
impl MPSCNNNeuronPowerNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPowerNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronPowerNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronPowerNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronPowerNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronPowerNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronPowerNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronPowerNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronPowerNode {}
impl INSObject for MPSCNNNeuronPowerNode {}
impl PNSObject for MPSCNNNeuronPowerNode {}
impl IMPSCNNNeuronPowerNode for MPSCNNNeuronPowerNode {}
pub trait IMPSCNNNeuronPowerNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_c_(
        &self,
        sourceNode: MPSNNImageNode,
        a: f32,
        b: f32,
        c: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b, c : c)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_c_(
        sourceNode: MPSNNImageNode,
        a: f32,
        b: f32,
        c: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPowerNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b, c : c)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronPowerNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronExponentialNode(pub id);
impl std::ops::Deref for MPSCNNNeuronExponentialNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronExponentialNode {}
impl MPSCNNNeuronExponentialNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronExponentialNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronExponentialNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronExponentialNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronExponentialNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronExponentialNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronExponentialNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronExponentialNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronExponentialNode {}
impl INSObject for MPSCNNNeuronExponentialNode {}
impl PNSObject for MPSCNNNeuronExponentialNode {}
impl IMPSCNNNeuronExponentialNode for MPSCNNNeuronExponentialNode {}
pub trait IMPSCNNNeuronExponentialNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_c_(
        &self,
        sourceNode: MPSNNImageNode,
        a: f32,
        b: f32,
        c: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b, c : c)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_c_(
        sourceNode: MPSNNImageNode,
        a: f32,
        b: f32,
        c: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronExponentialNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b, c : c)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronExponentialNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronLogarithmNode(pub id);
impl std::ops::Deref for MPSCNNNeuronLogarithmNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronLogarithmNode {}
impl MPSCNNNeuronLogarithmNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLogarithmNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronLogarithmNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronLogarithmNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronLogarithmNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronLogarithmNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronLogarithmNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronLogarithmNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronLogarithmNode {}
impl INSObject for MPSCNNNeuronLogarithmNode {}
impl PNSObject for MPSCNNNeuronLogarithmNode {}
impl IMPSCNNNeuronLogarithmNode for MPSCNNNeuronLogarithmNode {}
pub trait IMPSCNNNeuronLogarithmNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_a_b_c_(
        &self,
        sourceNode: MPSNNImageNode,
        a: f32,
        b: f32,
        c: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, a : a, b : b, c : c)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_a_b_c_(
        sourceNode: MPSNNImageNode,
        a: f32,
        b: f32,
        c: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLogarithmNode").unwrap(), nodeWithSource : sourceNode, a : a, b : b, c : c)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronLogarithmNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronGeLUNode(pub id);
impl std::ops::Deref for MPSCNNNeuronGeLUNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronGeLUNode {}
impl MPSCNNNeuronGeLUNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronGeLUNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNeuronNode for MPSCNNNeuronGeLUNode {}
impl std::convert::TryFrom<MPSCNNNeuronNode> for MPSCNNNeuronGeLUNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNNeuronNode) -> Result<MPSCNNNeuronGeLUNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronGeLUNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronGeLUNode(parent.0))
        } else {
            Err("This MPSCNNNeuronNode cannot be downcasted to MPSCNNNeuronGeLUNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronGeLUNode {}
impl INSObject for MPSCNNNeuronGeLUNode {}
impl PNSObject for MPSCNNNeuronGeLUNode {}
impl IMPSCNNNeuronGeLUNode for MPSCNNNeuronGeLUNode {}
pub trait IMPSCNNNeuronGeLUNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronGeLUNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNeuronGradientNode(pub id);
impl std::ops::Deref for MPSCNNNeuronGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNeuronGradientNode {}
impl MPSCNNNeuronGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNNeuronGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNNeuronGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSCNNNeuronGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNeuronGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNeuronGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNNeuronGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNNeuronGradientNode {}
impl INSObject for MPSCNNNeuronGradientNode {}
impl PNSObject for MPSCNNNeuronGradientNode {}
impl IMPSCNNNeuronGradientNode for MPSCNNNeuronGradientNode {}
pub trait IMPSCNNNeuronGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_descriptor_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, descriptor : descriptor)
    }
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn descriptor(&self) -> MPSNNNeuronDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, descriptor)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_descriptor_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSNNNeuronDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNeuronGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, descriptor : descriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNUnaryReductionNode(pub id);
impl std::ops::Deref for MPSNNUnaryReductionNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNUnaryReductionNode {}
impl MPSNNUnaryReductionNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNUnaryReductionNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNUnaryReductionNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNUnaryReductionNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNUnaryReductionNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNUnaryReductionNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNUnaryReductionNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNUnaryReductionNode")
        }
    }
}
impl INSObject for MPSNNUnaryReductionNode {}
impl PNSObject for MPSNNUnaryReductionNode {}
impl IMPSNNUnaryReductionNode for MPSNNUnaryReductionNode {}
pub trait IMPSNNUnaryReductionNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn clipRectSource(&self) -> MTLRegion
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clipRectSource)
    }
    unsafe fn setClipRectSource_(&self, clipRectSource: MTLRegion)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setClipRectSource : clipRectSource)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNUnaryReductionNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionRowMinNode(pub id);
impl std::ops::Deref for MPSNNReductionRowMinNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionRowMinNode {}
impl MPSNNReductionRowMinNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionRowMinNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionRowMinNode {}
impl From<MPSNNReductionRowMinNode> for MPSNNUnaryReductionNode {
    fn from(child: MPSNNReductionRowMinNode) -> MPSNNUnaryReductionNode {
        MPSNNUnaryReductionNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionRowMinNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNUnaryReductionNode) -> Result<MPSNNReductionRowMinNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionRowMinNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionRowMinNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionRowMinNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionRowMinNode {}
impl INSObject for MPSNNReductionRowMinNode {}
impl PNSObject for MPSNNReductionRowMinNode {}
impl IMPSNNReductionRowMinNode for MPSNNReductionRowMinNode {}
pub trait IMPSNNReductionRowMinNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionColumnMinNode(pub id);
impl std::ops::Deref for MPSNNReductionColumnMinNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionColumnMinNode {}
impl MPSNNReductionColumnMinNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionColumnMinNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionColumnMinNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionColumnMinNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionColumnMinNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionColumnMinNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionColumnMinNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionColumnMinNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionColumnMinNode {}
impl INSObject for MPSNNReductionColumnMinNode {}
impl PNSObject for MPSNNReductionColumnMinNode {}
impl IMPSNNReductionColumnMinNode for MPSNNReductionColumnMinNode {}
pub trait IMPSNNReductionColumnMinNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionFeatureChannelsMinNode(pub id);
impl std::ops::Deref for MPSNNReductionFeatureChannelsMinNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionFeatureChannelsMinNode {}
impl MPSNNReductionFeatureChannelsMinNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsMinNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionFeatureChannelsMinNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionFeatureChannelsMinNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionFeatureChannelsMinNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsMinNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionFeatureChannelsMinNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionFeatureChannelsMinNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionFeatureChannelsMinNode {}
impl INSObject for MPSNNReductionFeatureChannelsMinNode {}
impl PNSObject for MPSNNReductionFeatureChannelsMinNode {}
impl IMPSNNReductionFeatureChannelsMinNode for MPSNNReductionFeatureChannelsMinNode {}
pub trait IMPSNNReductionFeatureChannelsMinNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionFeatureChannelsArgumentMinNode(pub id);
impl std::ops::Deref for MPSNNReductionFeatureChannelsArgumentMinNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionFeatureChannelsArgumentMinNode {}
impl MPSNNReductionFeatureChannelsArgumentMinNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsArgumentMinNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionFeatureChannelsArgumentMinNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode>
    for MPSNNReductionFeatureChannelsArgumentMinNode
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionFeatureChannelsArgumentMinNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsArgumentMinNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionFeatureChannelsArgumentMinNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionFeatureChannelsArgumentMinNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionFeatureChannelsArgumentMinNode {}
impl INSObject for MPSNNReductionFeatureChannelsArgumentMinNode {}
impl PNSObject for MPSNNReductionFeatureChannelsArgumentMinNode {}
impl IMPSNNReductionFeatureChannelsArgumentMinNode
    for MPSNNReductionFeatureChannelsArgumentMinNode
{
}
pub trait IMPSNNReductionFeatureChannelsArgumentMinNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionRowMaxNode(pub id);
impl std::ops::Deref for MPSNNReductionRowMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionRowMaxNode {}
impl MPSNNReductionRowMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionRowMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionRowMaxNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionRowMaxNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNUnaryReductionNode) -> Result<MPSNNReductionRowMaxNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionRowMaxNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionRowMaxNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionRowMaxNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionRowMaxNode {}
impl INSObject for MPSNNReductionRowMaxNode {}
impl PNSObject for MPSNNReductionRowMaxNode {}
impl IMPSNNReductionRowMaxNode for MPSNNReductionRowMaxNode {}
pub trait IMPSNNReductionRowMaxNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionColumnMaxNode(pub id);
impl std::ops::Deref for MPSNNReductionColumnMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionColumnMaxNode {}
impl MPSNNReductionColumnMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionColumnMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionColumnMaxNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionColumnMaxNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionColumnMaxNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionColumnMaxNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionColumnMaxNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionColumnMaxNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionColumnMaxNode {}
impl INSObject for MPSNNReductionColumnMaxNode {}
impl PNSObject for MPSNNReductionColumnMaxNode {}
impl IMPSNNReductionColumnMaxNode for MPSNNReductionColumnMaxNode {}
pub trait IMPSNNReductionColumnMaxNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionFeatureChannelsMaxNode(pub id);
impl std::ops::Deref for MPSNNReductionFeatureChannelsMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionFeatureChannelsMaxNode {}
impl MPSNNReductionFeatureChannelsMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionFeatureChannelsMaxNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionFeatureChannelsMaxNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionFeatureChannelsMaxNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsMaxNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionFeatureChannelsMaxNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionFeatureChannelsMaxNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionFeatureChannelsMaxNode {}
impl INSObject for MPSNNReductionFeatureChannelsMaxNode {}
impl PNSObject for MPSNNReductionFeatureChannelsMaxNode {}
impl IMPSNNReductionFeatureChannelsMaxNode for MPSNNReductionFeatureChannelsMaxNode {}
pub trait IMPSNNReductionFeatureChannelsMaxNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionFeatureChannelsArgumentMaxNode(pub id);
impl std::ops::Deref for MPSNNReductionFeatureChannelsArgumentMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionFeatureChannelsArgumentMaxNode {}
impl MPSNNReductionFeatureChannelsArgumentMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsArgumentMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionFeatureChannelsArgumentMaxNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode>
    for MPSNNReductionFeatureChannelsArgumentMaxNode
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionFeatureChannelsArgumentMaxNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsArgumentMaxNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionFeatureChannelsArgumentMaxNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionFeatureChannelsArgumentMaxNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionFeatureChannelsArgumentMaxNode {}
impl INSObject for MPSNNReductionFeatureChannelsArgumentMaxNode {}
impl PNSObject for MPSNNReductionFeatureChannelsArgumentMaxNode {}
impl IMPSNNReductionFeatureChannelsArgumentMaxNode
    for MPSNNReductionFeatureChannelsArgumentMaxNode
{
}
pub trait IMPSNNReductionFeatureChannelsArgumentMaxNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionRowMeanNode(pub id);
impl std::ops::Deref for MPSNNReductionRowMeanNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionRowMeanNode {}
impl MPSNNReductionRowMeanNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionRowMeanNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionRowMeanNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionRowMeanNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNUnaryReductionNode) -> Result<MPSNNReductionRowMeanNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionRowMeanNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionRowMeanNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionRowMeanNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionRowMeanNode {}
impl INSObject for MPSNNReductionRowMeanNode {}
impl PNSObject for MPSNNReductionRowMeanNode {}
impl IMPSNNReductionRowMeanNode for MPSNNReductionRowMeanNode {}
pub trait IMPSNNReductionRowMeanNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionColumnMeanNode(pub id);
impl std::ops::Deref for MPSNNReductionColumnMeanNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionColumnMeanNode {}
impl MPSNNReductionColumnMeanNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionColumnMeanNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionColumnMeanNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionColumnMeanNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionColumnMeanNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionColumnMeanNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionColumnMeanNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionColumnMeanNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionColumnMeanNode {}
impl INSObject for MPSNNReductionColumnMeanNode {}
impl PNSObject for MPSNNReductionColumnMeanNode {}
impl IMPSNNReductionColumnMeanNode for MPSNNReductionColumnMeanNode {}
pub trait IMPSNNReductionColumnMeanNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionFeatureChannelsMeanNode(pub id);
impl std::ops::Deref for MPSNNReductionFeatureChannelsMeanNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionFeatureChannelsMeanNode {}
impl MPSNNReductionFeatureChannelsMeanNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsMeanNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionFeatureChannelsMeanNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionFeatureChannelsMeanNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionFeatureChannelsMeanNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsMeanNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionFeatureChannelsMeanNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionFeatureChannelsMeanNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionFeatureChannelsMeanNode {}
impl INSObject for MPSNNReductionFeatureChannelsMeanNode {}
impl PNSObject for MPSNNReductionFeatureChannelsMeanNode {}
impl IMPSNNReductionFeatureChannelsMeanNode for MPSNNReductionFeatureChannelsMeanNode {}
pub trait IMPSNNReductionFeatureChannelsMeanNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionSpatialMeanNode(pub id);
impl std::ops::Deref for MPSNNReductionSpatialMeanNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionSpatialMeanNode {}
impl MPSNNReductionSpatialMeanNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionSpatialMeanNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionSpatialMeanNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionSpatialMeanNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionSpatialMeanNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionSpatialMeanNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionSpatialMeanNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionSpatialMeanNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionSpatialMeanNode {}
impl INSObject for MPSNNReductionSpatialMeanNode {}
impl PNSObject for MPSNNReductionSpatialMeanNode {}
impl IMPSNNReductionSpatialMeanNode for MPSNNReductionSpatialMeanNode {}
pub trait IMPSNNReductionSpatialMeanNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionRowSumNode(pub id);
impl std::ops::Deref for MPSNNReductionRowSumNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionRowSumNode {}
impl MPSNNReductionRowSumNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionRowSumNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionRowSumNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionRowSumNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNUnaryReductionNode) -> Result<MPSNNReductionRowSumNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionRowSumNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionRowSumNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionRowSumNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionRowSumNode {}
impl INSObject for MPSNNReductionRowSumNode {}
impl PNSObject for MPSNNReductionRowSumNode {}
impl IMPSNNReductionRowSumNode for MPSNNReductionRowSumNode {}
pub trait IMPSNNReductionRowSumNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionColumnSumNode(pub id);
impl std::ops::Deref for MPSNNReductionColumnSumNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionColumnSumNode {}
impl MPSNNReductionColumnSumNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionColumnSumNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionColumnSumNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionColumnSumNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionColumnSumNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionColumnSumNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReductionColumnSumNode(parent.0))
        } else {
            Err("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionColumnSumNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionColumnSumNode {}
impl INSObject for MPSNNReductionColumnSumNode {}
impl PNSObject for MPSNNReductionColumnSumNode {}
impl IMPSNNReductionColumnSumNode for MPSNNReductionColumnSumNode {}
pub trait IMPSNNReductionColumnSumNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionFeatureChannelsSumNode(pub id);
impl std::ops::Deref for MPSNNReductionFeatureChannelsSumNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionFeatureChannelsSumNode {}
impl MPSNNReductionFeatureChannelsSumNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsSumNode").unwrap(), alloc) })
    }
}
impl IMPSNNUnaryReductionNode for MPSNNReductionFeatureChannelsSumNode {}
impl std::convert::TryFrom<MPSNNUnaryReductionNode> for MPSNNReductionFeatureChannelsSumNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNUnaryReductionNode,
    ) -> Result<MPSNNReductionFeatureChannelsSumNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionFeatureChannelsSumNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionFeatureChannelsSumNode(parent.0))
        } else {
            Err ("This MPSNNUnaryReductionNode cannot be downcasted to MPSNNReductionFeatureChannelsSumNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionFeatureChannelsSumNode {}
impl INSObject for MPSNNReductionFeatureChannelsSumNode {}
impl PNSObject for MPSNNReductionFeatureChannelsSumNode {}
impl IMPSNNReductionFeatureChannelsSumNode for MPSNNReductionFeatureChannelsSumNode {}
pub trait IMPSNNReductionFeatureChannelsSumNode: Sized + std::ops::Deref {
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn setWeight_(&self, weight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setWeight : weight)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingNode(pub id);
impl std::ops::Deref for MPSCNNPoolingNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingNode {}
impl MPSCNNPoolingNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNPoolingNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNPoolingNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNPoolingNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNPoolingNode")
        }
    }
}
impl INSObject for MPSCNNPoolingNode {}
impl PNSObject for MPSCNNPoolingNode {}
impl IMPSCNNPoolingNode for MPSCNNPoolingNode {}
pub trait IMPSCNNPoolingNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_(
        &self,
        sourceNode: MPSNNImageNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY)
    }
    unsafe fn initWithSource_filterSize_stride_(
        &self,
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
        stride: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, filterSize : size, stride : stride)
    }
    unsafe fn initWithSource_filterSize_(
        &self,
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, filterSize : size)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn strideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsX)
    }
    unsafe fn strideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsY)
    }
    unsafe fn nodeWithSource_filterSize_(
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingNode").unwrap(), nodeWithSource : sourceNode, filterSize : size)
    }
    unsafe fn nodeWithSource_filterSize_stride_(
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
        stride: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingNode").unwrap(), nodeWithSource : sourceNode, filterSize : size, stride : stride)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingAverageNode(pub id);
impl std::ops::Deref for MPSCNNPoolingAverageNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingAverageNode {}
impl MPSCNNPoolingAverageNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverageNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingNode for MPSCNNPoolingAverageNode {}
impl From<MPSCNNPoolingAverageNode> for MPSCNNPoolingNode {
    fn from(child: MPSCNNPoolingAverageNode) -> MPSCNNPoolingNode {
        MPSCNNPoolingNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNPoolingNode> for MPSCNNPoolingAverageNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPoolingNode) -> Result<MPSCNNPoolingAverageNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverageNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingAverageNode(parent.0))
        } else {
            Err("This MPSCNNPoolingNode cannot be downcasted to MPSCNNPoolingAverageNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNPoolingAverageNode {}
impl INSObject for MPSCNNPoolingAverageNode {}
impl PNSObject for MPSCNNPoolingAverageNode {}
impl IMPSCNNPoolingAverageNode for MPSCNNPoolingAverageNode {}
pub trait IMPSCNNPoolingAverageNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingL2NormNode(pub id);
impl std::ops::Deref for MPSCNNPoolingL2NormNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingL2NormNode {}
impl MPSCNNPoolingL2NormNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2NormNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingNode for MPSCNNPoolingL2NormNode {}
impl std::convert::TryFrom<MPSCNNPoolingNode> for MPSCNNPoolingL2NormNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPoolingNode) -> Result<MPSCNNPoolingL2NormNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2NormNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingL2NormNode(parent.0))
        } else {
            Err("This MPSCNNPoolingNode cannot be downcasted to MPSCNNPoolingL2NormNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNPoolingL2NormNode {}
impl INSObject for MPSCNNPoolingL2NormNode {}
impl PNSObject for MPSCNNPoolingL2NormNode {}
impl IMPSCNNPoolingL2NormNode for MPSCNNPoolingL2NormNode {}
pub trait IMPSCNNPoolingL2NormNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingMaxNode(pub id);
impl std::ops::Deref for MPSCNNPoolingMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingMaxNode {}
impl MPSCNNPoolingMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingMaxNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingNode for MPSCNNPoolingMaxNode {}
impl std::convert::TryFrom<MPSCNNPoolingNode> for MPSCNNPoolingMaxNode {
    type Error = &'static str;
    fn try_from(parent: MPSCNNPoolingNode) -> Result<MPSCNNPoolingMaxNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingMaxNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingMaxNode(parent.0))
        } else {
            Err("This MPSCNNPoolingNode cannot be downcasted to MPSCNNPoolingMaxNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNPoolingMaxNode {}
impl INSObject for MPSCNNPoolingMaxNode {}
impl PNSObject for MPSCNNPoolingMaxNode {}
impl IMPSCNNPoolingMaxNode for MPSCNNPoolingMaxNode {}
pub trait IMPSCNNPoolingMaxNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDilatedPoolingMaxNode(pub id);
impl std::ops::Deref for MPSCNNDilatedPoolingMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDilatedPoolingMaxNode {}
impl MPSCNNDilatedPoolingMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNDilatedPoolingMaxNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNDilatedPoolingMaxNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNDilatedPoolingMaxNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDilatedPoolingMaxNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNDilatedPoolingMaxNode")
        }
    }
}
impl INSObject for MPSCNNDilatedPoolingMaxNode {}
impl PNSObject for MPSCNNDilatedPoolingMaxNode {}
impl IMPSCNNDilatedPoolingMaxNode for MPSCNNDilatedPoolingMaxNode {}
pub trait IMPSCNNDilatedPoolingMaxNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_dilationRateX_dilationRateY_(
        &self,
        sourceNode: MPSNNImageNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
        dilationRateX: NSUInteger,
        dilationRateY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY, dilationRateX : dilationRateX, dilationRateY : dilationRateY)
    }
    unsafe fn initWithSource_filterSize_stride_dilationRate_(
        &self,
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
        stride: NSUInteger,
        dilationRate: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, filterSize : size, stride : stride, dilationRate : dilationRate)
    }
    unsafe fn initWithSource_filterSize_(
        &self,
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, filterSize : size)
    }
    unsafe fn dilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateX)
    }
    unsafe fn dilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateY)
    }
    unsafe fn nodeWithSource_filterSize_(
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxNode").unwrap(), nodeWithSource : sourceNode, filterSize : size)
    }
    unsafe fn nodeWithSource_filterSize_stride_dilationRate_(
        sourceNode: MPSNNImageNode,
        size: NSUInteger,
        stride: NSUInteger,
        dilationRate: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxNode").unwrap(), nodeWithSource : sourceNode, filterSize : size, stride : stride, dilationRate : dilationRate)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingGradientNode(pub id);
impl std::ops::Deref for MPSCNNPoolingGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingGradientNode {}
impl MPSCNNPoolingGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNPoolingGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNPoolingGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSCNNPoolingGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNPoolingGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNPoolingGradientNode {}
impl INSObject for MPSCNNPoolingGradientNode {}
impl PNSObject for MPSCNNPoolingGradientNode {}
impl IMPSCNNPoolingGradientNode for MPSCNNPoolingGradientNode {}
pub trait IMPSCNNPoolingGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
        paddingPolicy: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY, paddingPolicy : paddingPolicy)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn strideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsX)
    }
    unsafe fn strideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strideInPixelsY)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
        paddingPolicy: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY, paddingPolicy : paddingPolicy)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingMaxGradientNode(pub id);
impl std::ops::Deref for MPSCNNPoolingMaxGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingMaxGradientNode {}
impl MPSCNNPoolingMaxGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingMaxGradientNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradientNode for MPSCNNPoolingMaxGradientNode {}
impl From<MPSCNNPoolingMaxGradientNode> for MPSCNNPoolingGradientNode {
    fn from(child: MPSCNNPoolingMaxGradientNode) -> MPSCNNPoolingGradientNode {
        MPSCNNPoolingGradientNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNPoolingGradientNode> for MPSCNNPoolingMaxGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNPoolingGradientNode,
    ) -> Result<MPSCNNPoolingMaxGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingMaxGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNPoolingMaxGradientNode(parent.0))
        } else {
            Err ("This MPSCNNPoolingGradientNode cannot be downcasted to MPSCNNPoolingMaxGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSCNNPoolingMaxGradientNode {}
impl IMPSNNFilterNode for MPSCNNPoolingMaxGradientNode {}
impl INSObject for MPSCNNPoolingMaxGradientNode {}
impl PNSObject for MPSCNNPoolingMaxGradientNode {}
impl IMPSCNNPoolingMaxGradientNode for MPSCNNPoolingMaxGradientNode {}
pub trait IMPSCNNPoolingMaxGradientNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingAverageGradientNode(pub id);
impl std::ops::Deref for MPSCNNPoolingAverageGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingAverageGradientNode {}
impl MPSCNNPoolingAverageGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverageGradientNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradientNode for MPSCNNPoolingAverageGradientNode {}
impl std::convert::TryFrom<MPSCNNPoolingGradientNode> for MPSCNNPoolingAverageGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNPoolingGradientNode,
    ) -> Result<MPSCNNPoolingAverageGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingAverageGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNPoolingAverageGradientNode(parent.0))
        } else {
            Err ("This MPSCNNPoolingGradientNode cannot be downcasted to MPSCNNPoolingAverageGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSCNNPoolingAverageGradientNode {}
impl IMPSNNFilterNode for MPSCNNPoolingAverageGradientNode {}
impl INSObject for MPSCNNPoolingAverageGradientNode {}
impl PNSObject for MPSCNNPoolingAverageGradientNode {}
impl IMPSCNNPoolingAverageGradientNode for MPSCNNPoolingAverageGradientNode {}
pub trait IMPSCNNPoolingAverageGradientNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNPoolingL2NormGradientNode(pub id);
impl std::ops::Deref for MPSCNNPoolingL2NormGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNPoolingL2NormGradientNode {}
impl MPSCNNPoolingL2NormGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2NormGradientNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradientNode for MPSCNNPoolingL2NormGradientNode {}
impl std::convert::TryFrom<MPSCNNPoolingGradientNode> for MPSCNNPoolingL2NormGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNPoolingGradientNode,
    ) -> Result<MPSCNNPoolingL2NormGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNPoolingL2NormGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNPoolingL2NormGradientNode(parent.0))
        } else {
            Err ("This MPSCNNPoolingGradientNode cannot be downcasted to MPSCNNPoolingL2NormGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSCNNPoolingL2NormGradientNode {}
impl IMPSNNFilterNode for MPSCNNPoolingL2NormGradientNode {}
impl INSObject for MPSCNNPoolingL2NormGradientNode {}
impl PNSObject for MPSCNNPoolingL2NormGradientNode {}
impl IMPSCNNPoolingL2NormGradientNode for MPSCNNPoolingL2NormGradientNode {}
pub trait IMPSCNNPoolingL2NormGradientNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDilatedPoolingMaxGradientNode(pub id);
impl std::ops::Deref for MPSCNNDilatedPoolingMaxGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDilatedPoolingMaxGradientNode {}
impl MPSCNNDilatedPoolingMaxGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxGradientNode").unwrap(), alloc) })
    }
}
impl IMPSCNNPoolingGradientNode for MPSCNNDilatedPoolingMaxGradientNode {}
impl std::convert::TryFrom<MPSCNNPoolingGradientNode> for MPSCNNDilatedPoolingMaxGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNPoolingGradientNode,
    ) -> Result<MPSCNNDilatedPoolingMaxGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNDilatedPoolingMaxGradientNode(parent.0))
        } else {
            Err ("This MPSCNNPoolingGradientNode cannot be downcasted to MPSCNNDilatedPoolingMaxGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSCNNDilatedPoolingMaxGradientNode {}
impl IMPSNNFilterNode for MPSCNNDilatedPoolingMaxGradientNode {}
impl INSObject for MPSCNNDilatedPoolingMaxGradientNode {}
impl PNSObject for MPSCNNDilatedPoolingMaxGradientNode {}
impl IMPSCNNDilatedPoolingMaxGradientNode for MPSCNNDilatedPoolingMaxGradientNode {}
pub trait IMPSCNNDilatedPoolingMaxGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_dilationRateX_dilationRateY_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
        dilationRateX: NSUInteger,
        dilationRateY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY, dilationRateX : dilationRateX, dilationRateY : dilationRateY)
    }
    unsafe fn dilationRateX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateX)
    }
    unsafe fn dilationRateY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRateY)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_dilationRateX_dilationRateY_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
        strideInPixelsX: NSUInteger,
        strideInPixelsY: NSUInteger,
        dilationRateX: NSUInteger,
        dilationRateY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDilatedPoolingMaxGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelWidth : kernelWidth, kernelHeight : kernelHeight, strideInPixelsX : strideInPixelsX, strideInPixelsY : strideInPixelsY, dilationRateX : dilationRateX, dilationRateY : dilationRateY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNNormalizationNode {}
impl MPSCNNNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNormalizationNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNNormalizationNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNNormalizationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNNormalizationNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNNormalizationNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNNormalizationNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNNormalizationNode")
        }
    }
}
impl INSObject for MPSCNNNormalizationNode {}
impl PNSObject for MPSCNNNormalizationNode {}
impl IMPSCNNNormalizationNode for MPSCNNNormalizationNode {}
pub trait IMPSCNNNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNNormalizationNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSpatialNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNSpatialNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSpatialNormalizationNode {}
impl MPSCNNSpatialNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNormalizationNode for MPSCNNSpatialNormalizationNode {}
impl From<MPSCNNSpatialNormalizationNode> for MPSCNNNormalizationNode {
    fn from(child: MPSCNNSpatialNormalizationNode) -> MPSCNNNormalizationNode {
        MPSCNNNormalizationNode(child.0)
    }
}
impl std::convert::TryFrom<MPSCNNNormalizationNode> for MPSCNNSpatialNormalizationNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNNormalizationNode,
    ) -> Result<MPSCNNSpatialNormalizationNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNSpatialNormalizationNode(parent.0))
        } else {
            Err ("This MPSCNNNormalizationNode cannot be downcasted to MPSCNNSpatialNormalizationNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNSpatialNormalizationNode {}
impl INSObject for MPSCNNSpatialNormalizationNode {}
impl PNSObject for MPSCNNSpatialNormalizationNode {}
impl IMPSCNNSpatialNormalizationNode for MPSCNNSpatialNormalizationNode {}
pub trait IMPSCNNSpatialNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_kernelSize_(
        &self,
        sourceNode: MPSNNImageNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, kernelSize : kernelSize)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn setKernelWidth_(&self, kernelWidth: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelWidth : kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn setKernelHeight_(&self, kernelHeight: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelHeight : kernelHeight)
    }
    unsafe fn nodeWithSource_kernelSize_(
        sourceNode: MPSNNImageNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationNode").unwrap(), nodeWithSource : sourceNode, kernelSize : kernelSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSpatialNormalizationGradientNode(pub id);
impl std::ops::Deref for MPSCNNSpatialNormalizationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSpatialNormalizationGradientNode {}
impl MPSCNNSpatialNormalizationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNSpatialNormalizationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNSpatialNormalizationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNSpatialNormalizationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNSpatialNormalizationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNSpatialNormalizationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNSpatialNormalizationGradientNode {}
impl INSObject for MPSCNNSpatialNormalizationGradientNode {}
impl PNSObject for MPSCNNSpatialNormalizationGradientNode {}
impl IMPSCNNSpatialNormalizationGradientNode for MPSCNNSpatialNormalizationGradientNode {}
pub trait IMPSCNNSpatialNormalizationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelSize_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelSize : kernelSize)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn setKernelWidth_(&self, kernelWidth: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelWidth : kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn setKernelHeight_(&self, kernelHeight: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelHeight : kernelHeight)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelSize_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSpatialNormalizationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelSize : kernelSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLocalContrastNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNLocalContrastNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLocalContrastNormalizationNode {}
impl MPSCNNLocalContrastNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNormalizationNode for MPSCNNLocalContrastNormalizationNode {}
impl std::convert::TryFrom<MPSCNNNormalizationNode> for MPSCNNLocalContrastNormalizationNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNNormalizationNode,
    ) -> Result<MPSCNNLocalContrastNormalizationNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNLocalContrastNormalizationNode(parent.0))
        } else {
            Err ("This MPSCNNNormalizationNode cannot be downcasted to MPSCNNLocalContrastNormalizationNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNLocalContrastNormalizationNode {}
impl INSObject for MPSCNNLocalContrastNormalizationNode {}
impl PNSObject for MPSCNNLocalContrastNormalizationNode {}
impl IMPSCNNLocalContrastNormalizationNode for MPSCNNLocalContrastNormalizationNode {}
pub trait IMPSCNNLocalContrastNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_kernelSize_(
        &self,
        sourceNode: MPSNNImageNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, kernelSize : kernelSize)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn pm(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pm)
    }
    unsafe fn setPm_(&self, pm: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPm : pm)
    }
    unsafe fn ps(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, ps)
    }
    unsafe fn setPs_(&self, ps: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPs : ps)
    }
    unsafe fn p0(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, p0)
    }
    unsafe fn setP0_(&self, p0: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setP0 : p0)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn setKernelWidth_(&self, kernelWidth: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelWidth : kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn setKernelHeight_(&self, kernelHeight: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelHeight : kernelHeight)
    }
    unsafe fn nodeWithSource_kernelSize_(
        sourceNode: MPSNNImageNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationNode").unwrap(), nodeWithSource : sourceNode, kernelSize : kernelSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLocalContrastNormalizationGradientNode(pub id);
impl std::ops::Deref for MPSCNNLocalContrastNormalizationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLocalContrastNormalizationGradientNode {}
impl MPSCNNLocalContrastNormalizationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNLocalContrastNormalizationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode>
    for MPSCNNLocalContrastNormalizationGradientNode
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNLocalContrastNormalizationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNLocalContrastNormalizationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNLocalContrastNormalizationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNLocalContrastNormalizationGradientNode {}
impl INSObject for MPSCNNLocalContrastNormalizationGradientNode {}
impl PNSObject for MPSCNNLocalContrastNormalizationGradientNode {}
impl IMPSCNNLocalContrastNormalizationGradientNode
    for MPSCNNLocalContrastNormalizationGradientNode
{
}
pub trait IMPSCNNLocalContrastNormalizationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn setDelta_(&self, delta: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDelta : delta)
    }
    unsafe fn p0(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, p0)
    }
    unsafe fn setP0_(&self, p0: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setP0 : p0)
    }
    unsafe fn pm(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, pm)
    }
    unsafe fn setPm_(&self, pm: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPm : pm)
    }
    unsafe fn ps(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, ps)
    }
    unsafe fn setPs_(&self, ps: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPs : ps)
    }
    unsafe fn kernelWidth(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelWidth)
    }
    unsafe fn kernelHeight(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelHeight)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelWidth: NSUInteger,
        kernelHeight: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLocalContrastNormalizationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelWidth : kernelWidth, kernelHeight : kernelHeight)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNCrossChannelNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNCrossChannelNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNCrossChannelNormalizationNode {}
impl MPSCNNCrossChannelNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationNode").unwrap(), alloc) })
    }
}
impl IMPSCNNNormalizationNode for MPSCNNCrossChannelNormalizationNode {}
impl std::convert::TryFrom<MPSCNNNormalizationNode> for MPSCNNCrossChannelNormalizationNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSCNNNormalizationNode,
    ) -> Result<MPSCNNCrossChannelNormalizationNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNCrossChannelNormalizationNode(parent.0))
        } else {
            Err ("This MPSCNNNormalizationNode cannot be downcasted to MPSCNNCrossChannelNormalizationNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNCrossChannelNormalizationNode {}
impl INSObject for MPSCNNCrossChannelNormalizationNode {}
impl PNSObject for MPSCNNCrossChannelNormalizationNode {}
impl IMPSCNNCrossChannelNormalizationNode for MPSCNNCrossChannelNormalizationNode {}
pub trait IMPSCNNCrossChannelNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_kernelSize_(
        &self,
        sourceNode: MPSNNImageNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, kernelSize : kernelSize)
    }
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn kernelSizeInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelSizeInFeatureChannels)
    }
    unsafe fn setKernelSizeInFeatureChannels_(&self, kernelSizeInFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setKernelSizeInFeatureChannels : kernelSizeInFeatureChannels)
    }
    unsafe fn nodeWithSource_kernelSize_(
        sourceNode: MPSNNImageNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationNode").unwrap(), nodeWithSource : sourceNode, kernelSize : kernelSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNCrossChannelNormalizationGradientNode(pub id);
impl std::ops::Deref for MPSCNNCrossChannelNormalizationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNCrossChannelNormalizationGradientNode {}
impl MPSCNNCrossChannelNormalizationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNCrossChannelNormalizationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode>
    for MPSCNNCrossChannelNormalizationGradientNode
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNCrossChannelNormalizationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNCrossChannelNormalizationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNCrossChannelNormalizationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNCrossChannelNormalizationGradientNode {}
impl INSObject for MPSCNNCrossChannelNormalizationGradientNode {}
impl PNSObject for MPSCNNCrossChannelNormalizationGradientNode {}
impl IMPSCNNCrossChannelNormalizationGradientNode for MPSCNNCrossChannelNormalizationGradientNode {}
pub trait IMPSCNNCrossChannelNormalizationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelSize_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelSize : kernelSize)
    }
    unsafe fn kernelSize(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelSize)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelSize_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        kernelSize: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNCrossChannelNormalizationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, kernelSize : kernelSize)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNInstanceNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNInstanceNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNInstanceNormalizationNode {}
impl MPSCNNInstanceNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNInstanceNormalizationNode {}
impl IMPSNNFilterNode for MPSCNNInstanceNormalizationNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNInstanceNormalizationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNInstanceNormalizationNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNInstanceNormalizationNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNInstanceNormalizationNode")
        }
    }
}
impl INSObject for MPSCNNInstanceNormalizationNode {}
impl PNSObject for MPSCNNInstanceNormalizationNode {}
impl IMPSCNNInstanceNormalizationNode for MPSCNNInstanceNormalizationNode {}
pub trait IMPSCNNInstanceNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_dataSource_(
        &self,
        source: MPSNNImageNode,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, dataSource : dataSource)
    }
    unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, trainingStyle)
    }
    unsafe fn setTrainingStyle_(&self, trainingStyle: MPSNNTrainingStyle)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTrainingStyle : trainingStyle)
    }
    unsafe fn nodeWithSource_dataSource_(
        source: MPSNNImageNode,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationNode").unwrap(), nodeWithSource : source, dataSource : dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNInstanceNormalizationGradientNode(pub id);
impl std::ops::Deref for MPSCNNInstanceNormalizationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNInstanceNormalizationGradientNode {}
impl MPSCNNInstanceNormalizationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNInstanceNormalizationGradientNode {}
impl IMPSNNGradientFilterNode for MPSCNNInstanceNormalizationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNInstanceNormalizationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNInstanceNormalizationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNInstanceNormalizationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNInstanceNormalizationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNInstanceNormalizationGradientNode {}
impl INSObject for MPSCNNInstanceNormalizationGradientNode {}
impl PNSObject for MPSCNNInstanceNormalizationGradientNode {}
impl IMPSCNNInstanceNormalizationGradientNode for MPSCNNInstanceNormalizationGradientNode {}
pub trait IMPSCNNInstanceNormalizationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNInstanceNormalizationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNGroupNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNGroupNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNGroupNormalizationNode {}
impl MPSCNNGroupNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNGroupNormalizationNode {}
impl IMPSNNFilterNode for MPSCNNGroupNormalizationNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNGroupNormalizationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNGroupNormalizationNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNGroupNormalizationNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNGroupNormalizationNode")
        }
    }
}
impl INSObject for MPSCNNGroupNormalizationNode {}
impl PNSObject for MPSCNNGroupNormalizationNode {}
impl IMPSCNNGroupNormalizationNode for MPSCNNGroupNormalizationNode {}
pub trait IMPSCNNGroupNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_dataSource_(
        &self,
        source: MPSNNImageNode,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, dataSource : dataSource)
    }
    unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, trainingStyle)
    }
    unsafe fn setTrainingStyle_(&self, trainingStyle: MPSNNTrainingStyle)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTrainingStyle : trainingStyle)
    }
    unsafe fn nodeWithSource_dataSource_(
        source: MPSNNImageNode,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationNode").unwrap(), nodeWithSource : source, dataSource : dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNGroupNormalizationGradientNode(pub id);
impl std::ops::Deref for MPSCNNGroupNormalizationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNGroupNormalizationGradientNode {}
impl MPSCNNGroupNormalizationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNGroupNormalizationGradientNode {}
impl IMPSNNGradientFilterNode for MPSCNNGroupNormalizationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNGroupNormalizationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNGroupNormalizationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNGroupNormalizationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNGroupNormalizationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNGroupNormalizationGradientNode {}
impl INSObject for MPSCNNGroupNormalizationGradientNode {}
impl PNSObject for MPSCNNGroupNormalizationGradientNode {}
impl IMPSCNNGroupNormalizationGradientNode for MPSCNNGroupNormalizationGradientNode {}
pub trait IMPSCNNGroupNormalizationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNGroupNormalizationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalizationNode(pub id);
impl std::ops::Deref for MPSCNNBatchNormalizationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalizationNode {}
impl MPSCNNBatchNormalizationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNBatchNormalizationNode {}
impl IMPSNNFilterNode for MPSCNNBatchNormalizationNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNBatchNormalizationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNBatchNormalizationNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNBatchNormalizationNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNBatchNormalizationNode")
        }
    }
}
impl INSObject for MPSCNNBatchNormalizationNode {}
impl PNSObject for MPSCNNBatchNormalizationNode {}
impl IMPSCNNBatchNormalizationNode for MPSCNNBatchNormalizationNode {}
pub trait IMPSCNNBatchNormalizationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_dataSource_(
        &self,
        source: MPSNNImageNode,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, dataSource : dataSource)
    }
    unsafe fn flags(&self) -> MPSCNNBatchNormalizationFlags
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, flags)
    }
    unsafe fn setFlags_(&self, flags: MPSCNNBatchNormalizationFlags)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFlags : flags)
    }
    unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, trainingStyle)
    }
    unsafe fn setTrainingStyle_(&self, trainingStyle: MPSNNTrainingStyle)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTrainingStyle : trainingStyle)
    }
    unsafe fn nodeWithSource_dataSource_(
        source: MPSNNImageNode,
        dataSource: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationNode").unwrap(), nodeWithSource : source, dataSource : dataSource)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNBatchNormalizationGradientNode(pub id);
impl std::ops::Deref for MPSCNNBatchNormalizationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNBatchNormalizationGradientNode {}
impl MPSCNNBatchNormalizationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationGradientNode").unwrap(), alloc) })
    }
}
impl PMPSNNTrainableNode for MPSCNNBatchNormalizationGradientNode {}
impl IMPSNNGradientFilterNode for MPSCNNBatchNormalizationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNBatchNormalizationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNBatchNormalizationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNBatchNormalizationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNBatchNormalizationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNBatchNormalizationGradientNode {}
impl INSObject for MPSCNNBatchNormalizationGradientNode {}
impl PNSObject for MPSCNNBatchNormalizationGradientNode {}
impl IMPSCNNBatchNormalizationGradientNode for MPSCNNBatchNormalizationGradientNode {}
pub trait IMPSCNNBatchNormalizationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNBatchNormalizationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
pub trait PMPSImageTransformProvider: Sized + std::ops::Deref {
    unsafe fn transformForSourceImage_handle_(
        &self,
        image: MPSImage,
        handle: *mut u64,
    ) -> MPSScaleTransform
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, transformForSourceImage : image, handle : handle)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNScaleNode(pub id);
impl std::ops::Deref for MPSNNScaleNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNScaleNode {}
impl MPSNNScaleNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNScaleNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNScaleNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNScaleNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNScaleNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNScaleNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNScaleNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNScaleNode")
        }
    }
}
impl INSObject for MPSNNScaleNode {}
impl PNSObject for MPSNNScaleNode {}
impl IMPSNNScaleNode for MPSNNScaleNode {}
pub trait IMPSNNScaleNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_outputSize_(
        &self,
        sourceNode: MPSNNImageNode,
        size: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, outputSize : size)
    }
    unsafe fn initWithSource_transformProvider_outputSize_(
        &self,
        sourceNode: MPSNNImageNode,
        transformProvider: *mut u64,
        size: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, transformProvider : transformProvider, outputSize : size)
    }
    unsafe fn nodeWithSource_outputSize_(sourceNode: MPSNNImageNode, size: MTLSize) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNScaleNode").unwrap(), nodeWithSource : sourceNode, outputSize : size)
    }
    unsafe fn nodeWithSource_transformProvider_outputSize_(
        sourceNode: MPSNNImageNode,
        transformProvider: *mut u64,
        size: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNScaleNode").unwrap(), nodeWithSource : sourceNode, transformProvider : transformProvider, outputSize : size)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNBilinearScaleNode(pub id);
impl std::ops::Deref for MPSNNBilinearScaleNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNBilinearScaleNode {}
impl MPSNNBilinearScaleNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNBilinearScaleNode").unwrap(), alloc) })
    }
}
impl IMPSNNScaleNode for MPSNNBilinearScaleNode {}
impl From<MPSNNBilinearScaleNode> for MPSNNScaleNode {
    fn from(child: MPSNNBilinearScaleNode) -> MPSNNScaleNode {
        MPSNNScaleNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNScaleNode> for MPSNNBilinearScaleNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNScaleNode) -> Result<MPSNNBilinearScaleNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNBilinearScaleNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNBilinearScaleNode(parent.0))
        } else {
            Err("This MPSNNScaleNode cannot be downcasted to MPSNNBilinearScaleNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNBilinearScaleNode {}
impl INSObject for MPSNNBilinearScaleNode {}
impl PNSObject for MPSNNBilinearScaleNode {}
impl IMPSNNBilinearScaleNode for MPSNNBilinearScaleNode {}
pub trait IMPSNNBilinearScaleNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNLanczosScaleNode(pub id);
impl std::ops::Deref for MPSNNLanczosScaleNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNLanczosScaleNode {}
impl MPSNNLanczosScaleNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLanczosScaleNode").unwrap(), alloc) })
    }
}
impl IMPSNNScaleNode for MPSNNLanczosScaleNode {}
impl std::convert::TryFrom<MPSNNScaleNode> for MPSNNLanczosScaleNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNScaleNode) -> Result<MPSNNLanczosScaleNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNLanczosScaleNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNLanczosScaleNode(parent.0))
        } else {
            Err("This MPSNNScaleNode cannot be downcasted to MPSNNLanczosScaleNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNLanczosScaleNode {}
impl INSObject for MPSNNLanczosScaleNode {}
impl PNSObject for MPSNNLanczosScaleNode {}
impl IMPSNNLanczosScaleNode for MPSNNLanczosScaleNode {}
pub trait IMPSNNLanczosScaleNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNBinaryArithmeticNode(pub id);
impl std::ops::Deref for MPSNNBinaryArithmeticNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNBinaryArithmeticNode {}
impl MPSNNBinaryArithmeticNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNBinaryArithmeticNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNBinaryArithmeticNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNBinaryArithmeticNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNBinaryArithmeticNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNBinaryArithmeticNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNBinaryArithmeticNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNBinaryArithmeticNode")
        }
    }
}
impl INSObject for MPSNNBinaryArithmeticNode {}
impl PNSObject for MPSNNBinaryArithmeticNode {}
impl IMPSNNBinaryArithmeticNode for MPSNNBinaryArithmeticNode {}
pub trait IMPSNNBinaryArithmeticNode: Sized + std::ops::Deref {
    unsafe fn initWithSources_(&self, sourceNodes: NSArray) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSources : sourceNodes)
    }
    unsafe fn initWithLeftSource_rightSource_(
        &self,
        left: MPSNNImageNode,
        right: MPSNNImageNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithLeftSource : left, rightSource : right)
    }
    unsafe fn gradientClass(&self) -> Class
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, gradientClass)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn gradientFiltersWithSources_(&self, gradientImages: NSArray) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSources : gradientImages)
    }
    unsafe fn primaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryScale)
    }
    unsafe fn setPrimaryScale_(&self, primaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryScale : primaryScale)
    }
    unsafe fn secondaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryScale)
    }
    unsafe fn setSecondaryScale_(&self, secondaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryScale : secondaryScale)
    }
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
    unsafe fn primaryStrideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInPixelsX)
    }
    unsafe fn setPrimaryStrideInPixelsX_(&self, primaryStrideInPixelsX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInPixelsX : primaryStrideInPixelsX)
    }
    unsafe fn primaryStrideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInPixelsY)
    }
    unsafe fn setPrimaryStrideInPixelsY_(&self, primaryStrideInPixelsY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInPixelsY : primaryStrideInPixelsY)
    }
    unsafe fn primaryStrideInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrideInFeatureChannels)
    }
    unsafe fn setPrimaryStrideInFeatureChannels_(&self, primaryStrideInFeatureChannels: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryStrideInFeatureChannels : primaryStrideInFeatureChannels)
    }
    unsafe fn secondaryStrideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixelsX)
    }
    unsafe fn setSecondaryStrideInPixelsX_(&self, secondaryStrideInPixelsX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixelsX : secondaryStrideInPixelsX)
    }
    unsafe fn secondaryStrideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixelsY)
    }
    unsafe fn setSecondaryStrideInPixelsY_(&self, secondaryStrideInPixelsY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixelsY : secondaryStrideInPixelsY)
    }
    unsafe fn secondaryStrideInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInFeatureChannels)
    }
    unsafe fn setSecondaryStrideInFeatureChannels_(
        &self,
        secondaryStrideInFeatureChannels: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInFeatureChannels : secondaryStrideInFeatureChannels)
    }
    unsafe fn minimumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimumValue)
    }
    unsafe fn setMinimumValue_(&self, minimumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimumValue : minimumValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn setMaximumValue_(&self, maximumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaximumValue : maximumValue)
    }
    unsafe fn nodeWithSources_(sourceNodes: NSArray) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNBinaryArithmeticNode").unwrap(), nodeWithSources : sourceNodes)
    }
    unsafe fn nodeWithLeftSource_rightSource_(
        left: MPSNNImageNode,
        right: MPSNNImageNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNBinaryArithmeticNode").unwrap(), nodeWithLeftSource : left, rightSource : right)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNAdditionNode(pub id);
impl std::ops::Deref for MPSNNAdditionNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNAdditionNode {}
impl MPSNNAdditionNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNAdditionNode").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryArithmeticNode for MPSNNAdditionNode {}
impl From<MPSNNAdditionNode> for MPSNNBinaryArithmeticNode {
    fn from(child: MPSNNAdditionNode) -> MPSNNBinaryArithmeticNode {
        MPSNNBinaryArithmeticNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNBinaryArithmeticNode> for MPSNNAdditionNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNBinaryArithmeticNode) -> Result<MPSNNAdditionNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNAdditionNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNAdditionNode(parent.0))
        } else {
            Err("This MPSNNBinaryArithmeticNode cannot be downcasted to MPSNNAdditionNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNAdditionNode {}
impl INSObject for MPSNNAdditionNode {}
impl PNSObject for MPSNNAdditionNode {}
impl IMPSNNAdditionNode for MPSNNAdditionNode {}
pub trait IMPSNNAdditionNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNSubtractionNode(pub id);
impl std::ops::Deref for MPSNNSubtractionNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNSubtractionNode {}
impl MPSNNSubtractionNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNSubtractionNode").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryArithmeticNode for MPSNNSubtractionNode {}
impl std::convert::TryFrom<MPSNNBinaryArithmeticNode> for MPSNNSubtractionNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNBinaryArithmeticNode) -> Result<MPSNNSubtractionNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNSubtractionNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNSubtractionNode(parent.0))
        } else {
            Err("This MPSNNBinaryArithmeticNode cannot be downcasted to MPSNNSubtractionNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNSubtractionNode {}
impl INSObject for MPSNNSubtractionNode {}
impl PNSObject for MPSNNSubtractionNode {}
impl IMPSNNSubtractionNode for MPSNNSubtractionNode {}
pub trait IMPSNNSubtractionNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNMultiplicationNode(pub id);
impl std::ops::Deref for MPSNNMultiplicationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNMultiplicationNode {}
impl MPSNNMultiplicationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNMultiplicationNode").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryArithmeticNode for MPSNNMultiplicationNode {}
impl std::convert::TryFrom<MPSNNBinaryArithmeticNode> for MPSNNMultiplicationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNBinaryArithmeticNode) -> Result<MPSNNMultiplicationNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNMultiplicationNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNMultiplicationNode(parent.0))
        } else {
            Err("This MPSNNBinaryArithmeticNode cannot be downcasted to MPSNNMultiplicationNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNMultiplicationNode {}
impl INSObject for MPSNNMultiplicationNode {}
impl PNSObject for MPSNNMultiplicationNode {}
impl IMPSNNMultiplicationNode for MPSNNMultiplicationNode {}
pub trait IMPSNNMultiplicationNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNDivisionNode(pub id);
impl std::ops::Deref for MPSNNDivisionNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNDivisionNode {}
impl MPSNNDivisionNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNDivisionNode").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryArithmeticNode for MPSNNDivisionNode {}
impl std::convert::TryFrom<MPSNNBinaryArithmeticNode> for MPSNNDivisionNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNBinaryArithmeticNode) -> Result<MPSNNDivisionNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNDivisionNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNDivisionNode(parent.0))
        } else {
            Err("This MPSNNBinaryArithmeticNode cannot be downcasted to MPSNNDivisionNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNDivisionNode {}
impl INSObject for MPSNNDivisionNode {}
impl PNSObject for MPSNNDivisionNode {}
impl IMPSNNDivisionNode for MPSNNDivisionNode {}
pub trait IMPSNNDivisionNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNComparisonNode(pub id);
impl std::ops::Deref for MPSNNComparisonNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNComparisonNode {}
impl MPSNNComparisonNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNComparisonNode").unwrap(), alloc) })
    }
}
impl IMPSNNBinaryArithmeticNode for MPSNNComparisonNode {}
impl std::convert::TryFrom<MPSNNBinaryArithmeticNode> for MPSNNComparisonNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNBinaryArithmeticNode) -> Result<MPSNNComparisonNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNComparisonNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNComparisonNode(parent.0))
        } else {
            Err("This MPSNNBinaryArithmeticNode cannot be downcasted to MPSNNComparisonNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNComparisonNode {}
impl INSObject for MPSNNComparisonNode {}
impl PNSObject for MPSNNComparisonNode {}
impl IMPSNNComparisonNode for MPSNNComparisonNode {}
pub trait IMPSNNComparisonNode: Sized + std::ops::Deref {
    unsafe fn comparisonType(&self) -> MPSNNComparisonType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, comparisonType)
    }
    unsafe fn setComparisonType_(&self, comparisonType: MPSNNComparisonType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setComparisonType : comparisonType)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNArithmeticGradientNode(pub id);
impl std::ops::Deref for MPSNNArithmeticGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNArithmeticGradientNode {}
impl MPSNNArithmeticGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNArithmeticGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNArithmeticGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNArithmeticGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSNNArithmeticGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNArithmeticGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNArithmeticGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSNNArithmeticGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNArithmeticGradientNode {}
impl INSObject for MPSNNArithmeticGradientNode {}
impl PNSObject for MPSNNArithmeticGradientNode {}
impl IMPSNNArithmeticGradientNode for MPSNNArithmeticGradientNode {}
pub trait IMPSNNArithmeticGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNBinaryGradientStateNode,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, isSecondarySourceFilter : isSecondarySourceFilter)
    }
    unsafe fn initWithGradientImages_forwardFilter_isSecondarySourceFilter_(
        &self,
        gradientImages: NSArray,
        filter: MPSNNFilterNode,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithGradientImages : gradientImages, forwardFilter : filter, isSecondarySourceFilter : isSecondarySourceFilter)
    }
    unsafe fn primaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryScale)
    }
    unsafe fn setPrimaryScale_(&self, primaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPrimaryScale : primaryScale)
    }
    unsafe fn secondaryScale(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryScale)
    }
    unsafe fn setSecondaryScale_(&self, secondaryScale: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryScale : secondaryScale)
    }
    unsafe fn bias(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bias)
    }
    unsafe fn setBias_(&self, bias: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBias : bias)
    }
    unsafe fn secondaryStrideInPixelsX(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixelsX)
    }
    unsafe fn setSecondaryStrideInPixelsX_(&self, secondaryStrideInPixelsX: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixelsX : secondaryStrideInPixelsX)
    }
    unsafe fn secondaryStrideInPixelsY(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInPixelsY)
    }
    unsafe fn setSecondaryStrideInPixelsY_(&self, secondaryStrideInPixelsY: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInPixelsY : secondaryStrideInPixelsY)
    }
    unsafe fn secondaryStrideInFeatureChannels(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrideInFeatureChannels)
    }
    unsafe fn setSecondaryStrideInFeatureChannels_(
        &self,
        secondaryStrideInFeatureChannels: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setSecondaryStrideInFeatureChannels : secondaryStrideInFeatureChannels)
    }
    unsafe fn minimumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimumValue)
    }
    unsafe fn setMinimumValue_(&self, minimumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimumValue : minimumValue)
    }
    unsafe fn maximumValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maximumValue)
    }
    unsafe fn setMaximumValue_(&self, maximumValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaximumValue : maximumValue)
    }
    unsafe fn isSecondarySourceFilter(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isSecondarySourceFilter)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNBinaryGradientStateNode,
        isSecondarySourceFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNArithmeticGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, isSecondarySourceFilter : isSecondarySourceFilter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNAdditionGradientNode(pub id);
impl std::ops::Deref for MPSNNAdditionGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNAdditionGradientNode {}
impl MPSNNAdditionGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNAdditionGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNArithmeticGradientNode for MPSNNAdditionGradientNode {}
impl From<MPSNNAdditionGradientNode> for MPSNNArithmeticGradientNode {
    fn from(child: MPSNNAdditionGradientNode) -> MPSNNArithmeticGradientNode {
        MPSNNArithmeticGradientNode(child.0)
    }
}
impl std::convert::TryFrom<MPSNNArithmeticGradientNode> for MPSNNAdditionGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNArithmeticGradientNode,
    ) -> Result<MPSNNAdditionGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNAdditionGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNAdditionGradientNode(parent.0))
        } else {
            Err ("This MPSNNArithmeticGradientNode cannot be downcasted to MPSNNAdditionGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSNNAdditionGradientNode {}
impl IMPSNNFilterNode for MPSNNAdditionGradientNode {}
impl INSObject for MPSNNAdditionGradientNode {}
impl PNSObject for MPSNNAdditionGradientNode {}
impl IMPSNNAdditionGradientNode for MPSNNAdditionGradientNode {}
pub trait IMPSNNAdditionGradientNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNSubtractionGradientNode(pub id);
impl std::ops::Deref for MPSNNSubtractionGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNSubtractionGradientNode {}
impl MPSNNSubtractionGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNSubtractionGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNArithmeticGradientNode for MPSNNSubtractionGradientNode {}
impl std::convert::TryFrom<MPSNNArithmeticGradientNode> for MPSNNSubtractionGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNArithmeticGradientNode,
    ) -> Result<MPSNNSubtractionGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNSubtractionGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNSubtractionGradientNode(parent.0))
        } else {
            Err ("This MPSNNArithmeticGradientNode cannot be downcasted to MPSNNSubtractionGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSNNSubtractionGradientNode {}
impl IMPSNNFilterNode for MPSNNSubtractionGradientNode {}
impl INSObject for MPSNNSubtractionGradientNode {}
impl PNSObject for MPSNNSubtractionGradientNode {}
impl IMPSNNSubtractionGradientNode for MPSNNSubtractionGradientNode {}
pub trait IMPSNNSubtractionGradientNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNMultiplicationGradientNode(pub id);
impl std::ops::Deref for MPSNNMultiplicationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNMultiplicationGradientNode {}
impl MPSNNMultiplicationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNMultiplicationGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNArithmeticGradientNode for MPSNNMultiplicationGradientNode {}
impl std::convert::TryFrom<MPSNNArithmeticGradientNode> for MPSNNMultiplicationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNArithmeticGradientNode,
    ) -> Result<MPSNNMultiplicationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNMultiplicationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNMultiplicationGradientNode(parent.0))
        } else {
            Err ("This MPSNNArithmeticGradientNode cannot be downcasted to MPSNNMultiplicationGradientNode" ,)
        }
    }
}
impl IMPSNNGradientFilterNode for MPSNNMultiplicationGradientNode {}
impl IMPSNNFilterNode for MPSNNMultiplicationGradientNode {}
impl INSObject for MPSNNMultiplicationGradientNode {}
impl PNSObject for MPSNNMultiplicationGradientNode {}
impl IMPSNNMultiplicationGradientNode for MPSNNMultiplicationGradientNode {}
pub trait IMPSNNMultiplicationGradientNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDropoutNode(pub id);
impl std::ops::Deref for MPSCNNDropoutNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDropoutNode {}
impl MPSCNNDropoutNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNDropoutNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNDropoutNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNDropoutNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDropoutNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDropoutNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNDropoutNode")
        }
    }
}
impl INSObject for MPSCNNDropoutNode {}
impl PNSObject for MPSCNNDropoutNode {}
impl IMPSCNNDropoutNode for MPSCNNDropoutNode {}
pub trait IMPSCNNDropoutNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, source: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source)
    }
    unsafe fn initWithSource_keepProbability_(
        &self,
        source: MPSNNImageNode,
        keepProbability: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, keepProbability : keepProbability)
    }
    unsafe fn initWithSource_keepProbability_seed_maskStrideInPixels_(
        &self,
        source: MPSNNImageNode,
        keepProbability: f32,
        seed: NSUInteger,
        maskStrideInPixels: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, keepProbability : keepProbability, seed : seed, maskStrideInPixels : maskStrideInPixels)
    }
    unsafe fn keepProbability(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, keepProbability)
    }
    unsafe fn seed(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, seed)
    }
    unsafe fn maskStrideInPixels(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskStrideInPixels)
    }
    unsafe fn nodeWithSource_(source: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutNode").unwrap(), nodeWithSource : source)
    }
    unsafe fn nodeWithSource_keepProbability_(
        source: MPSNNImageNode,
        keepProbability: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutNode").unwrap(), nodeWithSource : source, keepProbability : keepProbability)
    }
    unsafe fn nodeWithSource_keepProbability_seed_maskStrideInPixels_(
        source: MPSNNImageNode,
        keepProbability: f32,
        seed: NSUInteger,
        maskStrideInPixels: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutNode").unwrap(), nodeWithSource : source, keepProbability : keepProbability, seed : seed, maskStrideInPixels : maskStrideInPixels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNDropoutGradientNode(pub id);
impl std::ops::Deref for MPSCNNDropoutGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNDropoutGradientNode {}
impl MPSCNNDropoutGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNDropoutGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNDropoutGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSCNNDropoutGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNDropoutGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNDropoutGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNDropoutGradientNode {}
impl INSObject for MPSCNNDropoutGradientNode {}
impl PNSObject for MPSCNNDropoutGradientNode {}
impl IMPSCNNDropoutGradientNode for MPSCNNDropoutGradientNode {}
pub trait IMPSCNNDropoutGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_keepProbability_seed_maskStrideInPixels_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        keepProbability: f32,
        seed: NSUInteger,
        maskStrideInPixels: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, keepProbability : keepProbability, seed : seed, maskStrideInPixels : maskStrideInPixels)
    }
    unsafe fn keepProbability(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, keepProbability)
    }
    unsafe fn seed(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, seed)
    }
    unsafe fn maskStrideInPixels(&self) -> MTLSize
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskStrideInPixels)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_keepProbability_seed_maskStrideInPixels_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        keepProbability: f32,
        seed: NSUInteger,
        maskStrideInPixels: MTLSize,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNDropoutGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, keepProbability : keepProbability, seed : seed, maskStrideInPixels : maskStrideInPixels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNLabelsNode(pub id);
impl std::ops::Deref for MPSNNLabelsNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNLabelsNode {}
impl MPSNNLabelsNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLabelsNode").unwrap(), alloc) })
    }
}
impl IMPSNNStateNode for MPSNNLabelsNode {}
impl std::convert::TryFrom<MPSNNStateNode> for MPSNNLabelsNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNStateNode) -> Result<MPSNNLabelsNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNLabelsNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNLabelsNode(parent.0))
        } else {
            Err("This MPSNNStateNode cannot be downcasted to MPSNNLabelsNode")
        }
    }
}
impl INSObject for MPSNNLabelsNode {}
impl PNSObject for MPSNNLabelsNode {}
impl IMPSNNLabelsNode for MPSNNLabelsNode {}
pub trait IMPSNNLabelsNode: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLossNode(pub id);
impl std::ops::Deref for MPSCNNLossNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLossNode {}
impl MPSCNNLossNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNLossNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNLossNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNLossNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLossNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLossNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNLossNode")
        }
    }
}
impl INSObject for MPSCNNLossNode {}
impl PNSObject for MPSCNNLossNode {}
impl IMPSCNNLossNode for MPSCNNLossNode {}
pub trait IMPSCNNLossNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_lossDescriptor_(
        &self,
        source: MPSNNImageNode,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, lossDescriptor : descriptor)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn inputLabels(&self) -> MPSNNLabelsNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputLabels)
    }
    unsafe fn nodeWithSource_lossDescriptor_(
        source: MPSNNImageNode,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLossNode").unwrap(), nodeWithSource : source, lossDescriptor : descriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNYOLOLossNode(pub id);
impl std::ops::Deref for MPSCNNYOLOLossNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNYOLOLossNode {}
impl MPSCNNYOLOLossNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNYOLOLossNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNYOLOLossNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNYOLOLossNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNYOLOLossNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNYOLOLossNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNYOLOLossNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNYOLOLossNode")
        }
    }
}
impl INSObject for MPSCNNYOLOLossNode {}
impl PNSObject for MPSCNNYOLOLossNode {}
impl IMPSCNNYOLOLossNode for MPSCNNYOLOLossNode {}
pub trait IMPSCNNYOLOLossNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_lossDescriptor_(
        &self,
        source: MPSNNImageNode,
        descriptor: MPSCNNYOLOLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, lossDescriptor : descriptor)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn inputLabels(&self) -> MPSNNLabelsNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, inputLabels)
    }
    unsafe fn nodeWithSource_lossDescriptor_(
        source: MPSNNImageNode,
        descriptor: MPSCNNYOLOLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNYOLOLossNode").unwrap(), nodeWithSource : source, lossDescriptor : descriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNConcatenationNode(pub id);
impl std::ops::Deref for MPSNNConcatenationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNConcatenationNode {}
impl MPSNNConcatenationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNConcatenationNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNConcatenationNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNConcatenationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNConcatenationNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNConcatenationNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNConcatenationNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNConcatenationNode")
        }
    }
}
impl INSObject for MPSNNConcatenationNode {}
impl PNSObject for MPSNNConcatenationNode {}
impl IMPSNNConcatenationNode for MPSNNConcatenationNode {}
pub trait IMPSNNConcatenationNode: Sized + std::ops::Deref {
    unsafe fn initWithSources_(&self, sourceNodes: NSArray) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSources : sourceNodes)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn nodeWithSources_(sourceNodes: NSArray) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNConcatenationNode").unwrap(), nodeWithSources : sourceNodes)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNConcatenationGradientNode(pub id);
impl std::ops::Deref for MPSNNConcatenationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNConcatenationGradientNode {}
impl MPSNNConcatenationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNConcatenationGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNConcatenationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNConcatenationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSNNConcatenationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNConcatenationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNConcatenationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSNNConcatenationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNConcatenationGradientNode {}
impl INSObject for MPSNNConcatenationGradientNode {}
impl PNSObject for MPSNNConcatenationGradientNode {}
impl IMPSNNConcatenationGradientNode for MPSNNConcatenationGradientNode {}
pub trait IMPSNNConcatenationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        gradientSourceNode: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : gradientSourceNode, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        gradientSourceNode: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNConcatenationGradientNode").unwrap(), nodeWithSourceGradient : gradientSourceNode, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReshapeNode(pub id);
impl std::ops::Deref for MPSNNReshapeNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReshapeNode {}
impl MPSNNReshapeNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReshapeNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNReshapeNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNReshapeNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNReshapeNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReshapeNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReshapeNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNReshapeNode")
        }
    }
}
impl INSObject for MPSNNReshapeNode {}
impl PNSObject for MPSNNReshapeNode {}
impl IMPSNNReshapeNode for MPSNNReshapeNode {}
pub trait IMPSNNReshapeNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_resultWidth_resultHeight_resultFeatureChannels_(
        &self,
        source: MPSNNImageNode,
        resultWidth: NSUInteger,
        resultHeight: NSUInteger,
        resultFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, resultWidth : resultWidth, resultHeight : resultHeight, resultFeatureChannels : resultFeatureChannels)
    }
    unsafe fn nodeWithSource_resultWidth_resultHeight_resultFeatureChannels_(
        source: MPSNNImageNode,
        resultWidth: NSUInteger,
        resultHeight: NSUInteger,
        resultFeatureChannels: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReshapeNode").unwrap(), nodeWithSource : source, resultWidth : resultWidth, resultHeight : resultHeight, resultFeatureChannels : resultFeatureChannels)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReshapeGradientNode(pub id);
impl std::ops::Deref for MPSNNReshapeGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReshapeGradientNode {}
impl MPSNNReshapeGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReshapeGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNReshapeGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNReshapeGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSNNReshapeGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReshapeGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNReshapeGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSNNReshapeGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNReshapeGradientNode {}
impl INSObject for MPSNNReshapeGradientNode {}
impl PNSObject for MPSNNReshapeGradientNode {}
impl IMPSNNReshapeGradientNode for MPSNNReshapeGradientNode {}
pub trait IMPSNNReshapeGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReshapeGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNReductionSpatialMeanGradientNode(pub id);
impl std::ops::Deref for MPSNNReductionSpatialMeanGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNReductionSpatialMeanGradientNode {}
impl MPSNNReductionSpatialMeanGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionSpatialMeanGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNReductionSpatialMeanGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNReductionSpatialMeanGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSNNReductionSpatialMeanGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNReductionSpatialMeanGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNReductionSpatialMeanGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSNNReductionSpatialMeanGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNReductionSpatialMeanGradientNode {}
impl INSObject for MPSNNReductionSpatialMeanGradientNode {}
impl PNSObject for MPSNNReductionSpatialMeanGradientNode {}
impl IMPSNNReductionSpatialMeanGradientNode for MPSNNReductionSpatialMeanGradientNode {}
pub trait IMPSNNReductionSpatialMeanGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNReductionSpatialMeanGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNPadNode(pub id);
impl std::ops::Deref for MPSNNPadNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNPadNode {}
impl MPSNNPadNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNPadNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNPadNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNPadNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNPadNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNPadNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNPadNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNPadNode")
        }
    }
}
impl INSObject for MPSNNPadNode {}
impl PNSObject for MPSNNPadNode {}
impl IMPSNNPadNode for MPSNNPadNode {}
pub trait IMPSNNPadNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_paddingSizeBefore_paddingSizeAfter_edgeMode_(
        &self,
        source: MPSNNImageNode,
        paddingSizeBefore: MPSImageCoordinate,
        paddingSizeAfter: MPSImageCoordinate,
        edgeMode: MPSImageEdgeMode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, paddingSizeBefore : paddingSizeBefore, paddingSizeAfter : paddingSizeAfter, edgeMode : edgeMode)
    }
    unsafe fn fillValue(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, fillValue)
    }
    unsafe fn setFillValue_(&self, fillValue: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFillValue : fillValue)
    }
    unsafe fn nodeWithSource_paddingSizeBefore_paddingSizeAfter_edgeMode_(
        source: MPSNNImageNode,
        paddingSizeBefore: MPSImageCoordinate,
        paddingSizeAfter: MPSImageCoordinate,
        edgeMode: MPSImageEdgeMode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNPadNode").unwrap(), nodeWithSource : source, paddingSizeBefore : paddingSizeBefore, paddingSizeAfter : paddingSizeAfter, edgeMode : edgeMode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNPadGradientNode(pub id);
impl std::ops::Deref for MPSNNPadGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNPadGradientNode {}
impl MPSNNPadGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNPadGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNPadGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNPadGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSNNPadGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNPadGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNPadGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSNNPadGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNPadGradientNode {}
impl INSObject for MPSNNPadGradientNode {}
impl PNSObject for MPSNNPadGradientNode {}
impl IMPSNNPadGradientNode for MPSNNPadGradientNode {}
pub trait IMPSNNPadGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNPadGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSoftMaxNode(pub id);
impl std::ops::Deref for MPSCNNSoftMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSoftMaxNode {}
impl MPSCNNSoftMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNSoftMaxNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNSoftMaxNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNSoftMaxNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSoftMaxNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNSoftMaxNode")
        }
    }
}
impl INSObject for MPSCNNSoftMaxNode {}
impl PNSObject for MPSCNNSoftMaxNode {}
impl IMPSCNNSoftMaxNode for MPSCNNSoftMaxNode {}
pub trait IMPSCNNSoftMaxNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNSoftMaxGradientNode(pub id);
impl std::ops::Deref for MPSCNNSoftMaxGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNSoftMaxGradientNode {}
impl MPSCNNSoftMaxGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNSoftMaxGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNSoftMaxGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSCNNSoftMaxGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNSoftMaxGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNSoftMaxGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNSoftMaxGradientNode {}
impl INSObject for MPSCNNSoftMaxGradientNode {}
impl PNSObject for MPSCNNSoftMaxGradientNode {}
impl IMPSCNNSoftMaxGradientNode for MPSCNNSoftMaxGradientNode {}
pub trait IMPSCNNSoftMaxGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNSoftMaxGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLogSoftMaxNode(pub id);
impl std::ops::Deref for MPSCNNLogSoftMaxNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLogSoftMaxNode {}
impl MPSCNNLogSoftMaxNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNLogSoftMaxNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNLogSoftMaxNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNLogSoftMaxNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLogSoftMaxNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNLogSoftMaxNode")
        }
    }
}
impl INSObject for MPSCNNLogSoftMaxNode {}
impl PNSObject for MPSCNNLogSoftMaxNode {}
impl IMPSCNNLogSoftMaxNode for MPSCNNLogSoftMaxNode {}
pub trait IMPSCNNLogSoftMaxNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxNode").unwrap(), nodeWithSource : sourceNode)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNLogSoftMaxGradientNode(pub id);
impl std::ops::Deref for MPSCNNLogSoftMaxGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNLogSoftMaxGradientNode {}
impl MPSCNNLogSoftMaxGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNLogSoftMaxGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNLogSoftMaxGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNLogSoftMaxGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNLogSoftMaxGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNLogSoftMaxGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSCNNLogSoftMaxGradientNode {}
impl INSObject for MPSCNNLogSoftMaxGradientNode {}
impl PNSObject for MPSCNNLogSoftMaxGradientNode {}
impl IMPSCNNLogSoftMaxGradientNode for MPSCNNLogSoftMaxGradientNode {}
pub trait IMPSCNNLogSoftMaxGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNLogSoftMaxGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingNearestNode(pub id);
impl std::ops::Deref for MPSCNNUpsamplingNearestNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingNearestNode {}
impl MPSCNNUpsamplingNearestNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNUpsamplingNearestNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNUpsamplingNearestNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNUpsamplingNearestNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNUpsamplingNearestNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNUpsamplingNearestNode")
        }
    }
}
impl INSObject for MPSCNNUpsamplingNearestNode {}
impl PNSObject for MPSCNNUpsamplingNearestNode {}
impl IMPSCNNUpsamplingNearestNode for MPSCNNUpsamplingNearestNode {}
pub trait IMPSCNNUpsamplingNearestNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_integerScaleFactorX_integerScaleFactorY_(
        &self,
        sourceNode: MPSNNImageNode,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
    unsafe fn scaleFactorX(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorX)
    }
    unsafe fn scaleFactorY(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorY)
    }
    unsafe fn nodeWithSource_integerScaleFactorX_integerScaleFactorY_(
        sourceNode: MPSNNImageNode,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestNode").unwrap(), nodeWithSource : sourceNode, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingBilinearNode(pub id);
impl std::ops::Deref for MPSCNNUpsamplingBilinearNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingBilinearNode {}
impl MPSCNNUpsamplingBilinearNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSCNNUpsamplingBilinearNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSCNNUpsamplingBilinearNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSCNNUpsamplingBilinearNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearNode").unwrap()) };
        if is_kind_of {
            Ok(MPSCNNUpsamplingBilinearNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSCNNUpsamplingBilinearNode")
        }
    }
}
impl INSObject for MPSCNNUpsamplingBilinearNode {}
impl PNSObject for MPSCNNUpsamplingBilinearNode {}
impl IMPSCNNUpsamplingBilinearNode for MPSCNNUpsamplingBilinearNode {}
pub trait IMPSCNNUpsamplingBilinearNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_integerScaleFactorX_integerScaleFactorY_(
        &self,
        sourceNode: MPSNNImageNode,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
    unsafe fn initWithSource_integerScaleFactorX_integerScaleFactorY_alignCorners_(
        &self,
        sourceNode: MPSNNImageNode,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
        alignCorners: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY, alignCorners : alignCorners)
    }
    unsafe fn scaleFactorX(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorX)
    }
    unsafe fn scaleFactorY(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorY)
    }
    unsafe fn alignCorners(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alignCorners)
    }
    unsafe fn nodeWithSource_integerScaleFactorX_integerScaleFactorY_(
        sourceNode: MPSNNImageNode,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearNode").unwrap(), nodeWithSource : sourceNode, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY)
    }
    unsafe fn nodeWithSource_integerScaleFactorX_integerScaleFactorY_alignCorners_(
        sourceNode: MPSNNImageNode,
        integerScaleFactorX: NSUInteger,
        integerScaleFactorY: NSUInteger,
        alignCorners: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearNode").unwrap(), nodeWithSource : sourceNode, integerScaleFactorX : integerScaleFactorX, integerScaleFactorY : integerScaleFactorY, alignCorners : alignCorners)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingNearestGradientNode(pub id);
impl std::ops::Deref for MPSCNNUpsamplingNearestGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingNearestGradientNode {}
impl MPSCNNUpsamplingNearestGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNUpsamplingNearestGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNUpsamplingNearestGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNUpsamplingNearestGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNUpsamplingNearestGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNUpsamplingNearestGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNUpsamplingNearestGradientNode {}
impl INSObject for MPSCNNUpsamplingNearestGradientNode {}
impl PNSObject for MPSCNNUpsamplingNearestGradientNode {}
impl IMPSCNNUpsamplingNearestGradientNode for MPSCNNUpsamplingNearestGradientNode {}
pub trait IMPSCNNUpsamplingNearestGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        scaleFactorX: f64,
        scaleFactorY: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, scaleFactorX : scaleFactorX, scaleFactorY : scaleFactorY)
    }
    unsafe fn scaleFactorX(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorX)
    }
    unsafe fn scaleFactorY(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorY)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        scaleFactorX: f64,
        scaleFactorY: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingNearestGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, scaleFactorX : scaleFactorX, scaleFactorY : scaleFactorY)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSCNNUpsamplingBilinearGradientNode(pub id);
impl std::ops::Deref for MPSCNNUpsamplingBilinearGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSCNNUpsamplingBilinearGradientNode {}
impl MPSCNNUpsamplingBilinearGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSCNNUpsamplingBilinearGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSCNNUpsamplingBilinearGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSCNNUpsamplingBilinearGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSCNNUpsamplingBilinearGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSCNNUpsamplingBilinearGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSCNNUpsamplingBilinearGradientNode {}
impl INSObject for MPSCNNUpsamplingBilinearGradientNode {}
impl PNSObject for MPSCNNUpsamplingBilinearGradientNode {}
impl IMPSCNNUpsamplingBilinearGradientNode for MPSCNNUpsamplingBilinearGradientNode {}
pub trait IMPSCNNUpsamplingBilinearGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        scaleFactorX: f64,
        scaleFactorY: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, scaleFactorX : scaleFactorX, scaleFactorY : scaleFactorY)
    }
    unsafe fn scaleFactorX(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorX)
    }
    unsafe fn scaleFactorY(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, scaleFactorY)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        scaleFactorX: f64,
        scaleFactorY: f64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSCNNUpsamplingBilinearGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, scaleFactorX : scaleFactorX, scaleFactorY : scaleFactorY)
    }
}
pub trait PMPSNNGramMatrixCallback: Sized + std::ops::Deref {
    unsafe fn alphaForSourceImage_destinationImage_(
        &self,
        sourceImage: MPSImage,
        destinationImage: MPSImage,
    ) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, alphaForSourceImage : sourceImage, destinationImage : destinationImage)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGramMatrixCalculationNode(pub id);
impl std::ops::Deref for MPSNNGramMatrixCalculationNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGramMatrixCalculationNode {}
impl MPSNNGramMatrixCalculationNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNGramMatrixCalculationNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNGramMatrixCalculationNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNGramMatrixCalculationNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNGramMatrixCalculationNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNGramMatrixCalculationNode")
        }
    }
}
impl INSObject for MPSNNGramMatrixCalculationNode {}
impl PNSObject for MPSNNGramMatrixCalculationNode {}
impl IMPSNNGramMatrixCalculationNode for MPSNNGramMatrixCalculationNode {}
pub trait IMPSNNGramMatrixCalculationNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode)
    }
    unsafe fn initWithSource_alpha_(&self, sourceNode: MPSNNImageNode, alpha: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : sourceNode, alpha : alpha)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn propertyCallBack(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, propertyCallBack)
    }
    unsafe fn setPropertyCallBack_(&self, propertyCallBack: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPropertyCallBack : propertyCallBack)
    }
    unsafe fn nodeWithSource_(sourceNode: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationNode").unwrap(), nodeWithSource : sourceNode)
    }
    unsafe fn nodeWithSource_alpha_(sourceNode: MPSNNImageNode, alpha: f32) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationNode").unwrap(), nodeWithSource : sourceNode, alpha : alpha)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGramMatrixCalculationGradientNode(pub id);
impl std::ops::Deref for MPSNNGramMatrixCalculationGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGramMatrixCalculationGradientNode {}
impl MPSNNGramMatrixCalculationGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNGramMatrixCalculationGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNGramMatrixCalculationGradientNode {
    type Error = &'static str;
    fn try_from(
        parent: MPSNNGradientFilterNode,
    ) -> Result<MPSNNGramMatrixCalculationGradientNode, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationGradientNode").unwrap())
        };
        if is_kind_of {
            Ok(MPSNNGramMatrixCalculationGradientNode(parent.0))
        } else {
            Err ("This MPSNNGradientFilterNode cannot be downcasted to MPSNNGramMatrixCalculationGradientNode" ,)
        }
    }
}
impl IMPSNNFilterNode for MPSNNGramMatrixCalculationGradientNode {}
impl INSObject for MPSNNGramMatrixCalculationGradientNode {}
impl PNSObject for MPSNNGramMatrixCalculationGradientNode {}
impl IMPSNNGramMatrixCalculationGradientNode for MPSNNGramMatrixCalculationGradientNode {}
pub trait IMPSNNGramMatrixCalculationGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_gradientState_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn initWithSourceGradient_sourceImage_gradientState_alpha_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        alpha: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, alpha : alpha)
    }
    unsafe fn alpha(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_gradientState_alpha_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        alpha: f32,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGramMatrixCalculationGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, gradientState : gradientState, alpha : alpha)
    }
}
pub trait PMPSNNLossCallback: Sized + std::ops::Deref {
    unsafe fn scalarWeightForSourceImage_destinationImage_(
        &self,
        sourceImage: MPSImage,
        destinationImage: MPSImage,
    ) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, scalarWeightForSourceImage : sourceImage, destinationImage : destinationImage)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNForwardLossNode(pub id);
impl std::ops::Deref for MPSNNForwardLossNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNForwardLossNode {}
impl MPSNNForwardLossNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNForwardLossNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNForwardLossNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNForwardLossNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNForwardLossNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNForwardLossNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNForwardLossNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNForwardLossNode")
        }
    }
}
impl INSObject for MPSNNForwardLossNode {}
impl PNSObject for MPSNNForwardLossNode {}
impl IMPSNNForwardLossNode for MPSNNForwardLossNode {}
pub trait IMPSNNForwardLossNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_labels_weights_lossDescriptor_(
        &self,
        source: MPSNNImageNode,
        labels: MPSNNImageNode,
        weights: MPSNNImageNode,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, labels : labels, weights : weights, lossDescriptor : descriptor)
    }
    unsafe fn initWithSource_labels_lossDescriptor_(
        &self,
        source: MPSNNImageNode,
        labels: MPSNNImageNode,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source, labels : labels, lossDescriptor : descriptor)
    }
    unsafe fn initWithSources_lossDescriptor_(
        &self,
        sourceNodes: NSArray,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSources : sourceNodes, lossDescriptor : descriptor)
    }
    unsafe fn gradientFilterWithSources_(&self, sourceGradient: NSArray) -> MPSNNLossGradientNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : sourceGradient)
    }
    unsafe fn gradientFiltersWithSources_(&self, sourceGradient: NSArray) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSources : sourceGradient)
    }
    unsafe fn gradientFilterWithSource_(
        &self,
        sourceGradient: MPSNNImageNode,
    ) -> MPSNNLossGradientNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSource : sourceGradient)
    }
    unsafe fn gradientFiltersWithSource_(&self, sourceGradient: MPSNNImageNode) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFiltersWithSource : sourceGradient)
    }
    unsafe fn lossType(&self) -> MPSCNNLossType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossType)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn numberOfClasses(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfClasses)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn labelSmoothing(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelSmoothing)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn propertyCallBack(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, propertyCallBack)
    }
    unsafe fn setPropertyCallBack_(&self, propertyCallBack: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPropertyCallBack : propertyCallBack)
    }
    unsafe fn nodeWithSource_labels_weights_lossDescriptor_(
        source: MPSNNImageNode,
        labels: MPSNNImageNode,
        weights: MPSNNImageNode,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNForwardLossNode").unwrap(), nodeWithSource : source, labels : labels, weights : weights, lossDescriptor : descriptor)
    }
    unsafe fn nodeWithSource_labels_lossDescriptor_(
        source: MPSNNImageNode,
        labels: MPSNNImageNode,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNForwardLossNode").unwrap(), nodeWithSource : source, labels : labels, lossDescriptor : descriptor)
    }
    unsafe fn nodeWithSources_lossDescriptor_(
        sourceNodes: NSArray,
        descriptor: MPSCNNLossDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNForwardLossNode").unwrap(), nodeWithSources : sourceNodes, lossDescriptor : descriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNLossGradientNode(pub id);
impl std::ops::Deref for MPSNNLossGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNLossGradientNode {}
impl MPSNNLossGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLossGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNGradientFilterNode for MPSNNLossGradientNode {}
impl std::convert::TryFrom<MPSNNGradientFilterNode> for MPSNNLossGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNGradientFilterNode) -> Result<MPSNNLossGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNLossGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNLossGradientNode(parent.0))
        } else {
            Err("This MPSNNGradientFilterNode cannot be downcasted to MPSNNLossGradientNode")
        }
    }
}
impl IMPSNNFilterNode for MPSNNLossGradientNode {}
impl INSObject for MPSNNLossGradientNode {}
impl PNSObject for MPSNNLossGradientNode {}
impl IMPSNNLossGradientNode for MPSNNLossGradientNode {}
pub trait IMPSNNLossGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSourceGradient_sourceImage_labels_weights_gradientState_lossDescriptor_isLabelsGradientFilter_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        labels: MPSNNImageNode,
        weights: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSCNNLossDescriptor,
        isLabelsGradientFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, labels : labels, weights : weights, gradientState : gradientState, lossDescriptor : descriptor, isLabelsGradientFilter : isLabelsGradientFilter)
    }
    unsafe fn initWithSourceGradient_sourceImage_labels_gradientState_lossDescriptor_isLabelsGradientFilter_(
        &self,
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        labels: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSCNNLossDescriptor,
        isLabelsGradientFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSourceGradient : sourceGradient, sourceImage : sourceImage, labels : labels, gradientState : gradientState, lossDescriptor : descriptor, isLabelsGradientFilter : isLabelsGradientFilter)
    }
    unsafe fn initWithSources_gradientState_lossDescriptor_isLabelsGradientFilter_(
        &self,
        sourceNodes: NSArray,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSCNNLossDescriptor,
        isLabelsGradientFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSources : sourceNodes, gradientState : gradientState, lossDescriptor : descriptor, isLabelsGradientFilter : isLabelsGradientFilter)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn lossType(&self) -> MPSCNNLossType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, lossType)
    }
    unsafe fn reductionType(&self) -> MPSCNNReductionType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reductionType)
    }
    unsafe fn numberOfClasses(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, numberOfClasses)
    }
    unsafe fn reduceAcrossBatch(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reduceAcrossBatch)
    }
    unsafe fn weight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, weight)
    }
    unsafe fn labelSmoothing(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, labelSmoothing)
    }
    unsafe fn epsilon(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, epsilon)
    }
    unsafe fn delta(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, delta)
    }
    unsafe fn isLabelsGradientFilter(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, isLabelsGradientFilter)
    }
    unsafe fn propertyCallBack(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, propertyCallBack)
    }
    unsafe fn setPropertyCallBack_(&self, propertyCallBack: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPropertyCallBack : propertyCallBack)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_labels_weights_gradientState_lossDescriptor_isLabelsGradientFilter_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        labels: MPSNNImageNode,
        weights: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSCNNLossDescriptor,
        isLabelsGradientFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLossGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, labels : labels, weights : weights, gradientState : gradientState, lossDescriptor : descriptor, isLabelsGradientFilter : isLabelsGradientFilter)
    }
    unsafe fn nodeWithSourceGradient_sourceImage_labels_gradientState_lossDescriptor_isLabelsGradientFilter_(
        sourceGradient: MPSNNImageNode,
        sourceImage: MPSNNImageNode,
        labels: MPSNNImageNode,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSCNNLossDescriptor,
        isLabelsGradientFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLossGradientNode").unwrap(), nodeWithSourceGradient : sourceGradient, sourceImage : sourceImage, labels : labels, gradientState : gradientState, lossDescriptor : descriptor, isLabelsGradientFilter : isLabelsGradientFilter)
    }
    unsafe fn nodeWithSources_gradientState_lossDescriptor_isLabelsGradientFilter_(
        sourceNodes: NSArray,
        gradientState: MPSNNGradientStateNode,
        descriptor: MPSCNNLossDescriptor,
        isLabelsGradientFilter: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNLossGradientNode").unwrap(), nodeWithSources : sourceNodes, gradientState : gradientState, lossDescriptor : descriptor, isLabelsGradientFilter : isLabelsGradientFilter)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNInitialGradientNode(pub id);
impl std::ops::Deref for MPSNNInitialGradientNode {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNInitialGradientNode {}
impl MPSNNInitialGradientNode {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNInitialGradientNode").unwrap(), alloc) })
    }
}
impl IMPSNNFilterNode for MPSNNInitialGradientNode {}
impl std::convert::TryFrom<MPSNNFilterNode> for MPSNNInitialGradientNode {
    type Error = &'static str;
    fn try_from(parent: MPSNNFilterNode) -> Result<MPSNNInitialGradientNode, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNInitialGradientNode").unwrap()) };
        if is_kind_of {
            Ok(MPSNNInitialGradientNode(parent.0))
        } else {
            Err("This MPSNNFilterNode cannot be downcasted to MPSNNInitialGradientNode")
        }
    }
}
impl INSObject for MPSNNInitialGradientNode {}
impl PNSObject for MPSNNInitialGradientNode {}
impl IMPSNNInitialGradientNode for MPSNNInitialGradientNode {}
pub trait IMPSNNInitialGradientNode: Sized + std::ops::Deref {
    unsafe fn initWithSource_(&self, source: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSource : source)
    }
    unsafe fn gradientFilterWithSources_(&self, gradientImages: NSArray) -> MPSNNGradientFilterNode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, gradientFilterWithSources : gradientImages)
    }
    unsafe fn nodeWithSource_(source: MPSNNImageNode) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNInitialGradientNode").unwrap(), nodeWithSource : source)
    }
}
pub type MPSNNGraphCompletionHandler = *mut ::std::os::raw::c_void;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNNGraph(pub id);
impl std::ops::Deref for MPSNNGraph {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNNGraph {}
impl MPSNNGraph {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGraph").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSNNGraph {}
impl PNSSecureCoding for MPSNNGraph {}
impl IMPSKernel for MPSNNGraph {}
impl std::convert::TryFrom<MPSKernel> for MPSNNGraph {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSNNGraph, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNNGraph").unwrap()) };
        if is_kind_of {
            Ok(MPSNNGraph(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSNNGraph")
        }
    }
}
impl INSObject for MPSNNGraph {}
impl PNSObject for MPSNNGraph {}
impl IMPSNNGraph for MPSNNGraph {}
pub trait IMPSNNGraph: Sized + std::ops::Deref {
    unsafe fn initWithDevice_resultImage_resultImageIsNeeded_(
        &self,
        device: *mut u64,
        resultImage: MPSNNImageNode,
        resultIsNeeded: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resultImage : resultImage, resultImageIsNeeded : resultIsNeeded)
    }
    unsafe fn initWithDevice_resultImages_resultsAreNeeded_(
        &self,
        device: *mut u64,
        resultImages: NSArray,
        areResultsNeeded: *mut BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resultImages : resultImages, resultsAreNeeded : areResultsNeeded)
    }
    unsafe fn initWithDevice_resultImage_(
        &self,
        device: *mut u64,
        resultImage: MPSNNImageNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, resultImage : resultImage)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn reloadFromDataSources(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reloadFromDataSources)
    }
    unsafe fn encodeToCommandBuffer_sourceImages_sourceStates_intermediateImages_destinationStates_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        sourceStates: NSArray,
        intermediateImages: NSMutableArray,
        destinationStates: NSMutableArray,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImages : sourceImages, sourceStates : sourceStates, intermediateImages : intermediateImages, destinationStates : destinationStates)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_sourceStates_intermediateImages_destinationStates_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        sourceStates: NSArray,
        intermediateImages: NSMutableArray,
        destinationStates: NSMutableArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, sourceStates : sourceStates, intermediateImages : intermediateImages, destinationStates : destinationStates)
    }
    unsafe fn encodeToCommandBuffer_sourceImages_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceImages : sourceImages)
    }
    unsafe fn encodeBatchToCommandBuffer_sourceImages_sourceStates_(
        &self,
        commandBuffer: *mut u64,
        sourceImages: NSArray,
        sourceStates: NSArray,
    ) -> *mut MPSImageBatch
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBatchToCommandBuffer : commandBuffer, sourceImages : sourceImages, sourceStates : sourceStates)
    }
    unsafe fn executeAsyncWithSourceImages_completionHandler_(
        &self,
        sourceImages: NSArray,
        handler: MPSNNGraphCompletionHandler,
    ) -> MPSImage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, executeAsyncWithSourceImages : sourceImages, completionHandler : handler)
    }
    unsafe fn readCountForSourceImageAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, readCountForSourceImageAtIndex : index)
    }
    unsafe fn readCountForSourceStateAtIndex_(&self, index: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, readCountForSourceStateAtIndex : index)
    }
    unsafe fn sourceImageHandles(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceImageHandles)
    }
    unsafe fn sourceStateHandles(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, sourceStateHandles)
    }
    unsafe fn intermediateImageHandles(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, intermediateImageHandles)
    }
    unsafe fn resultStateHandles(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultStateHandles)
    }
    unsafe fn resultHandle(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultHandle)
    }
    unsafe fn outputStateIsTemporary(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, outputStateIsTemporary)
    }
    unsafe fn setOutputStateIsTemporary_(&self, outputStateIsTemporary: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setOutputStateIsTemporary : outputStateIsTemporary)
    }
    unsafe fn destinationImageAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationImageAllocator)
    }
    unsafe fn setDestinationImageAllocator_(&self, destinationImageAllocator: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationImageAllocator : destinationImageAllocator)
    }
    unsafe fn format(&self) -> MPSImageFeatureChannelFormat
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, format)
    }
    unsafe fn setFormat_(&self, format: MPSImageFeatureChannelFormat)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFormat : format)
    }
    unsafe fn resultImageIsNeeded(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, resultImageIsNeeded)
    }
    unsafe fn graphWithDevice_resultImage_resultImageIsNeeded_(
        device: *mut u64,
        resultImage: MPSNNImageNode,
        resultIsNeeded: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGraph").unwrap(), graphWithDevice : device, resultImage : resultImage, resultImageIsNeeded : resultIsNeeded)
    }
    unsafe fn graphWithDevice_resultImages_resultsAreNeeded_(
        device: *mut u64,
        resultImages: NSArray,
        areResultsNeeded: *mut BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGraph").unwrap(), graphWithDevice : device, resultImages : resultImages, resultsAreNeeded : areResultsNeeded)
    }
    unsafe fn graphWithDevice_resultImage_(
        device: *mut u64,
        resultImage: MPSNNImageNode,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNNGraph").unwrap(), graphWithDevice : device, resultImage : resultImage)
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayOffsets {
    pub dimensions: [NSInteger; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArraySizes {
    pub dimensions: [NSUInteger; 16usize],
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayMultiaryBase(pub id);
impl std::ops::Deref for MPSNDArrayMultiaryBase {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayMultiaryBase {}
impl MPSNDArrayMultiaryBase {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayMultiaryBase").unwrap(), alloc) })
    }
}
impl IMPSKernel for MPSNDArrayMultiaryBase {}
impl PNSCopying for MPSNDArrayMultiaryBase {}
impl PNSSecureCoding for MPSNDArrayMultiaryBase {}
impl std::convert::TryFrom<MPSKernel> for MPSNDArrayMultiaryBase {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSNDArrayMultiaryBase, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayMultiaryBase").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayMultiaryBase(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSNDArrayMultiaryBase")
        }
    }
}
impl INSObject for MPSNDArrayMultiaryBase {}
impl PNSObject for MPSNDArrayMultiaryBase {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayMultiaryBase {}
pub trait IMPSNDArrayMultiaryBase: Sized + std::ops::Deref {
    unsafe fn offsetsAtSourceIndex_(&self, sourceIndex: NSUInteger) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, offsetsAtSourceIndex : sourceIndex)
    }
    unsafe fn edgeModeAtSourceIndex_(&self, sourceIndex: NSUInteger) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, edgeModeAtSourceIndex : sourceIndex)
    }
    unsafe fn kernelSizesForSourceIndex_(&self, sourceIndex: NSUInteger) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, kernelSizesForSourceIndex : sourceIndex)
    }
    unsafe fn stridesForSourceIndex_(&self, sourceIndex: NSUInteger) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, stridesForSourceIndex : sourceIndex)
    }
    unsafe fn dilationRatesForSourceIndex_(&self, sourceIndex: NSUInteger) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, dilationRatesForSourceIndex : sourceIndex)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        count: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeWithCoder_(&self, coder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : coder)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn resultStateForSourceArrays_sourceStates_destinationArray_(
        &self,
        sourceArrays: NSArray,
        sourceStates: NSArray,
        destinationArray: MPSNDArray,
    ) -> MPSState
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, resultStateForSourceArrays : sourceArrays, sourceStates : sourceStates, destinationArray : destinationArray)
    }
    unsafe fn destinationArrayDescriptorForSourceArrays_sourceState_(
        &self,
        sources: NSArray,
        state: MPSState,
    ) -> MPSNDArrayDescriptor
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, destinationArrayDescriptorForSourceArrays : sources, sourceState : state)
    }
    unsafe fn destinationArrayAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, destinationArrayAllocator)
    }
    unsafe fn setDestinationArrayAllocator_(&self, destinationArrayAllocator: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDestinationArrayAllocator : destinationArrayAllocator)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayMultiaryKernel(pub id);
impl std::ops::Deref for MPSNDArrayMultiaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayMultiaryKernel {}
impl MPSNDArrayMultiaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayMultiaryKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayMultiaryKernel {}
impl From<MPSNDArrayMultiaryKernel> for MPSNDArrayMultiaryBase {
    fn from(child: MPSNDArrayMultiaryKernel) -> MPSNDArrayMultiaryBase {
        MPSNDArrayMultiaryBase(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayMultiaryBase> for MPSNDArrayMultiaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayMultiaryBase) -> Result<MPSNDArrayMultiaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayMultiaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayMultiaryKernel(parent.0))
        } else {
            Err("This MPSNDArrayMultiaryBase cannot be downcasted to MPSNDArrayMultiaryKernel")
        }
    }
}
impl IMPSKernel for MPSNDArrayMultiaryKernel {}
impl PNSCopying for MPSNDArrayMultiaryKernel {}
impl PNSSecureCoding for MPSNDArrayMultiaryKernel {}
impl INSObject for MPSNDArrayMultiaryKernel {}
impl PNSObject for MPSNDArrayMultiaryKernel {}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayMultiaryKernel {}
pub trait IMPSNDArrayMultiaryKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        count: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceArrays_(
        &self,
        cmdBuf: *mut u64,
        sourceArrays: NSArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArrays : sourceArrays)
    }
    unsafe fn encodeToCommandBuffer_sourceArrays_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArrays: NSArray,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArrays : sourceArrays, destinationArray : destination)
    }
    unsafe fn encodeToCommandBuffer_sourceArrays_resultState_outputStateIsTemporary_(
        &self,
        cmdBuf: *mut u64,
        sourceArrays: NSArray,
        outGradientState: *mut MPSState,
        outputStateIsTemporary: BOOL,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArrays : sourceArrays, resultState : outGradientState, outputStateIsTemporary : outputStateIsTemporary)
    }
    unsafe fn encodeToCommandBuffer_sourceArrays_resultState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArrays: NSArray,
        outGradientState: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArrays : sourceArrays, resultState : outGradientState, destinationArray : destination)
    }
    unsafe fn encodeToCommandEncoder_commandBuffer_sourceArrays_destinationArray_(
        &self,
        encoder: *mut u64,
        commandBuffer: *mut u64,
        sourceArrays: NSArray,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandEncoder : encoder, commandBuffer : commandBuffer, sourceArrays : sourceArrays, destinationArray : destination)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayMultiaryGradientKernel(pub id);
impl std::ops::Deref for MPSNDArrayMultiaryGradientKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayMultiaryGradientKernel {}
impl MPSNDArrayMultiaryGradientKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayMultiaryGradientKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayMultiaryGradientKernel {}
impl std::convert::TryFrom<MPSNDArrayMultiaryBase> for MPSNDArrayMultiaryGradientKernel {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryBase,
    ) -> Result<MPSNDArrayMultiaryGradientKernel, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayMultiaryGradientKernel").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayMultiaryGradientKernel(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryBase cannot be downcasted to MPSNDArrayMultiaryGradientKernel" ,)
        }
    }
}
impl IMPSKernel for MPSNDArrayMultiaryGradientKernel {}
impl PNSCopying for MPSNDArrayMultiaryGradientKernel {}
impl PNSSecureCoding for MPSNDArrayMultiaryGradientKernel {}
impl INSObject for MPSNDArrayMultiaryGradientKernel {}
impl PNSObject for MPSNDArrayMultiaryGradientKernel {}
impl IMPSNDArrayMultiaryGradientKernel for MPSNDArrayMultiaryGradientKernel {}
pub trait IMPSNDArrayMultiaryGradientKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        count: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn initWithDevice_sourceCount_sourceGradientIndex_(
        &self,
        device: *mut u64,
        count: NSUInteger,
        sourceGradientIndex: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count, sourceGradientIndex : sourceGradientIndex)
    }
    unsafe fn encodeToCommandBuffer_sourceArrays_sourceGradient_gradientState_(
        &self,
        cmdBuf: *mut u64,
        sources: NSArray,
        gradient: MPSNDArray,
        state: MPSState,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArrays : sources, sourceGradient : gradient, gradientState : state)
    }
    unsafe fn encodeToCommandBuffer_sourceArrays_sourceGradient_gradientState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sources: NSArray,
        gradient: MPSNDArray,
        state: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArrays : sources, sourceGradient : gradient, gradientState : state, destinationArray : destination)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayUnaryKernel(pub id);
impl std::ops::Deref for MPSNDArrayUnaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayUnaryKernel {}
impl MPSNDArrayUnaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayUnaryKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayUnaryKernel {}
impl From<MPSNDArrayUnaryKernel> for MPSNDArrayMultiaryKernel {
    fn from(child: MPSNDArrayUnaryKernel) -> MPSNDArrayMultiaryKernel {
        MPSNDArrayMultiaryKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayMultiaryKernel> for MPSNDArrayUnaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayMultiaryKernel) -> Result<MPSNDArrayUnaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayUnaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayUnaryKernel(parent.0))
        } else {
            Err("This MPSNDArrayMultiaryKernel cannot be downcasted to MPSNDArrayUnaryKernel")
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayUnaryKernel {}
impl IMPSKernel for MPSNDArrayUnaryKernel {}
impl PNSCopying for MPSNDArrayUnaryKernel {}
impl PNSSecureCoding for MPSNDArrayUnaryKernel {}
impl INSObject for MPSNDArrayUnaryKernel {}
impl PNSObject for MPSNDArrayUnaryKernel {}
impl IMPSNDArrayUnaryKernel for MPSNDArrayUnaryKernel {}
pub trait IMPSNDArrayUnaryKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        count: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArray : sourceArray)
    }
    unsafe fn encodeToCommandBuffer_sourceArray_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArray : sourceArray, destinationArray : destination)
    }
    unsafe fn encodeToCommandBuffer_sourceArray_resultState_outputStateIsTemporary_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        outGradientState: *mut MPSState,
        outputStateIsTemporary: BOOL,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArray : sourceArray, resultState : outGradientState, outputStateIsTemporary : outputStateIsTemporary)
    }
    unsafe fn encodeToCommandBuffer_sourceArray_resultState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        outGradientState: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArray : sourceArray, resultState : outGradientState, destinationArray : destination)
    }
    unsafe fn offsets(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, offsets)
    }
    unsafe fn edgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, edgeMode)
    }
    unsafe fn kernelSizes(&self) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, kernelSizes)
    }
    unsafe fn strides(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strides)
    }
    unsafe fn dilationRates(&self) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, dilationRates)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayUnaryGradientKernel(pub id);
impl std::ops::Deref for MPSNDArrayUnaryGradientKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayUnaryGradientKernel {}
impl MPSNDArrayUnaryGradientKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayUnaryGradientKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryGradientKernel for MPSNDArrayUnaryGradientKernel {}
impl From<MPSNDArrayUnaryGradientKernel> for MPSNDArrayMultiaryGradientKernel {
    fn from(child: MPSNDArrayUnaryGradientKernel) -> MPSNDArrayMultiaryGradientKernel {
        MPSNDArrayMultiaryGradientKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayMultiaryGradientKernel> for MPSNDArrayUnaryGradientKernel {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryGradientKernel,
    ) -> Result<MPSNDArrayUnaryGradientKernel, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayUnaryGradientKernel").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayUnaryGradientKernel(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryGradientKernel cannot be downcasted to MPSNDArrayUnaryGradientKernel" ,)
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayUnaryGradientKernel {}
impl IMPSKernel for MPSNDArrayUnaryGradientKernel {}
impl PNSCopying for MPSNDArrayUnaryGradientKernel {}
impl PNSSecureCoding for MPSNDArrayUnaryGradientKernel {}
impl INSObject for MPSNDArrayUnaryGradientKernel {}
impl PNSObject for MPSNDArrayUnaryGradientKernel {}
impl IMPSNDArrayUnaryGradientKernel for MPSNDArrayUnaryGradientKernel {}
pub trait IMPSNDArrayUnaryGradientKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_sourceCount_sourceGradientIndex_(
        &self,
        device: *mut u64,
        count: NSUInteger,
        sourceGradientIndex: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count, sourceGradientIndex : sourceGradientIndex)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeToCommandBuffer_sourceArray_sourceGradient_gradientState_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        gradient: MPSNDArray,
        state: MPSState,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArray : sourceArray, sourceGradient : gradient, gradientState : state)
    }
    unsafe fn encodeToCommandBuffer_sourceArray_sourceGradient_gradientState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        gradient: MPSNDArray,
        state: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, sourceArray : sourceArray, sourceGradient : gradient, gradientState : state, destinationArray : destination)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayBinaryKernel(pub id);
impl std::ops::Deref for MPSNDArrayBinaryKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayBinaryKernel {}
impl MPSNDArrayBinaryKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayBinaryKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayBinaryKernel {}
impl std::convert::TryFrom<MPSNDArrayMultiaryKernel> for MPSNDArrayBinaryKernel {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayMultiaryKernel) -> Result<MPSNDArrayBinaryKernel, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayBinaryKernel").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayBinaryKernel(parent.0))
        } else {
            Err("This MPSNDArrayMultiaryKernel cannot be downcasted to MPSNDArrayBinaryKernel")
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayBinaryKernel {}
impl IMPSKernel for MPSNDArrayBinaryKernel {}
impl PNSCopying for MPSNDArrayBinaryKernel {}
impl PNSSecureCoding for MPSNDArrayBinaryKernel {}
impl INSObject for MPSNDArrayBinaryKernel {}
impl PNSObject for MPSNDArrayBinaryKernel {}
impl IMPSNDArrayBinaryKernel for MPSNDArrayBinaryKernel {}
pub trait IMPSNDArrayBinaryKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        count: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, destinationArray : destination)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_resultState_outputStateIsTemporary_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        outGradientState: *mut MPSState,
        outputStateIsTemporary: BOOL,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, resultState : outGradientState, outputStateIsTemporary : outputStateIsTemporary)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_resultState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        outGradientState: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, resultState : outGradientState, destinationArray : destination)
    }
    unsafe fn primaryOffsets(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryOffsets)
    }
    unsafe fn primaryEdgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryEdgeMode)
    }
    unsafe fn primaryKernelSizes(&self) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryKernelSizes)
    }
    unsafe fn primaryStrides(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryStrides)
    }
    unsafe fn primaryDilationRates(&self) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, primaryDilationRates)
    }
    unsafe fn secondaryOffsets(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryOffsets)
    }
    unsafe fn secondaryEdgeMode(&self) -> MPSImageEdgeMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryEdgeMode)
    }
    unsafe fn secondaryKernelSizes(&self) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryKernelSizes)
    }
    unsafe fn secondaryStrides(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryStrides)
    }
    unsafe fn secondaryDilationRates(&self) -> MPSNDArraySizes
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, secondaryDilationRates)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayBinaryPrimaryGradientKernel(pub id);
impl std::ops::Deref for MPSNDArrayBinaryPrimaryGradientKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayBinaryPrimaryGradientKernel {}
impl MPSNDArrayBinaryPrimaryGradientKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayBinaryPrimaryGradientKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryGradientKernel for MPSNDArrayBinaryPrimaryGradientKernel {}
impl std::convert::TryFrom<MPSNDArrayMultiaryGradientKernel>
    for MPSNDArrayBinaryPrimaryGradientKernel
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryGradientKernel,
    ) -> Result<MPSNDArrayBinaryPrimaryGradientKernel, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayBinaryPrimaryGradientKernel").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayBinaryPrimaryGradientKernel(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryGradientKernel cannot be downcasted to MPSNDArrayBinaryPrimaryGradientKernel" ,)
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayBinaryPrimaryGradientKernel {}
impl IMPSKernel for MPSNDArrayBinaryPrimaryGradientKernel {}
impl PNSCopying for MPSNDArrayBinaryPrimaryGradientKernel {}
impl PNSSecureCoding for MPSNDArrayBinaryPrimaryGradientKernel {}
impl INSObject for MPSNDArrayBinaryPrimaryGradientKernel {}
impl PNSObject for MPSNDArrayBinaryPrimaryGradientKernel {}
impl IMPSNDArrayBinaryPrimaryGradientKernel for MPSNDArrayBinaryPrimaryGradientKernel {}
pub trait IMPSNDArrayBinaryPrimaryGradientKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sourceCount_sourceGradientIndex_(
        &self,
        device: *mut u64,
        count: NSUInteger,
        sourceGradientIndex: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count, sourceGradientIndex : sourceGradientIndex)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_sourceGradient_gradientState_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        gradient: MPSNDArray,
        state: MPSState,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, sourceGradient : gradient, gradientState : state)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_sourceGradient_gradientState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        gradient: MPSNDArray,
        state: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, sourceGradient : gradient, gradientState : state, destinationArray : destination)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayBinarySecondaryGradientKernel(pub id);
impl std::ops::Deref for MPSNDArrayBinarySecondaryGradientKernel {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayBinarySecondaryGradientKernel {}
impl MPSNDArrayBinarySecondaryGradientKernel {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayBinarySecondaryGradientKernel").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryGradientKernel for MPSNDArrayBinarySecondaryGradientKernel {}
impl std::convert::TryFrom<MPSNDArrayMultiaryGradientKernel>
    for MPSNDArrayBinarySecondaryGradientKernel
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryGradientKernel,
    ) -> Result<MPSNDArrayBinarySecondaryGradientKernel, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayBinarySecondaryGradientKernel").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayBinarySecondaryGradientKernel(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryGradientKernel cannot be downcasted to MPSNDArrayBinarySecondaryGradientKernel" ,)
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayBinarySecondaryGradientKernel {}
impl IMPSKernel for MPSNDArrayBinarySecondaryGradientKernel {}
impl PNSCopying for MPSNDArrayBinarySecondaryGradientKernel {}
impl PNSSecureCoding for MPSNDArrayBinarySecondaryGradientKernel {}
impl INSObject for MPSNDArrayBinarySecondaryGradientKernel {}
impl PNSObject for MPSNDArrayBinarySecondaryGradientKernel {}
impl IMPSNDArrayBinarySecondaryGradientKernel for MPSNDArrayBinarySecondaryGradientKernel {}
pub trait IMPSNDArrayBinarySecondaryGradientKernel: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sourceCount_sourceGradientIndex_(
        &self,
        device: *mut u64,
        count: NSUInteger,
        sourceGradientIndex: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : count, sourceGradientIndex : sourceGradientIndex)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, coder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : coder, device : device)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_sourceGradient_gradientState_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        gradient: MPSNDArray,
        state: MPSState,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, sourceGradient : gradient, gradientState : state)
    }
    unsafe fn encodeToCommandBuffer_primarySourceArray_secondarySourceArray_sourceGradient_gradientState_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        primarySourceArray: MPSNDArray,
        secondarySourceArray: MPSNDArray,
        gradient: MPSNDArray,
        state: MPSState,
        destination: MPSNDArray,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : cmdBuf, primarySourceArray : primarySourceArray, secondarySourceArray : secondarySourceArray, sourceGradient : gradient, gradientState : state, destinationArray : destination)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayGradientState(pub id);
impl std::ops::Deref for MPSNDArrayGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayGradientState {}
impl MPSNDArrayGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayGradientState").unwrap(), alloc) })
    }
}
impl IMPSState for MPSNDArrayGradientState {}
impl std::convert::TryFrom<MPSState> for MPSNDArrayGradientState {
    type Error = &'static str;
    fn try_from(parent: MPSState) -> Result<MPSNDArrayGradientState, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayGradientState").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayGradientState(parent.0))
        } else {
            Err("This MPSState cannot be downcasted to MPSNDArrayGradientState")
        }
    }
}
impl INSObject for MPSNDArrayGradientState {}
impl PNSObject for MPSNDArrayGradientState {}
impl IMPSNDArrayGradientState for MPSNDArrayGradientState {}
pub trait IMPSNDArrayGradientState: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayMatrixMultiplication(pub id);
impl std::ops::Deref for MPSNDArrayMatrixMultiplication {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayMatrixMultiplication {}
impl MPSNDArrayMatrixMultiplication {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayMatrixMultiplication").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayMatrixMultiplication {}
impl std::convert::TryFrom<MPSNDArrayMultiaryKernel> for MPSNDArrayMatrixMultiplication {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryKernel,
    ) -> Result<MPSNDArrayMatrixMultiplication, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayMatrixMultiplication").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayMatrixMultiplication(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryKernel cannot be downcasted to MPSNDArrayMatrixMultiplication" ,)
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayMatrixMultiplication {}
impl IMPSKernel for MPSNDArrayMatrixMultiplication {}
impl PNSCopying for MPSNDArrayMatrixMultiplication {}
impl PNSSecureCoding for MPSNDArrayMatrixMultiplication {}
impl INSObject for MPSNDArrayMatrixMultiplication {}
impl PNSObject for MPSNDArrayMatrixMultiplication {}
impl IMPSNDArrayMatrixMultiplication for MPSNDArrayMatrixMultiplication {}
pub trait IMPSNDArrayMatrixMultiplication: Sized + std::ops::Deref {
    unsafe fn alpha(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, alpha)
    }
    unsafe fn setAlpha_(&self, alpha: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAlpha : alpha)
    }
    unsafe fn beta(&self) -> f64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, beta)
    }
    unsafe fn setBeta_(&self, beta: f64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBeta : beta)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayStridedSlice(pub id);
impl std::ops::Deref for MPSNDArrayStridedSlice {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayStridedSlice {}
impl MPSNDArrayStridedSlice {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayStridedSlice").unwrap(), alloc) })
    }
}
impl IMPSNDArrayUnaryKernel for MPSNDArrayStridedSlice {}
impl From<MPSNDArrayStridedSlice> for MPSNDArrayUnaryKernel {
    fn from(child: MPSNDArrayStridedSlice) -> MPSNDArrayUnaryKernel {
        MPSNDArrayUnaryKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayUnaryKernel> for MPSNDArrayStridedSlice {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayUnaryKernel) -> Result<MPSNDArrayStridedSlice, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayStridedSlice").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayStridedSlice(parent.0))
        } else {
            Err("This MPSNDArrayUnaryKernel cannot be downcasted to MPSNDArrayStridedSlice")
        }
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayStridedSlice {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayStridedSlice {}
impl IMPSKernel for MPSNDArrayStridedSlice {}
impl PNSCopying for MPSNDArrayStridedSlice {}
impl PNSSecureCoding for MPSNDArrayStridedSlice {}
impl INSObject for MPSNDArrayStridedSlice {}
impl PNSObject for MPSNDArrayStridedSlice {}
impl IMPSNDArrayStridedSlice for MPSNDArrayStridedSlice {}
pub trait IMPSNDArrayStridedSlice: Sized + std::ops::Deref {
    unsafe fn strides(&self) -> MPSNDArrayOffsets
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, strides)
    }
    unsafe fn setStrides_(&self, strides: MPSNDArrayOffsets)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setStrides : strides)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayStridedSliceGradient(pub id);
impl std::ops::Deref for MPSNDArrayStridedSliceGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayStridedSliceGradient {}
impl MPSNDArrayStridedSliceGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayStridedSliceGradient").unwrap(), alloc) })
    }
}
impl IMPSNDArrayUnaryGradientKernel for MPSNDArrayStridedSliceGradient {}
impl From<MPSNDArrayStridedSliceGradient> for MPSNDArrayUnaryGradientKernel {
    fn from(child: MPSNDArrayStridedSliceGradient) -> MPSNDArrayUnaryGradientKernel {
        MPSNDArrayUnaryGradientKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayUnaryGradientKernel> for MPSNDArrayStridedSliceGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayUnaryGradientKernel,
    ) -> Result<MPSNDArrayStridedSliceGradient, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayStridedSliceGradient").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayStridedSliceGradient(parent.0))
        } else {
            Err ("This MPSNDArrayUnaryGradientKernel cannot be downcasted to MPSNDArrayStridedSliceGradient" ,)
        }
    }
}
impl IMPSNDArrayMultiaryGradientKernel for MPSNDArrayStridedSliceGradient {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayStridedSliceGradient {}
impl IMPSKernel for MPSNDArrayStridedSliceGradient {}
impl PNSCopying for MPSNDArrayStridedSliceGradient {}
impl PNSSecureCoding for MPSNDArrayStridedSliceGradient {}
impl INSObject for MPSNDArrayStridedSliceGradient {}
impl PNSObject for MPSNDArrayStridedSliceGradient {}
impl IMPSNDArrayStridedSliceGradient for MPSNDArrayStridedSliceGradient {}
pub trait IMPSNDArrayStridedSliceGradient: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayGatherGradientState(pub id);
impl std::ops::Deref for MPSNDArrayGatherGradientState {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayGatherGradientState {}
impl MPSNDArrayGatherGradientState {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayGatherGradientState").unwrap(), alloc) })
    }
}
impl IMPSNDArrayGradientState for MPSNDArrayGatherGradientState {}
impl From<MPSNDArrayGatherGradientState> for MPSNDArrayGradientState {
    fn from(child: MPSNDArrayGatherGradientState) -> MPSNDArrayGradientState {
        MPSNDArrayGradientState(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayGradientState> for MPSNDArrayGatherGradientState {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayGradientState,
    ) -> Result<MPSNDArrayGatherGradientState, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayGatherGradientState").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayGatherGradientState(parent.0))
        } else {
            Err ("This MPSNDArrayGradientState cannot be downcasted to MPSNDArrayGatherGradientState" ,)
        }
    }
}
impl IMPSState for MPSNDArrayGatherGradientState {}
impl INSObject for MPSNDArrayGatherGradientState {}
impl PNSObject for MPSNDArrayGatherGradientState {}
impl IMPSNDArrayGatherGradientState for MPSNDArrayGatherGradientState {}
pub trait IMPSNDArrayGatherGradientState: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayGather(pub id);
impl std::ops::Deref for MPSNDArrayGather {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayGather {}
impl MPSNDArrayGather {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayGather").unwrap(), alloc) })
    }
}
impl IMPSNDArrayBinaryKernel for MPSNDArrayGather {}
impl From<MPSNDArrayGather> for MPSNDArrayBinaryKernel {
    fn from(child: MPSNDArrayGather) -> MPSNDArrayBinaryKernel {
        MPSNDArrayBinaryKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayBinaryKernel> for MPSNDArrayGather {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayBinaryKernel) -> Result<MPSNDArrayGather, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayGather").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayGather(parent.0))
        } else {
            Err("This MPSNDArrayBinaryKernel cannot be downcasted to MPSNDArrayGather")
        }
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayGather {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayGather {}
impl IMPSKernel for MPSNDArrayGather {}
impl PNSCopying for MPSNDArrayGather {}
impl PNSSecureCoding for MPSNDArrayGather {}
impl INSObject for MPSNDArrayGather {}
impl PNSObject for MPSNDArrayGather {}
impl IMPSNDArrayGather for MPSNDArrayGather {}
pub trait IMPSNDArrayGather: Sized + std::ops::Deref {
    unsafe fn axis(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, axis)
    }
    unsafe fn setAxis_(&self, axis: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAxis : axis)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayGatherGradient(pub id);
impl std::ops::Deref for MPSNDArrayGatherGradient {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayGatherGradient {}
impl MPSNDArrayGatherGradient {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayGatherGradient").unwrap(), alloc) })
    }
}
impl IMPSNDArrayBinaryPrimaryGradientKernel for MPSNDArrayGatherGradient {}
impl From<MPSNDArrayGatherGradient> for MPSNDArrayBinaryPrimaryGradientKernel {
    fn from(child: MPSNDArrayGatherGradient) -> MPSNDArrayBinaryPrimaryGradientKernel {
        MPSNDArrayBinaryPrimaryGradientKernel(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayBinaryPrimaryGradientKernel> for MPSNDArrayGatherGradient {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayBinaryPrimaryGradientKernel,
    ) -> Result<MPSNDArrayGatherGradient, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayGatherGradient").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayGatherGradient(parent.0))
        } else {
            Err ("This MPSNDArrayBinaryPrimaryGradientKernel cannot be downcasted to MPSNDArrayGatherGradient" ,)
        }
    }
}
impl IMPSNDArrayMultiaryGradientKernel for MPSNDArrayGatherGradient {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayGatherGradient {}
impl IMPSKernel for MPSNDArrayGatherGradient {}
impl PNSCopying for MPSNDArrayGatherGradient {}
impl PNSSecureCoding for MPSNDArrayGatherGradient {}
impl INSObject for MPSNDArrayGatherGradient {}
impl PNSObject for MPSNDArrayGatherGradient {}
impl IMPSNDArrayGatherGradient for MPSNDArrayGatherGradient {}
pub trait IMPSNDArrayGatherGradient: Sized + std::ops::Deref {}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayIdentity(pub id);
impl std::ops::Deref for MPSNDArrayIdentity {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayIdentity {}
impl MPSNDArrayIdentity {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayIdentity").unwrap(), alloc) })
    }
}
impl IMPSNDArrayUnaryKernel for MPSNDArrayIdentity {}
impl std::convert::TryFrom<MPSNDArrayUnaryKernel> for MPSNDArrayIdentity {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayUnaryKernel) -> Result<MPSNDArrayIdentity, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayIdentity").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayIdentity(parent.0))
        } else {
            Err("This MPSNDArrayUnaryKernel cannot be downcasted to MPSNDArrayIdentity")
        }
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayIdentity {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayIdentity {}
impl IMPSKernel for MPSNDArrayIdentity {}
impl PNSCopying for MPSNDArrayIdentity {}
impl PNSSecureCoding for MPSNDArrayIdentity {}
impl INSObject for MPSNDArrayIdentity {}
impl PNSObject for MPSNDArrayIdentity {}
impl IMPSNDArrayIdentity for MPSNDArrayIdentity {}
pub trait IMPSNDArrayIdentity: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn reshapeWithCommandBuffer_sourceArray_shape_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        shape: NSArray,
        destinationArray: MPSNDArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reshapeWithCommandBuffer : cmdBuf, sourceArray : sourceArray, shape : shape, destinationArray : destinationArray)
    }
    unsafe fn reshapeWithCommandBuffer_sourceArray_dimensionCount_dimensionSizes_destinationArray_(
        &self,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        numberOfDimensions: NSUInteger,
        dimensionSizes: *mut NSUInteger,
        destinationArray: MPSNDArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reshapeWithCommandBuffer : cmdBuf, sourceArray : sourceArray, dimensionCount : numberOfDimensions, dimensionSizes : dimensionSizes, destinationArray : destinationArray)
    }
    unsafe fn reshapeWithCommandEncoder_commandBuffer_sourceArray_shape_destinationArray_(
        &self,
        encoder: *mut u64,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        shape: NSArray,
        destinationArray: MPSNDArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reshapeWithCommandEncoder : encoder, commandBuffer : cmdBuf, sourceArray : sourceArray, shape : shape, destinationArray : destinationArray)
    }
    unsafe fn reshapeWithCommandEncoder_commandBuffer_sourceArray_dimensionCount_dimensionSizes_destinationArray_(
        &self,
        encoder: *mut u64,
        cmdBuf: *mut u64,
        sourceArray: MPSNDArray,
        numberOfDimensions: NSUInteger,
        dimensionSizes: *mut NSUInteger,
        destinationArray: MPSNDArray,
    ) -> MPSNDArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, reshapeWithCommandEncoder : encoder, commandBuffer : cmdBuf, sourceArray : sourceArray, dimensionCount : numberOfDimensions, dimensionSizes : dimensionSizes, destinationArray : destinationArray)
    }
}
pub type MPSNDArrayQuantizationScheme = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayQuantizationDescriptor(pub id);
impl std::ops::Deref for MPSNDArrayQuantizationDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayQuantizationDescriptor {}
impl MPSNDArrayQuantizationDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayQuantizationDescriptor").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSNDArrayQuantizationDescriptor {}
impl INSObject for MPSNDArrayQuantizationDescriptor {}
impl PNSObject for MPSNDArrayQuantizationDescriptor {}
impl std::convert::TryFrom<NSObject> for MPSNDArrayQuantizationDescriptor {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSNDArrayQuantizationDescriptor, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayQuantizationDescriptor").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayQuantizationDescriptor(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSNDArrayQuantizationDescriptor")
        }
    }
}
impl IMPSNDArrayQuantizationDescriptor for MPSNDArrayQuantizationDescriptor {}
pub trait IMPSNDArrayQuantizationDescriptor: Sized + std::ops::Deref {
    unsafe fn quantizationDataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, quantizationDataType)
    }
    unsafe fn quantizationScheme(&self) -> MPSNDArrayQuantizationScheme
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, quantizationScheme)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayAffineQuantizationDescriptor(pub id);
impl std::ops::Deref for MPSNDArrayAffineQuantizationDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayAffineQuantizationDescriptor {}
impl MPSNDArrayAffineQuantizationDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayAffineQuantizationDescriptor").unwrap(), alloc) })
    }
}
impl IMPSNDArrayQuantizationDescriptor for MPSNDArrayAffineQuantizationDescriptor {}
impl PNSCopying for MPSNDArrayAffineQuantizationDescriptor {}
impl From<MPSNDArrayAffineQuantizationDescriptor> for MPSNDArrayQuantizationDescriptor {
    fn from(child: MPSNDArrayAffineQuantizationDescriptor) -> MPSNDArrayQuantizationDescriptor {
        MPSNDArrayQuantizationDescriptor(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayQuantizationDescriptor>
    for MPSNDArrayAffineQuantizationDescriptor
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayQuantizationDescriptor,
    ) -> Result<MPSNDArrayAffineQuantizationDescriptor, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayAffineQuantizationDescriptor").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayAffineQuantizationDescriptor(parent.0))
        } else {
            Err ("This MPSNDArrayQuantizationDescriptor cannot be downcasted to MPSNDArrayAffineQuantizationDescriptor" ,)
        }
    }
}
impl INSObject for MPSNDArrayAffineQuantizationDescriptor {}
impl PNSObject for MPSNDArrayAffineQuantizationDescriptor {}
impl IMPSNDArrayAffineQuantizationDescriptor for MPSNDArrayAffineQuantizationDescriptor {}
pub trait IMPSNDArrayAffineQuantizationDescriptor: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDataType_hasZeroPoint_hasMinValue_(
        &self,
        quantizationDataType: MPSDataType,
        hasZeroPoint: BOOL,
        hasMinValue: BOOL,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDataType : quantizationDataType, hasZeroPoint : hasZeroPoint, hasMinValue : hasMinValue)
    }
    unsafe fn hasZeroPoint(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, hasZeroPoint)
    }
    unsafe fn setHasZeroPoint_(&self, hasZeroPoint: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHasZeroPoint : hasZeroPoint)
    }
    unsafe fn hasMinValue(&self) -> BOOL
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, hasMinValue)
    }
    unsafe fn setHasMinValue_(&self, hasMinValue: BOOL)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setHasMinValue : hasMinValue)
    }
    unsafe fn implicitZeroPoint(&self) -> bool
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, implicitZeroPoint)
    }
    unsafe fn setImplicitZeroPoint_(&self, implicitZeroPoint: bool)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setImplicitZeroPoint : implicitZeroPoint)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayLUTQuantizationDescriptor(pub id);
impl std::ops::Deref for MPSNDArrayLUTQuantizationDescriptor {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayLUTQuantizationDescriptor {}
impl MPSNDArrayLUTQuantizationDescriptor {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayLUTQuantizationDescriptor").unwrap(), alloc) })
    }
}
impl IMPSNDArrayQuantizationDescriptor for MPSNDArrayLUTQuantizationDescriptor {}
impl PNSCopying for MPSNDArrayLUTQuantizationDescriptor {}
impl std::convert::TryFrom<MPSNDArrayQuantizationDescriptor>
    for MPSNDArrayLUTQuantizationDescriptor
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayQuantizationDescriptor,
    ) -> Result<MPSNDArrayLUTQuantizationDescriptor, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayLUTQuantizationDescriptor").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayLUTQuantizationDescriptor(parent.0))
        } else {
            Err ("This MPSNDArrayQuantizationDescriptor cannot be downcasted to MPSNDArrayLUTQuantizationDescriptor" ,)
        }
    }
}
impl INSObject for MPSNDArrayLUTQuantizationDescriptor {}
impl PNSObject for MPSNDArrayLUTQuantizationDescriptor {}
impl IMPSNDArrayLUTQuantizationDescriptor for MPSNDArrayLUTQuantizationDescriptor {}
pub trait IMPSNDArrayLUTQuantizationDescriptor: Sized + std::ops::Deref {
    unsafe fn initWithDataType_(&self, quantizationDataType: MPSDataType) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDataType : quantizationDataType)
    }
    unsafe fn initWithDataType_vectorAxis_(
        &self,
        quantizationDataType: MPSDataType,
        vectorAxis: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDataType : quantizationDataType, vectorAxis : vectorAxis)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayQuantizedMatrixMultiplication(pub id);
impl std::ops::Deref for MPSNDArrayQuantizedMatrixMultiplication {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayQuantizedMatrixMultiplication {}
impl MPSNDArrayQuantizedMatrixMultiplication {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayQuantizedMatrixMultiplication").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMatrixMultiplication for MPSNDArrayQuantizedMatrixMultiplication {}
impl From<MPSNDArrayQuantizedMatrixMultiplication> for MPSNDArrayMatrixMultiplication {
    fn from(child: MPSNDArrayQuantizedMatrixMultiplication) -> MPSNDArrayMatrixMultiplication {
        MPSNDArrayMatrixMultiplication(child.0)
    }
}
impl std::convert::TryFrom<MPSNDArrayMatrixMultiplication>
    for MPSNDArrayQuantizedMatrixMultiplication
{
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMatrixMultiplication,
    ) -> Result<MPSNDArrayQuantizedMatrixMultiplication, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayQuantizedMatrixMultiplication").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayQuantizedMatrixMultiplication(parent.0))
        } else {
            Err ("This MPSNDArrayMatrixMultiplication cannot be downcasted to MPSNDArrayQuantizedMatrixMultiplication" ,)
        }
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayQuantizedMatrixMultiplication {}
impl IMPSNDArrayMultiaryBase for MPSNDArrayQuantizedMatrixMultiplication {}
impl IMPSKernel for MPSNDArrayQuantizedMatrixMultiplication {}
impl PNSCopying for MPSNDArrayQuantizedMatrixMultiplication {}
impl PNSSecureCoding for MPSNDArrayQuantizedMatrixMultiplication {}
impl INSObject for MPSNDArrayQuantizedMatrixMultiplication {}
impl PNSObject for MPSNDArrayQuantizedMatrixMultiplication {}
impl IMPSNDArrayQuantizedMatrixMultiplication for MPSNDArrayQuantizedMatrixMultiplication {}
pub trait IMPSNDArrayQuantizedMatrixMultiplication: Sized + std::ops::Deref {
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        sourceCount: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : sourceCount)
    }
    unsafe fn initWithDevice_leftQuantizationDescriptor_rightQuantizationDescriptor_(
        &self,
        device: *mut u64,
        leftQuantizationDescriptor: MPSNDArrayQuantizationDescriptor,
        rightQuantizationDescriptor: MPSNDArrayQuantizationDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, leftQuantizationDescriptor : leftQuantizationDescriptor, rightQuantizationDescriptor : rightQuantizationDescriptor)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayLUTDequantize(pub id);
impl std::ops::Deref for MPSNDArrayLUTDequantize {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayLUTDequantize {}
impl MPSNDArrayLUTDequantize {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayLUTDequantize").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayLUTDequantize {}
impl std::convert::TryFrom<MPSNDArrayMultiaryKernel> for MPSNDArrayLUTDequantize {
    type Error = &'static str;
    fn try_from(parent: MPSNDArrayMultiaryKernel) -> Result<MPSNDArrayLUTDequantize, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayLUTDequantize").unwrap()) };
        if is_kind_of {
            Ok(MPSNDArrayLUTDequantize(parent.0))
        } else {
            Err("This MPSNDArrayMultiaryKernel cannot be downcasted to MPSNDArrayLUTDequantize")
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayLUTDequantize {}
impl IMPSKernel for MPSNDArrayLUTDequantize {}
impl PNSCopying for MPSNDArrayLUTDequantize {}
impl PNSSecureCoding for MPSNDArrayLUTDequantize {}
impl INSObject for MPSNDArrayLUTDequantize {}
impl PNSObject for MPSNDArrayLUTDequantize {}
impl IMPSNDArrayLUTDequantize for MPSNDArrayLUTDequantize {}
pub trait IMPSNDArrayLUTDequantize: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        sourceCount: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : sourceCount)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayVectorLUTDequantize(pub id);
impl std::ops::Deref for MPSNDArrayVectorLUTDequantize {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayVectorLUTDequantize {}
impl MPSNDArrayVectorLUTDequantize {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayVectorLUTDequantize").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayVectorLUTDequantize {}
impl std::convert::TryFrom<MPSNDArrayMultiaryKernel> for MPSNDArrayVectorLUTDequantize {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryKernel,
    ) -> Result<MPSNDArrayVectorLUTDequantize, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayVectorLUTDequantize").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayVectorLUTDequantize(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryKernel cannot be downcasted to MPSNDArrayVectorLUTDequantize" ,)
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayVectorLUTDequantize {}
impl IMPSKernel for MPSNDArrayVectorLUTDequantize {}
impl PNSCopying for MPSNDArrayVectorLUTDequantize {}
impl PNSSecureCoding for MPSNDArrayVectorLUTDequantize {}
impl INSObject for MPSNDArrayVectorLUTDequantize {}
impl PNSObject for MPSNDArrayVectorLUTDequantize {}
impl IMPSNDArrayVectorLUTDequantize for MPSNDArrayVectorLUTDequantize {}
pub trait IMPSNDArrayVectorLUTDequantize: Sized + std::ops::Deref {
    unsafe fn initWithDevice_axis_(&self, device: *mut u64, axis: NSUInteger) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, axis : axis)
    }
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        sourceCount: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : sourceCount)
    }
    unsafe fn vectorAxis(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vectorAxis)
    }
    unsafe fn setVectorAxis_(&self, vectorAxis: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVectorAxis : vectorAxis)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSNDArrayAffineInt4Dequantize(pub id);
impl std::ops::Deref for MPSNDArrayAffineInt4Dequantize {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSNDArrayAffineInt4Dequantize {}
impl MPSNDArrayAffineInt4Dequantize {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSNDArrayAffineInt4Dequantize").unwrap(), alloc) })
    }
}
impl IMPSNDArrayMultiaryKernel for MPSNDArrayAffineInt4Dequantize {}
impl std::convert::TryFrom<MPSNDArrayMultiaryKernel> for MPSNDArrayAffineInt4Dequantize {
    type Error = &'static str;
    fn try_from(
        parent: MPSNDArrayMultiaryKernel,
    ) -> Result<MPSNDArrayAffineInt4Dequantize, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSNDArrayAffineInt4Dequantize").unwrap())
        };
        if is_kind_of {
            Ok(MPSNDArrayAffineInt4Dequantize(parent.0))
        } else {
            Err ("This MPSNDArrayMultiaryKernel cannot be downcasted to MPSNDArrayAffineInt4Dequantize" ,)
        }
    }
}
impl IMPSNDArrayMultiaryBase for MPSNDArrayAffineInt4Dequantize {}
impl IMPSKernel for MPSNDArrayAffineInt4Dequantize {}
impl PNSCopying for MPSNDArrayAffineInt4Dequantize {}
impl PNSSecureCoding for MPSNDArrayAffineInt4Dequantize {}
impl INSObject for MPSNDArrayAffineInt4Dequantize {}
impl PNSObject for MPSNDArrayAffineInt4Dequantize {}
impl IMPSNDArrayAffineInt4Dequantize for MPSNDArrayAffineInt4Dequantize {}
pub trait IMPSNDArrayAffineInt4Dequantize: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithDevice_quantizationDescriptor_(
        &self,
        device: *mut u64,
        quantizationDescriptor: MPSNDArrayAffineQuantizationDescriptor,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, quantizationDescriptor : quantizationDescriptor)
    }
    unsafe fn initWithDevice_sourceCount_(
        &self,
        device: *mut u64,
        sourceCount: NSUInteger,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device, sourceCount : sourceCount)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSAccelerationStructureGroup(pub id);
impl std::ops::Deref for MPSAccelerationStructureGroup {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSAccelerationStructureGroup {}
impl MPSAccelerationStructureGroup {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSAccelerationStructureGroup").unwrap(), alloc) })
    }
}
impl INSObject for MPSAccelerationStructureGroup {}
impl PNSObject for MPSAccelerationStructureGroup {}
impl std::convert::TryFrom<NSObject> for MPSAccelerationStructureGroup {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSAccelerationStructureGroup, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSAccelerationStructureGroup").unwrap())
        };
        if is_kind_of {
            Ok(MPSAccelerationStructureGroup(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSAccelerationStructureGroup")
        }
    }
}
impl IMPSAccelerationStructureGroup for MPSAccelerationStructureGroup {}
pub trait IMPSAccelerationStructureGroup: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _MPSPackedFloat3 {
    pub __bindgen_anon_1: _MPSPackedFloat3__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _MPSPackedFloat3__bindgen_ty_1 {
    pub __bindgen_anon_1: _MPSPackedFloat3__bindgen_ty_1__bindgen_ty_1,
    pub elements: [f32; 3usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _MPSPackedFloat3__bindgen_ty_1__bindgen_ty_1 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}
pub type MPSPackedFloat3 = _MPSPackedFloat3;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct _MPSAxisAlignedBoundingBox {
    pub min: vector_float3,
    pub max: vector_float3,
}
pub type MPSAxisAlignedBoundingBox = _MPSAxisAlignedBoundingBox;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct MPSRayOriginDirection {
    pub origin: vector_float3,
    pub direction: vector_float3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MPSRayPackedOriginDirection {
    pub origin: MPSPackedFloat3,
    pub direction: MPSPackedFloat3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MPSRayOriginMinDistanceDirectionMaxDistance {
    pub origin: MPSPackedFloat3,
    pub minDistance: f32,
    pub direction: MPSPackedFloat3,
    pub maxDistance: f32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MPSRayOriginMaskDirectionMaxDistance {
    pub origin: MPSPackedFloat3,
    pub mask: ::std::os::raw::c_uint,
    pub direction: MPSPackedFloat3,
    pub maxDistance: f32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistance {
    pub distance: f32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndex {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexBufferIndex {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub bufferIndex: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexCoordinates {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub coordinates: vector_float2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexBufferIndexCoordinates {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub bufferIndex: ::std::os::raw::c_uint,
    pub coordinates: vector_float2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexInstanceIndex {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub instanceIndex: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndex {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub bufferIndex: ::std::os::raw::c_uint,
    pub instanceIndex: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexInstanceIndexCoordinates {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub instanceIndex: ::std::os::raw::c_uint,
    pub coordinates: vector_float2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndexCoordinates {
    pub distance: f32,
    pub primitiveIndex: ::std::os::raw::c_uint,
    pub bufferIndex: ::std::os::raw::c_uint,
    pub instanceIndex: ::std::os::raw::c_uint,
    pub coordinates: vector_float2,
}
pub type MPSAccelerationStructureCompletionHandler = *mut ::std::os::raw::c_void;
pub type MPSAccelerationStructureUsage = NSUInteger;
pub type MPSAccelerationStructureStatus = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSAccelerationStructure(pub id);
impl std::ops::Deref for MPSAccelerationStructure {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSAccelerationStructure {}
impl MPSAccelerationStructure {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSAccelerationStructure").unwrap(), alloc) })
    }
}
impl PNSSecureCoding for MPSAccelerationStructure {}
impl PNSCopying for MPSAccelerationStructure {}
impl IMPSKernel for MPSAccelerationStructure {}
impl std::convert::TryFrom<MPSKernel> for MPSAccelerationStructure {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSAccelerationStructure, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSAccelerationStructure").unwrap()) };
        if is_kind_of {
            Ok(MPSAccelerationStructure(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSAccelerationStructure")
        }
    }
}
impl INSObject for MPSAccelerationStructure {}
impl PNSObject for MPSAccelerationStructure {}
impl IMPSAccelerationStructure for MPSAccelerationStructure {}
pub trait IMPSAccelerationStructure: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn initWithGroup_(&self, group: MPSAccelerationStructureGroup) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithGroup : group)
    }
    unsafe fn initWithCoder_group_(
        &self,
        aDecoder: NSCoder,
        group: MPSAccelerationStructureGroup,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, group : group)
    }
    unsafe fn rebuild(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rebuild)
    }
    unsafe fn rebuildWithCompletionHandler_(
        &self,
        completionHandler: MPSAccelerationStructureCompletionHandler,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, rebuildWithCompletionHandler : completionHandler)
    }
    unsafe fn encodeRefitToCommandBuffer_(&self, commandBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeRefitToCommandBuffer : commandBuffer)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn copyWithZone_group_(
        &self,
        zone: *mut NSZone,
        group: MPSAccelerationStructureGroup,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, group : group)
    }
    unsafe fn encodeWithCoder_(&self, coder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : coder)
    }
    unsafe fn group(&self) -> MPSAccelerationStructureGroup
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, group)
    }
    unsafe fn boundingBox(&self) -> MPSAxisAlignedBoundingBox
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, boundingBox)
    }
    unsafe fn status(&self) -> MPSAccelerationStructureStatus
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, status)
    }
    unsafe fn usage(&self) -> MPSAccelerationStructureUsage
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, usage)
    }
    unsafe fn setUsage_(&self, usage: MPSAccelerationStructureUsage)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setUsage : usage)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSPolygonBuffer(pub id);
impl std::ops::Deref for MPSPolygonBuffer {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSPolygonBuffer {}
impl MPSPolygonBuffer {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSPolygonBuffer").unwrap(), alloc) })
    }
}
impl PNSCopying for MPSPolygonBuffer {}
impl PNSSecureCoding for MPSPolygonBuffer {}
impl INSObject for MPSPolygonBuffer {}
impl PNSObject for MPSPolygonBuffer {}
impl std::convert::TryFrom<NSObject> for MPSPolygonBuffer {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSPolygonBuffer, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSPolygonBuffer").unwrap()) };
        if is_kind_of {
            Ok(MPSPolygonBuffer(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSPolygonBuffer")
        }
    }
}
impl IMPSPolygonBuffer for MPSPolygonBuffer {}
pub trait IMPSPolygonBuffer: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithCoder_(&self, aDecoder: NSCoder) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder)
    }
    unsafe fn copyWithZone_(&self, zone: *mut NSZone) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone)
    }
    unsafe fn vertexBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vertexBuffer)
    }
    unsafe fn setVertexBuffer_(&self, vertexBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVertexBuffer : vertexBuffer)
    }
    unsafe fn vertexBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vertexBufferOffset)
    }
    unsafe fn setVertexBufferOffset_(&self, vertexBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVertexBufferOffset : vertexBufferOffset)
    }
    unsafe fn indexBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, indexBuffer)
    }
    unsafe fn setIndexBuffer_(&self, indexBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIndexBuffer : indexBuffer)
    }
    unsafe fn indexBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, indexBufferOffset)
    }
    unsafe fn setIndexBufferOffset_(&self, indexBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIndexBufferOffset : indexBufferOffset)
    }
    unsafe fn maskBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskBuffer)
    }
    unsafe fn setMaskBuffer_(&self, maskBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaskBuffer : maskBuffer)
    }
    unsafe fn maskBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskBufferOffset)
    }
    unsafe fn setMaskBufferOffset_(&self, maskBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaskBufferOffset : maskBufferOffset)
    }
    unsafe fn polygonCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, polygonCount)
    }
    unsafe fn setPolygonCount_(&self, polygonCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPolygonCount : polygonCount)
    }
    unsafe fn polygonBuffer() -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&*objc2::runtime::AnyClass::get(c"MPSPolygonBuffer").unwrap(), polygonBuffer)
    }
}
pub type MPSPolygonType = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSPolygonAccelerationStructure(pub id);
impl std::ops::Deref for MPSPolygonAccelerationStructure {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSPolygonAccelerationStructure {}
impl MPSPolygonAccelerationStructure {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSPolygonAccelerationStructure").unwrap(), alloc) })
    }
}
impl IMPSAccelerationStructure for MPSPolygonAccelerationStructure {}
impl PNSSecureCoding for MPSPolygonAccelerationStructure {}
impl PNSCopying for MPSPolygonAccelerationStructure {}
impl From<MPSPolygonAccelerationStructure> for MPSAccelerationStructure {
    fn from(child: MPSPolygonAccelerationStructure) -> MPSAccelerationStructure {
        MPSAccelerationStructure(child.0)
    }
}
impl std::convert::TryFrom<MPSAccelerationStructure> for MPSPolygonAccelerationStructure {
    type Error = &'static str;
    fn try_from(
        parent: MPSAccelerationStructure,
    ) -> Result<MPSPolygonAccelerationStructure, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSPolygonAccelerationStructure").unwrap())
        };
        if is_kind_of {
            Ok(MPSPolygonAccelerationStructure(parent.0))
        } else {
            Err ("This MPSAccelerationStructure cannot be downcasted to MPSPolygonAccelerationStructure" ,)
        }
    }
}
impl IMPSKernel for MPSPolygonAccelerationStructure {}
impl INSObject for MPSPolygonAccelerationStructure {}
impl PNSObject for MPSPolygonAccelerationStructure {}
impl IMPSPolygonAccelerationStructure for MPSPolygonAccelerationStructure {}
pub trait IMPSPolygonAccelerationStructure: Sized + std::ops::Deref {
    unsafe fn polygonType(&self) -> MPSPolygonType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, polygonType)
    }
    unsafe fn setPolygonType_(&self, polygonType: MPSPolygonType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPolygonType : polygonType)
    }
    unsafe fn vertexStride(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vertexStride)
    }
    unsafe fn setVertexStride_(&self, vertexStride: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVertexStride : vertexStride)
    }
    unsafe fn indexType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, indexType)
    }
    unsafe fn setIndexType_(&self, indexType: MPSDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIndexType : indexType)
    }
    unsafe fn vertexBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vertexBuffer)
    }
    unsafe fn setVertexBuffer_(&self, vertexBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVertexBuffer : vertexBuffer)
    }
    unsafe fn vertexBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, vertexBufferOffset)
    }
    unsafe fn setVertexBufferOffset_(&self, vertexBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVertexBufferOffset : vertexBufferOffset)
    }
    unsafe fn indexBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, indexBuffer)
    }
    unsafe fn setIndexBuffer_(&self, indexBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIndexBuffer : indexBuffer)
    }
    unsafe fn indexBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, indexBufferOffset)
    }
    unsafe fn setIndexBufferOffset_(&self, indexBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIndexBufferOffset : indexBufferOffset)
    }
    unsafe fn maskBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskBuffer)
    }
    unsafe fn setMaskBuffer_(&self, maskBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaskBuffer : maskBuffer)
    }
    unsafe fn maskBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskBufferOffset)
    }
    unsafe fn setMaskBufferOffset_(&self, maskBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaskBufferOffset : maskBufferOffset)
    }
    unsafe fn polygonCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, polygonCount)
    }
    unsafe fn setPolygonCount_(&self, polygonCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPolygonCount : polygonCount)
    }
    unsafe fn polygonBuffers(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, polygonBuffers)
    }
    unsafe fn setPolygonBuffers_(&self, polygonBuffers: NSArray)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setPolygonBuffers : polygonBuffers)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSTriangleAccelerationStructure(pub id);
impl std::ops::Deref for MPSTriangleAccelerationStructure {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSTriangleAccelerationStructure {}
impl MPSTriangleAccelerationStructure {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTriangleAccelerationStructure").unwrap(), alloc) })
    }
}
impl IMPSPolygonAccelerationStructure for MPSTriangleAccelerationStructure {}
impl From<MPSTriangleAccelerationStructure> for MPSPolygonAccelerationStructure {
    fn from(child: MPSTriangleAccelerationStructure) -> MPSPolygonAccelerationStructure {
        MPSPolygonAccelerationStructure(child.0)
    }
}
impl std::convert::TryFrom<MPSPolygonAccelerationStructure> for MPSTriangleAccelerationStructure {
    type Error = &'static str;
    fn try_from(
        parent: MPSPolygonAccelerationStructure,
    ) -> Result<MPSTriangleAccelerationStructure, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSTriangleAccelerationStructure").unwrap())
        };
        if is_kind_of {
            Ok(MPSTriangleAccelerationStructure(parent.0))
        } else {
            Err ("This MPSPolygonAccelerationStructure cannot be downcasted to MPSTriangleAccelerationStructure" ,)
        }
    }
}
impl IMPSAccelerationStructure for MPSTriangleAccelerationStructure {}
impl PNSSecureCoding for MPSTriangleAccelerationStructure {}
impl PNSCopying for MPSTriangleAccelerationStructure {}
impl IMPSKernel for MPSTriangleAccelerationStructure {}
impl INSObject for MPSTriangleAccelerationStructure {}
impl PNSObject for MPSTriangleAccelerationStructure {}
impl IMPSTriangleAccelerationStructure for MPSTriangleAccelerationStructure {}
pub trait IMPSTriangleAccelerationStructure: Sized + std::ops::Deref {
    unsafe fn triangleCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, triangleCount)
    }
    unsafe fn setTriangleCount_(&self, triangleCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTriangleCount : triangleCount)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSQuadrilateralAccelerationStructure(pub id);
impl std::ops::Deref for MPSQuadrilateralAccelerationStructure {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSQuadrilateralAccelerationStructure {}
impl MPSQuadrilateralAccelerationStructure {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSQuadrilateralAccelerationStructure").unwrap(), alloc) })
    }
}
impl IMPSPolygonAccelerationStructure for MPSQuadrilateralAccelerationStructure {}
impl std::convert::TryFrom<MPSPolygonAccelerationStructure>
    for MPSQuadrilateralAccelerationStructure
{
    type Error = &'static str;
    fn try_from(
        parent: MPSPolygonAccelerationStructure,
    ) -> Result<MPSQuadrilateralAccelerationStructure, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSQuadrilateralAccelerationStructure").unwrap())
        };
        if is_kind_of {
            Ok(MPSQuadrilateralAccelerationStructure(parent.0))
        } else {
            Err ("This MPSPolygonAccelerationStructure cannot be downcasted to MPSQuadrilateralAccelerationStructure" ,)
        }
    }
}
impl IMPSAccelerationStructure for MPSQuadrilateralAccelerationStructure {}
impl PNSSecureCoding for MPSQuadrilateralAccelerationStructure {}
impl PNSCopying for MPSQuadrilateralAccelerationStructure {}
impl IMPSKernel for MPSQuadrilateralAccelerationStructure {}
impl INSObject for MPSQuadrilateralAccelerationStructure {}
impl PNSObject for MPSQuadrilateralAccelerationStructure {}
impl IMPSQuadrilateralAccelerationStructure for MPSQuadrilateralAccelerationStructure {}
pub trait IMPSQuadrilateralAccelerationStructure: Sized + std::ops::Deref {
    unsafe fn quadrilateralCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, quadrilateralCount)
    }
    unsafe fn setQuadrilateralCount_(&self, quadrilateralCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setQuadrilateralCount : quadrilateralCount)
    }
}
pub type MPSTransformType = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSInstanceAccelerationStructure(pub id);
impl std::ops::Deref for MPSInstanceAccelerationStructure {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSInstanceAccelerationStructure {}
impl MPSInstanceAccelerationStructure {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSInstanceAccelerationStructure").unwrap(), alloc) })
    }
}
impl IMPSAccelerationStructure for MPSInstanceAccelerationStructure {}
impl PNSSecureCoding for MPSInstanceAccelerationStructure {}
impl PNSCopying for MPSInstanceAccelerationStructure {}
impl std::convert::TryFrom<MPSAccelerationStructure> for MPSInstanceAccelerationStructure {
    type Error = &'static str;
    fn try_from(
        parent: MPSAccelerationStructure,
    ) -> Result<MPSInstanceAccelerationStructure, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSInstanceAccelerationStructure").unwrap())
        };
        if is_kind_of {
            Ok(MPSInstanceAccelerationStructure(parent.0))
        } else {
            Err ("This MPSAccelerationStructure cannot be downcasted to MPSInstanceAccelerationStructure" ,)
        }
    }
}
impl IMPSKernel for MPSInstanceAccelerationStructure {}
impl INSObject for MPSInstanceAccelerationStructure {}
impl PNSObject for MPSInstanceAccelerationStructure {}
impl IMPSInstanceAccelerationStructure for MPSInstanceAccelerationStructure {}
pub trait IMPSInstanceAccelerationStructure: Sized + std::ops::Deref {
    unsafe fn accelerationStructures(&self) -> NSArray
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, accelerationStructures)
    }
    unsafe fn setAccelerationStructures_(&self, accelerationStructures: NSArray)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setAccelerationStructures : accelerationStructures)
    }
    unsafe fn instanceBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, instanceBuffer)
    }
    unsafe fn setInstanceBuffer_(&self, instanceBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInstanceBuffer : instanceBuffer)
    }
    unsafe fn instanceBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, instanceBufferOffset)
    }
    unsafe fn setInstanceBufferOffset_(&self, instanceBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInstanceBufferOffset : instanceBufferOffset)
    }
    unsafe fn transformBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transformBuffer)
    }
    unsafe fn setTransformBuffer_(&self, transformBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTransformBuffer : transformBuffer)
    }
    unsafe fn transformBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transformBufferOffset)
    }
    unsafe fn setTransformBufferOffset_(&self, transformBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTransformBufferOffset : transformBufferOffset)
    }
    unsafe fn transformType(&self) -> MPSTransformType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, transformType)
    }
    unsafe fn setTransformType_(&self, transformType: MPSTransformType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTransformType : transformType)
    }
    unsafe fn maskBuffer(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskBuffer)
    }
    unsafe fn setMaskBuffer_(&self, maskBuffer: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaskBuffer : maskBuffer)
    }
    unsafe fn maskBufferOffset(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, maskBufferOffset)
    }
    unsafe fn setMaskBufferOffset_(&self, maskBufferOffset: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMaskBufferOffset : maskBufferOffset)
    }
    unsafe fn instanceCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, instanceCount)
    }
    unsafe fn setInstanceCount_(&self, instanceCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setInstanceCount : instanceCount)
    }
}
pub type MPSTemporalWeighting = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSSVGF(pub id);
impl std::ops::Deref for MPSSVGF {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSSVGF {}
impl MPSSVGF {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSSVGF").unwrap(), alloc) })
    }
}
impl PNSSecureCoding for MPSSVGF {}
impl PNSCopying for MPSSVGF {}
impl IMPSKernel for MPSSVGF {}
impl std::convert::TryFrom<MPSKernel> for MPSSVGF {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSSVGF, Self::Error> {
        let is_kind_of: bool = unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSSVGF").unwrap()) };
        if is_kind_of {
            Ok(MPSSVGF(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSSVGF")
        }
    }
}
impl INSObject for MPSSVGF {}
impl PNSObject for MPSSVGF {}
impl IMPSSVGF for MPSSVGF {}
pub trait IMPSSVGF: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn encodeWithCoder_(&self, coder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : coder)
    }
    unsafe fn encodeReprojectionToCommandBuffer_sourceTexture_previousTexture_destinationTexture_previousLuminanceMomentsTexture_destinationLuminanceMomentsTexture_previousFrameCountTexture_destinationFrameCountTexture_motionVectorTexture_depthNormalTexture_previousDepthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        previousTexture: *mut u64,
        destinationTexture: *mut u64,
        previousLuminanceMomentsTexture: *mut u64,
        destinationLuminanceMomentsTexture: *mut u64,
        previousFrameCountTexture: *mut u64,
        destinationFrameCountTexture: *mut u64,
        motionVectorTexture: *mut u64,
        depthNormalTexture: *mut u64,
        previousDepthNormalTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeReprojectionToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, previousTexture : previousTexture, destinationTexture : destinationTexture, previousLuminanceMomentsTexture : previousLuminanceMomentsTexture, destinationLuminanceMomentsTexture : destinationLuminanceMomentsTexture, previousFrameCountTexture : previousFrameCountTexture, destinationFrameCountTexture : destinationFrameCountTexture, motionVectorTexture : motionVectorTexture, depthNormalTexture : depthNormalTexture, previousDepthNormalTexture : previousDepthNormalTexture)
    }
    unsafe fn encodeVarianceEstimationToCommandBuffer_sourceTexture_luminanceMomentsTexture_destinationTexture_frameCountTexture_depthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        luminanceMomentsTexture: *mut u64,
        destinationTexture: *mut u64,
        frameCountTexture: *mut u64,
        depthNormalTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeVarianceEstimationToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, luminanceMomentsTexture : luminanceMomentsTexture, destinationTexture : destinationTexture, frameCountTexture : frameCountTexture, depthNormalTexture : depthNormalTexture)
    }
    unsafe fn encodeVarianceEstimationToCommandBuffer_sourceTexture_luminanceMomentsTexture_destinationTexture_sourceTexture2_luminanceMomentsTexture2_destinationTexture2_frameCountTexture_depthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        luminanceMomentsTexture: *mut u64,
        destinationTexture: *mut u64,
        sourceTexture2: *mut u64,
        luminanceMomentsTexture2: *mut u64,
        destinationTexture2: *mut u64,
        frameCountTexture: *mut u64,
        depthNormalTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeVarianceEstimationToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, luminanceMomentsTexture : luminanceMomentsTexture, destinationTexture : destinationTexture, sourceTexture2 : sourceTexture2, luminanceMomentsTexture2 : luminanceMomentsTexture2, destinationTexture2 : destinationTexture2, frameCountTexture : frameCountTexture, depthNormalTexture : depthNormalTexture)
    }
    unsafe fn encodeBilateralFilterToCommandBuffer_stepDistance_sourceTexture_destinationTexture_depthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        stepDistance: NSUInteger,
        sourceTexture: *mut u64,
        destinationTexture: *mut u64,
        depthNormalTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBilateralFilterToCommandBuffer : commandBuffer, stepDistance : stepDistance, sourceTexture : sourceTexture, destinationTexture : destinationTexture, depthNormalTexture : depthNormalTexture)
    }
    unsafe fn encodeBilateralFilterToCommandBuffer_stepDistance_sourceTexture_destinationTexture_sourceTexture2_destinationTexture2_depthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        stepDistance: NSUInteger,
        sourceTexture: *mut u64,
        destinationTexture: *mut u64,
        sourceTexture2: *mut u64,
        destinationTexture2: *mut u64,
        depthNormalTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeBilateralFilterToCommandBuffer : commandBuffer, stepDistance : stepDistance, sourceTexture : sourceTexture, destinationTexture : destinationTexture, sourceTexture2 : sourceTexture2, destinationTexture2 : destinationTexture2, depthNormalTexture : depthNormalTexture)
    }
    unsafe fn depthWeight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, depthWeight)
    }
    unsafe fn setDepthWeight_(&self, depthWeight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setDepthWeight : depthWeight)
    }
    unsafe fn normalWeight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, normalWeight)
    }
    unsafe fn setNormalWeight_(&self, normalWeight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setNormalWeight : normalWeight)
    }
    unsafe fn luminanceWeight(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, luminanceWeight)
    }
    unsafe fn setLuminanceWeight_(&self, luminanceWeight: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setLuminanceWeight : luminanceWeight)
    }
    unsafe fn temporalWeighting(&self) -> MPSTemporalWeighting
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, temporalWeighting)
    }
    unsafe fn setTemporalWeighting_(&self, temporalWeighting: MPSTemporalWeighting)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTemporalWeighting : temporalWeighting)
    }
    unsafe fn temporalReprojectionBlendFactor(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, temporalReprojectionBlendFactor)
    }
    unsafe fn setTemporalReprojectionBlendFactor_(&self, temporalReprojectionBlendFactor: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTemporalReprojectionBlendFactor : temporalReprojectionBlendFactor)
    }
    unsafe fn reprojectionThreshold(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reprojectionThreshold)
    }
    unsafe fn setReprojectionThreshold_(&self, reprojectionThreshold: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setReprojectionThreshold : reprojectionThreshold)
    }
    unsafe fn minimumFramesForVarianceEstimation(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, minimumFramesForVarianceEstimation)
    }
    unsafe fn setMinimumFramesForVarianceEstimation_(
        &self,
        minimumFramesForVarianceEstimation: NSUInteger,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setMinimumFramesForVarianceEstimation : minimumFramesForVarianceEstimation)
    }
    unsafe fn varianceEstimationRadius(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, varianceEstimationRadius)
    }
    unsafe fn setVarianceEstimationRadius_(&self, varianceEstimationRadius: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVarianceEstimationRadius : varianceEstimationRadius)
    }
    unsafe fn varianceEstimationSigma(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, varianceEstimationSigma)
    }
    unsafe fn setVarianceEstimationSigma_(&self, varianceEstimationSigma: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVarianceEstimationSigma : varianceEstimationSigma)
    }
    unsafe fn variancePrefilterSigma(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, variancePrefilterSigma)
    }
    unsafe fn setVariancePrefilterSigma_(&self, variancePrefilterSigma: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVariancePrefilterSigma : variancePrefilterSigma)
    }
    unsafe fn variancePrefilterRadius(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, variancePrefilterRadius)
    }
    unsafe fn setVariancePrefilterRadius_(&self, variancePrefilterRadius: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setVariancePrefilterRadius : variancePrefilterRadius)
    }
    unsafe fn bilateralFilterSigma(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bilateralFilterSigma)
    }
    unsafe fn setBilateralFilterSigma_(&self, bilateralFilterSigma: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBilateralFilterSigma : bilateralFilterSigma)
    }
    unsafe fn bilateralFilterRadius(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bilateralFilterRadius)
    }
    unsafe fn setBilateralFilterRadius_(&self, bilateralFilterRadius: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBilateralFilterRadius : bilateralFilterRadius)
    }
    unsafe fn channelCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, channelCount)
    }
    unsafe fn setChannelCount_(&self, channelCount: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setChannelCount : channelCount)
    }
    unsafe fn channelCount2(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, channelCount2)
    }
    unsafe fn setChannelCount2_(&self, channelCount2: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setChannelCount2 : channelCount2)
    }
}
pub trait PMPSSVGFTextureAllocator: Sized + std::ops::Deref {
    unsafe fn textureWithPixelFormat_width_height_(
        &self,
        pixelFormat: MTLPixelFormat,
        width: NSUInteger,
        height: NSUInteger,
    ) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, textureWithPixelFormat : pixelFormat, width : width, height : height)
    }
    unsafe fn returnTexture_(&self, texture: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, returnTexture : texture)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSSVGFDefaultTextureAllocator(pub id);
impl std::ops::Deref for MPSSVGFDefaultTextureAllocator {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSSVGFDefaultTextureAllocator {}
impl MPSSVGFDefaultTextureAllocator {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSSVGFDefaultTextureAllocator").unwrap(), alloc) })
    }
}
impl PMPSSVGFTextureAllocator for MPSSVGFDefaultTextureAllocator {}
impl INSObject for MPSSVGFDefaultTextureAllocator {}
impl PNSObject for MPSSVGFDefaultTextureAllocator {}
impl std::convert::TryFrom<NSObject> for MPSSVGFDefaultTextureAllocator {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSSVGFDefaultTextureAllocator, Self::Error> {
        let is_kind_of: bool = unsafe {
            msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSSVGFDefaultTextureAllocator").unwrap())
        };
        if is_kind_of {
            Ok(MPSSVGFDefaultTextureAllocator(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSSVGFDefaultTextureAllocator")
        }
    }
}
impl IMPSSVGFDefaultTextureAllocator for MPSSVGFDefaultTextureAllocator {}
pub trait IMPSSVGFDefaultTextureAllocator: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn textureWithPixelFormat_width_height_(
        &self,
        pixelFormat: MTLPixelFormat,
        width: NSUInteger,
        height: NSUInteger,
    ) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, textureWithPixelFormat : pixelFormat, width : width, height : height)
    }
    unsafe fn returnTexture_(&self, texture: *mut u64)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, returnTexture : texture)
    }
    unsafe fn reset(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, reset)
    }
    unsafe fn device(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, device)
    }
    unsafe fn allocatedTextureCount(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, allocatedTextureCount)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSSVGFDenoiser(pub id);
impl std::ops::Deref for MPSSVGFDenoiser {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSSVGFDenoiser {}
impl MPSSVGFDenoiser {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSSVGFDenoiser").unwrap(), alloc) })
    }
}
impl INSObject for MPSSVGFDenoiser {}
impl PNSObject for MPSSVGFDenoiser {}
impl std::convert::TryFrom<NSObject> for MPSSVGFDenoiser {
    type Error = &'static str;
    fn try_from(parent: NSObject) -> Result<MPSSVGFDenoiser, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSSVGFDenoiser").unwrap()) };
        if is_kind_of {
            Ok(MPSSVGFDenoiser(parent.0))
        } else {
            Err("This NSObject cannot be downcasted to MPSSVGFDenoiser")
        }
    }
}
impl IMPSSVGFDenoiser for MPSSVGFDenoiser {}
pub trait IMPSSVGFDenoiser: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithSVGF_textureAllocator_(
        &self,
        svgf: MPSSVGF,
        textureAllocator: *mut u64,
    ) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithSVGF : svgf, textureAllocator : textureAllocator)
    }
    unsafe fn clearTemporalHistory(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, clearTemporalHistory)
    }
    unsafe fn releaseTemporaryTextures(&self)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, releaseTemporaryTextures)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_motionVectorTexture_depthNormalTexture_previousDepthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        motionVectorTexture: *mut u64,
        depthNormalTexture: *mut u64,
        previousDepthNormalTexture: *mut u64,
    ) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, motionVectorTexture : motionVectorTexture, depthNormalTexture : depthNormalTexture, previousDepthNormalTexture : previousDepthNormalTexture)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_destinationTexture_sourceTexture2_destinationTexture2_motionVectorTexture_depthNormalTexture_previousDepthNormalTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        destinationTexture: *mut *mut u64,
        sourceTexture2: *mut u64,
        destinationTexture2: *mut *mut u64,
        motionVectorTexture: *mut u64,
        depthNormalTexture: *mut u64,
        previousDepthNormalTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, destinationTexture : destinationTexture, sourceTexture2 : sourceTexture2, destinationTexture2 : destinationTexture2, motionVectorTexture : motionVectorTexture, depthNormalTexture : depthNormalTexture, previousDepthNormalTexture : previousDepthNormalTexture)
    }
    unsafe fn svgf(&self) -> MPSSVGF
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, svgf)
    }
    unsafe fn textureAllocator(&self) -> *mut u64
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, textureAllocator)
    }
    unsafe fn bilateralFilterIterations(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, bilateralFilterIterations)
    }
    unsafe fn setBilateralFilterIterations_(&self, bilateralFilterIterations: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBilateralFilterIterations : bilateralFilterIterations)
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSTemporalAA(pub id);
impl std::ops::Deref for MPSTemporalAA {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSTemporalAA {}
impl MPSTemporalAA {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSTemporalAA").unwrap(), alloc) })
    }
}
impl PNSSecureCoding for MPSTemporalAA {}
impl PNSCopying for MPSTemporalAA {}
impl IMPSKernel for MPSTemporalAA {}
impl std::convert::TryFrom<MPSKernel> for MPSTemporalAA {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSTemporalAA, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSTemporalAA").unwrap()) };
        if is_kind_of {
            Ok(MPSTemporalAA(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSTemporalAA")
        }
    }
}
impl INSObject for MPSTemporalAA {}
impl PNSObject for MPSTemporalAA {}
impl IMPSTemporalAA for MPSTemporalAA {}
pub trait IMPSTemporalAA: Sized + std::ops::Deref {
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn encodeWithCoder_(&self, coder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : coder)
    }
    unsafe fn encodeToCommandBuffer_sourceTexture_previousTexture_destinationTexture_motionVectorTexture_depthTexture_(
        &self,
        commandBuffer: *mut u64,
        sourceTexture: *mut u64,
        previousTexture: *mut u64,
        destinationTexture: *mut u64,
        motionVectorTexture: *mut u64,
        depthTexture: *mut u64,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeToCommandBuffer : commandBuffer, sourceTexture : sourceTexture, previousTexture : previousTexture, destinationTexture : destinationTexture, motionVectorTexture : motionVectorTexture, depthTexture : depthTexture)
    }
    unsafe fn blendFactor(&self) -> f32
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, blendFactor)
    }
    unsafe fn setBlendFactor_(&self, blendFactor: f32)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBlendFactor : blendFactor)
    }
}
pub type MPSIntersectionType = NSUInteger;
pub type MPSTriangleIntersectionTestType = NSUInteger;
pub type MPSBoundingBoxIntersectionTestType = NSUInteger;
pub type MPSRayMaskOptions = NSUInteger;
pub type MPSRayDataType = NSUInteger;
pub type MPSIntersectionDataType = NSUInteger;
pub type MPSRayMaskOperator = NSUInteger;
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]
pub struct MPSRayIntersector(pub id);
impl std::ops::Deref for MPSRayIntersector {
    type Target = objc2::runtime::AnyObject;
    fn deref(&self) -> &Self::Target {
        unsafe { &*self.0 }
    }
}
unsafe impl objc2::Message for MPSRayIntersector {}
impl MPSRayIntersector {
    pub fn alloc() -> Self {
        Self(unsafe { msg_send!(&*objc2::runtime::AnyClass::get(c"MPSRayIntersector").unwrap(), alloc) })
    }
}
impl PNSSecureCoding for MPSRayIntersector {}
impl PNSCopying for MPSRayIntersector {}
impl IMPSKernel for MPSRayIntersector {}
impl std::convert::TryFrom<MPSKernel> for MPSRayIntersector {
    type Error = &'static str;
    fn try_from(parent: MPSKernel) -> Result<MPSRayIntersector, Self::Error> {
        let is_kind_of: bool =
            unsafe { msg_send!(&*parent, isKindOfClass : objc2::runtime::AnyClass::get(c"MPSRayIntersector").unwrap()) };
        if is_kind_of {
            Ok(MPSRayIntersector(parent.0))
        } else {
            Err("This MPSKernel cannot be downcasted to MPSRayIntersector")
        }
    }
}
impl INSObject for MPSRayIntersector {}
impl PNSObject for MPSRayIntersector {}
impl IMPSRayIntersector for MPSRayIntersector {}
pub trait IMPSRayIntersector: Sized + std::ops::Deref {
    unsafe fn init(&self) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, init)
    }
    unsafe fn initWithDevice_(&self, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithDevice : device)
    }
    unsafe fn initWithCoder_device_(&self, aDecoder: NSCoder, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, initWithCoder : aDecoder, device : device)
    }
    unsafe fn copyWithZone_device_(&self, zone: *mut NSZone, device: *mut u64) -> instancetype
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, copyWithZone : zone, device : device)
    }
    unsafe fn recommendedMinimumRayBatchSizeForRayCount_(&self, rayCount: NSUInteger) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, recommendedMinimumRayBatchSizeForRayCount : rayCount)
    }
    unsafe fn encodeWithCoder_(&self, coder: NSCoder)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeWithCoder : coder)
    }
    unsafe fn encodeIntersectionToCommandBuffer_intersectionType_rayBuffer_rayBufferOffset_intersectionBuffer_intersectionBufferOffset_rayCount_accelerationStructure_(
        &self,
        commandBuffer: *mut u64,
        intersectionType: MPSIntersectionType,
        rayBuffer: *mut u64,
        rayBufferOffset: NSUInteger,
        intersectionBuffer: *mut u64,
        intersectionBufferOffset: NSUInteger,
        rayCount: NSUInteger,
        accelerationStructure: MPSAccelerationStructure,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeIntersectionToCommandBuffer : commandBuffer, intersectionType : intersectionType, rayBuffer : rayBuffer, rayBufferOffset : rayBufferOffset, intersectionBuffer : intersectionBuffer, intersectionBufferOffset : intersectionBufferOffset, rayCount : rayCount, accelerationStructure : accelerationStructure)
    }
    unsafe fn encodeIntersectionToCommandBuffer_intersectionType_rayBuffer_rayBufferOffset_intersectionBuffer_intersectionBufferOffset_rayCountBuffer_rayCountBufferOffset_accelerationStructure_(
        &self,
        commandBuffer: *mut u64,
        intersectionType: MPSIntersectionType,
        rayBuffer: *mut u64,
        rayBufferOffset: NSUInteger,
        intersectionBuffer: *mut u64,
        intersectionBufferOffset: NSUInteger,
        rayCountBuffer: *mut u64,
        rayCountBufferOffset: NSUInteger,
        accelerationStructure: MPSAccelerationStructure,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeIntersectionToCommandBuffer : commandBuffer, intersectionType : intersectionType, rayBuffer : rayBuffer, rayBufferOffset : rayBufferOffset, intersectionBuffer : intersectionBuffer, intersectionBufferOffset : intersectionBufferOffset, rayCountBuffer : rayCountBuffer, rayCountBufferOffset : rayCountBufferOffset, accelerationStructure : accelerationStructure)
    }
    unsafe fn encodeIntersectionToCommandBuffer_intersectionType_rayBuffer_rayBufferOffset_rayIndexBuffer_rayIndexBufferOffset_intersectionBuffer_intersectionBufferOffset_rayIndexCount_accelerationStructure_(
        &self,
        commandBuffer: *mut u64,
        intersectionType: MPSIntersectionType,
        rayBuffer: *mut u64,
        rayBufferOffset: NSUInteger,
        rayIndexBuffer: *mut u64,
        rayIndexBufferOffset: NSUInteger,
        intersectionBuffer: *mut u64,
        intersectionBufferOffset: NSUInteger,
        rayIndexCount: NSUInteger,
        accelerationStructure: MPSAccelerationStructure,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeIntersectionToCommandBuffer : commandBuffer, intersectionType : intersectionType, rayBuffer : rayBuffer, rayBufferOffset : rayBufferOffset, rayIndexBuffer : rayIndexBuffer, rayIndexBufferOffset : rayIndexBufferOffset, intersectionBuffer : intersectionBuffer, intersectionBufferOffset : intersectionBufferOffset, rayIndexCount : rayIndexCount, accelerationStructure : accelerationStructure)
    }
    unsafe fn encodeIntersectionToCommandBuffer_intersectionType_rayBuffer_rayBufferOffset_rayIndexBuffer_rayIndexBufferOffset_intersectionBuffer_intersectionBufferOffset_rayIndexCountBuffer_rayIndexCountBufferOffset_accelerationStructure_(
        &self,
        commandBuffer: *mut u64,
        intersectionType: MPSIntersectionType,
        rayBuffer: *mut u64,
        rayBufferOffset: NSUInteger,
        rayIndexBuffer: *mut u64,
        rayIndexBufferOffset: NSUInteger,
        intersectionBuffer: *mut u64,
        intersectionBufferOffset: NSUInteger,
        rayIndexCountBuffer: *mut u64,
        rayIndexCountBufferOffset: NSUInteger,
        accelerationStructure: MPSAccelerationStructure,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeIntersectionToCommandBuffer : commandBuffer, intersectionType : intersectionType, rayBuffer : rayBuffer, rayBufferOffset : rayBufferOffset, rayIndexBuffer : rayIndexBuffer, rayIndexBufferOffset : rayIndexBufferOffset, intersectionBuffer : intersectionBuffer, intersectionBufferOffset : intersectionBufferOffset, rayIndexCountBuffer : rayIndexCountBuffer, rayIndexCountBufferOffset : rayIndexCountBufferOffset, accelerationStructure : accelerationStructure)
    }
    unsafe fn encodeIntersectionToCommandBuffer_intersectionType_rayTexture_intersectionTexture_accelerationStructure_(
        &self,
        commandBuffer: *mut u64,
        intersectionType: MPSIntersectionType,
        rayTexture: *mut u64,
        intersectionTexture: *mut u64,
        accelerationStructure: MPSAccelerationStructure,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, encodeIntersectionToCommandBuffer : commandBuffer, intersectionType : intersectionType, rayTexture : rayTexture, intersectionTexture : intersectionTexture, accelerationStructure : accelerationStructure)
    }
    unsafe fn cullMode(&self) -> MTLCullMode
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, cullMode)
    }
    unsafe fn setCullMode_(&self, cullMode: MTLCullMode)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setCullMode : cullMode)
    }
    unsafe fn frontFacingWinding(&self) -> MTLWinding
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, frontFacingWinding)
    }
    unsafe fn setFrontFacingWinding_(&self, frontFacingWinding: MTLWinding)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setFrontFacingWinding : frontFacingWinding)
    }
    unsafe fn triangleIntersectionTestType(&self) -> MPSTriangleIntersectionTestType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, triangleIntersectionTestType)
    }
    unsafe fn setTriangleIntersectionTestType_(
        &self,
        triangleIntersectionTestType: MPSTriangleIntersectionTestType,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setTriangleIntersectionTestType : triangleIntersectionTestType)
    }
    unsafe fn boundingBoxIntersectionTestType(&self) -> MPSBoundingBoxIntersectionTestType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, boundingBoxIntersectionTestType)
    }
    unsafe fn setBoundingBoxIntersectionTestType_(
        &self,
        boundingBoxIntersectionTestType: MPSBoundingBoxIntersectionTestType,
    ) where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setBoundingBoxIntersectionTestType : boundingBoxIntersectionTestType)
    }
    unsafe fn rayMaskOptions(&self) -> MPSRayMaskOptions
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rayMaskOptions)
    }
    unsafe fn setRayMaskOptions_(&self, rayMaskOptions: MPSRayMaskOptions)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRayMaskOptions : rayMaskOptions)
    }
    unsafe fn rayMaskOperator(&self) -> MPSRayMaskOperator
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rayMaskOperator)
    }
    unsafe fn setRayMaskOperator_(&self, rayMaskOperator: MPSRayMaskOperator)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRayMaskOperator : rayMaskOperator)
    }
    unsafe fn rayStride(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rayStride)
    }
    unsafe fn setRayStride_(&self, rayStride: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRayStride : rayStride)
    }
    unsafe fn intersectionStride(&self) -> NSUInteger
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, intersectionStride)
    }
    unsafe fn setIntersectionStride_(&self, intersectionStride: NSUInteger)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIntersectionStride : intersectionStride)
    }
    unsafe fn rayDataType(&self) -> MPSRayDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rayDataType)
    }
    unsafe fn setRayDataType_(&self, rayDataType: MPSRayDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRayDataType : rayDataType)
    }
    unsafe fn intersectionDataType(&self) -> MPSIntersectionDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, intersectionDataType)
    }
    unsafe fn setIntersectionDataType_(&self, intersectionDataType: MPSIntersectionDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setIntersectionDataType : intersectionDataType)
    }
    unsafe fn rayIndexDataType(&self) -> MPSDataType
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rayIndexDataType)
    }
    unsafe fn setRayIndexDataType_(&self, rayIndexDataType: MPSDataType)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRayIndexDataType : rayIndexDataType)
    }
    unsafe fn rayMask(&self) -> ::std::os::raw::c_uint
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&**self, rayMask)
    }
    unsafe fn setRayMask_(&self, rayMask: ::std::os::raw::c_uint)
    where
        <Self as std::ops::Deref>::Target: objc2::Message + Sized,
    {
        msg_send!(&** self, setRayMask : rayMask)
    }
}
pub type MPSDeviceOptions = NSUInteger;
unsafe extern "C" {
    pub static MPSRectNoClip: MTLRegion;
}
unsafe extern "C" {
    pub fn MPSImageBatchIncrementReadCount(batch: NSArray, amount: NSInteger) -> NSUInteger;
}
unsafe extern "C" {
    pub fn MPSImageBatchSynchronize(batch: NSArray, cmdBuf: *mut u64);
}
unsafe extern "C" {
    pub fn MPSImageBatchResourceSize(batch: NSArray) -> NSUInteger;
}
unsafe extern "C" {
    pub fn MPSImageBatchIterate(
        batch: NSArray,
        iteratorBlock: *mut ::std::os::raw::c_void,
    ) -> NSInteger;
}
unsafe extern "C" {
    pub fn MPSStateBatchIncrementReadCount(batch: NSArray, amount: NSInteger) -> NSUInteger;
}
unsafe extern "C" {
    pub fn MPSStateBatchSynchronize(batch: NSArray, cmdBuf: *mut u64);
}
unsafe extern "C" {
    pub fn MPSStateBatchResourceSize(batch: NSArray) -> NSUInteger;
}
unsafe extern "C" {
    pub fn MPSGetImageType(image: MPSImage) -> MPSImageType;
}
unsafe extern "C" {
    pub fn MPSSupportsMTLDevice(device: *mut u64) -> BOOL;
}
unsafe extern "C" {
    pub fn MPSHintTemporaryMemoryHighWaterMark(cmdBuf: *mut u64, bytes: NSUInteger);
}
unsafe extern "C" {
    pub fn MPSSetHeapCacheDuration(cmdBuf: *mut u64, seconds: f64);
}
unsafe extern "C" {
    pub fn MPSGetPreferredDevice(options: MPSDeviceOptions) -> *mut u64;
}

unsafe impl objc2::encode::RefEncode for MPSOffset {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSOffset {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSOffset", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSOrigin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSOrigin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSOrigin", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSSize {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSSize {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSSize", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSDimensionSlice {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSDimensionSlice {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSDimensionSlice", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSRegion {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRegion {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSRegion", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSScaleTransform {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSScaleTransform {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSScaleTransform", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImageCoordinate {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageCoordinate {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSImageCoordinate", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImageRegion {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageRegion {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSImageRegion", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImageDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReadWriteParams {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReadWriteParams {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSImageReadWriteParams", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImage {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImage {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSTemporaryImage {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSTemporaryImage {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSPredicate {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSPredicate {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCommandBuffer {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCommandBuffer {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSVectorDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSVectorDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrix {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrix {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSVector {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSVector {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSTemporaryMatrix {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSTemporaryMatrix {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSTemporaryVector {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSTemporaryVector {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSStateResourceList {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSStateResourceList {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSStateTextureInfo {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSStateTextureInfo {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSStateTextureInfo", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixOffset {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixOffset {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSMatrixOffset", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntegerDivisionParams {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntegerDivisionParams {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntegerDivisionParams", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSCustomKernelSourceInfo {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCustomKernelSourceInfo {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSCustomKernelSourceInfo", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSCustomKernelInfo {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCustomKernelInfo {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSCustomKernelInfo", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSCustomKernelArgumentCount {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCustomKernelArgumentCount {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSCustomKernelArgumentCount", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSKeyedUnarchiver {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSKeyedUnarchiver {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArray {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArray {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSTemporaryNDArray {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSTemporaryNDArray {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSUnaryImageKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSUnaryImageKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSBinaryImageKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSBinaryImageKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageConversion {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageConversion {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageConvolution {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageConvolution {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageLaplacian {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageLaplacian {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageBox {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageBox {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageTent {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageTent {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageGaussianBlur {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageGaussianBlur {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageSobel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageSobel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageCanny {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageCanny {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImagePyramid {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImagePyramid {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageGaussianPyramid {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageGaussianPyramid {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageLaplacianPyramid {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageLaplacianPyramid {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageLaplacianPyramidSubtract {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageLaplacianPyramidSubtract {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageLaplacianPyramidAdd {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageLaplacianPyramidAdd {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixUnaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixUnaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixBinaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixBinaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixMultiplication {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixMultiplication {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixVectorMultiplication {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixVectorMultiplication {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixSolveTriangular {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixSolveTriangular {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixSolveLU {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixSolveLU {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixSolveCholesky {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixSolveCholesky {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixDecompositionLU {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixDecompositionLU {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixDecompositionCholesky {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixDecompositionCholesky {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixCopyOffsets {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixCopyOffsets {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSMatrixCopyOffsets", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSMatrixCopyDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixCopyDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixCopy {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixCopy {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixSoftMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixSoftMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixLogSoftMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixLogSoftMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixSoftMaxGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixSoftMaxGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixLogSoftMaxGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixLogSoftMaxGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixFindTopK {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixFindTopK {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixRandomDistributionDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixRandomDistributionDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixRandom {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixRandom {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixRandomMTGP32 {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixRandomMTGP32 {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixRandomPhilox {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixRandomPhilox {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageCopyToMatrix {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageCopyToMatrix {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixCopyToImage {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixCopyToImage {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageEuclideanDistanceTransform {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageEuclideanDistanceTransform {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageEDLines {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageEDLines {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageGuidedFilter {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageGuidedFilter {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageKeypointRangeInfo {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageKeypointRangeInfo {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSImageKeypointRangeInfo", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImageKeypointData {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageKeypointData {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSImageKeypointData", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImageFindKeypoints {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageFindKeypoints {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageHistogramInfo {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageHistogramInfo {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSImageHistogramInfo", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSImageHistogram {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageHistogram {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageNormalizedHistogram {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageNormalizedHistogram {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageHistogramEqualization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageHistogramEqualization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageHistogramSpecification {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageHistogramSpecification {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageIntegral {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageIntegral {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageIntegralOfSquares {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageIntegralOfSquares {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageArithmetic {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageArithmetic {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageAdd {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageAdd {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageSubtract {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageSubtract {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageMultiply {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageMultiply {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageDivide {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageDivide {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageMedian {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageMedian {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageAreaMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageAreaMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageAreaMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageAreaMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageDilate {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageDilate {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageErode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageErode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceUnary {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceUnary {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceRowMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceRowMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceColumnMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceColumnMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceRowMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceRowMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceColumnMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceColumnMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceRowMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceRowMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceColumnMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceColumnMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceRowSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceRowSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageReduceColumnSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageReduceColumnSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageScale {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageScale {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageLanczosScale {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageLanczosScale {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageBilinearScale {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageBilinearScale {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageStatisticsMinAndMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageStatisticsMinAndMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageStatisticsMeanAndVariance {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageStatisticsMeanAndVariance {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageStatisticsMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageStatisticsMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageThresholdBinary {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageThresholdBinary {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageThresholdBinaryInverse {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageThresholdBinaryInverse {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageThresholdTruncate {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageThresholdTruncate {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageThresholdToZero {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageThresholdToZero {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageThresholdToZeroInverse {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageThresholdToZeroInverse {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSImageTranspose {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSImageTranspose {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNDefaultPadding {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNDefaultPadding {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNBinaryGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNBinaryGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNMultiaryGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNMultiaryGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBinaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBinaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNGradientKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNGradientKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNMultiaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNMultiaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSpatialNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSpatialNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSpatialNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSpatialNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLocalContrastNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLocalContrastNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLocalContrastNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLocalContrastNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNCrossChannelNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNCrossChannelNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNCrossChannelNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNCrossChannelNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNNeuronDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNNeuronDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuron {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuron {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronLinear {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronLinear {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronReLU {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronReLU {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronPReLU {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronPReLU {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronSigmoid {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronSigmoid {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronHardSigmoid {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronHardSigmoid {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronTanH {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronTanH {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronAbsolute {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronAbsolute {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronSoftPlus {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronSoftPlus {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronSoftSign {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronSoftSign {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronELU {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronELU {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronReLUN {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronReLUN {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronPower {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronPower {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronExponential {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronExponential {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronLogarithm {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronLogarithm {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSubPixelConvolutionDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSubPixelConvolutionDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDepthWiseConvolutionDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDepthWiseConvolutionDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionTransposeGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionTransposeGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionWeightsAndBiasesState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionWeightsAndBiasesState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolution {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolution {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNFullyConnected {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNFullyConnected {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNFullyConnectedGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNFullyConnectedGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionTranspose {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionTranspose {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionTransposeGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionTransposeGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBinaryConvolution {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBinaryConvolution {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBinaryFullyConnected {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBinaryFullyConnected {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGramMatrixCalculation {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGramMatrixCalculation {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGramMatrixCalculationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGramMatrixCalculationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPooling {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPooling {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingAverage {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingAverage {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingL2Norm {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingL2Norm {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDilatedPoolingMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDilatedPoolingMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingAverageGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingAverageGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingMaxGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingMaxGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingL2NormGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingL2NormGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDilatedPoolingMaxGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDilatedPoolingMaxGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLossDataDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLossDataDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLossLabels {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLossLabels {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLossDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLossDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLoss {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLoss {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNYOLOLossDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNYOLOLossDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNYOLOLoss {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNYOLOLoss {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNForwardLoss {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNForwardLoss {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNLossGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNLossGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNInitialGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNInitialGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNArithmeticGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNArithmeticGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNArithmetic {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNArithmetic {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNAdd {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNAdd {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSubtract {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSubtract {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNMultiply {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNMultiply {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDivide {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDivide {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNCompare {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNCompare {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNArithmeticGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNArithmeticGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNAddGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNAddGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSubtractGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSubtractGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNMultiplyGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNMultiplyGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSoftMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSoftMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSoftMaxGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSoftMaxGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLogSoftMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLogSoftMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLogSoftMaxGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLogSoftMaxGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsampling {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsampling {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingNearest {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingNearest {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingBilinear {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingBilinear {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingNearestGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingNearestGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingBilinearGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingBilinearGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNormalizationGammaAndBetaState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNormalizationGammaAndBetaState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalizationState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalizationState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNormalizationMeanAndVarianceState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNormalizationMeanAndVarianceState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalizationStatistics {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalizationStatistics {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalizationStatisticsGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalizationStatisticsGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNInstanceNormalizationGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNInstanceNormalizationGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNInstanceNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNInstanceNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNInstanceNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNInstanceNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNGroupNormalizationGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNGroupNormalizationGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNGroupNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNGroupNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNGroupNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNGroupNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDropoutGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDropoutGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDropout {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDropout {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDropoutGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDropoutGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNSingleGateDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNSingleGateDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSGRUDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSGRUDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSLSTMDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSLSTMDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNRecurrentImageState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNRecurrentImageState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNImageInferenceLayer {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNImageInferenceLayer {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNRecurrentMatrixState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNRecurrentMatrixState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNMatrixInferenceLayer {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNMatrixInferenceLayer {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNMatrixTrainingState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNMatrixTrainingState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRNNMatrixTrainingLayer {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRNNMatrixTrainingLayer {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixNeuron {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixNeuron {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixNeuronGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixNeuronGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixFullyConnected {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixFullyConnected {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixFullyConnectedGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixFullyConnectedGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixBatchNormalization {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixBatchNormalization {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSMatrixBatchNormalizationGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSMatrixBatchNormalizationGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGridSample {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGridSample {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNOptimizerDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNOptimizerDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNOptimizer {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNOptimizer {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNOptimizerStochasticGradientDescent {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNOptimizerStochasticGradientDescent {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNOptimizerRMSProp {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNOptimizerRMSProp {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNOptimizerAdam {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNOptimizerAdam {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceUnary {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceUnary {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceRowMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceRowMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceColumnMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceColumnMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsArgumentMin {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsArgumentMin {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceRowMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceRowMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceColumnMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceColumnMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsArgumentMax {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsArgumentMax {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceRowMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceRowMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceColumnMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceColumnMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceRowSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceRowSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceColumnSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceColumnSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceBinary {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceBinary {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsAndWeightsMean {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsAndWeightsMean {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReduceFeatureChannelsAndWeightsSum {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReduceFeatureChannelsAndWeightsSum {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNLocalCorrelation {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNLocalCorrelation {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReshape {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReshape {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReshapeGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReshapeGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNPad {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNPad {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNPadGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNPadGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNResizeBilinear {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNResizeBilinear {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNCropAndResizeBilinear {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNCropAndResizeBilinear {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNSlice {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNSlice {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNImageNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNImageNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGradientStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGradientStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionGradientStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionGradientStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionTransposeGradientStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionTransposeGradientStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNBinaryGradientStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNBinaryGradientStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNMultiaryGradientStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNMultiaryGradientStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNArithmeticGradientStateNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNArithmeticGradientStateNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNFilterNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNFilterNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGradientFilterNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGradientFilterNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNFullyConnectedNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNFullyConnectedNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBinaryConvolutionNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBinaryConvolutionNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBinaryFullyConnectedNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBinaryFullyConnectedNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionTransposeNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionTransposeNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNFullyConnectedGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNFullyConnectedGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNConvolutionTransposeGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNConvolutionTransposeGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronAbsoluteNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronAbsoluteNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronELUNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronELUNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronReLUNNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronReLUNNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronLinearNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronLinearNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronReLUNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronReLUNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronSigmoidNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronSigmoidNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronHardSigmoidNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronHardSigmoidNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronSoftPlusNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronSoftPlusNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronSoftSignNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronSoftSignNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronTanHNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronTanHNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronPReLUNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronPReLUNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronPowerNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronPowerNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronExponentialNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronExponentialNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronLogarithmNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronLogarithmNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronGeLUNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronGeLUNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNeuronGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNeuronGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNUnaryReductionNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNUnaryReductionNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionRowMinNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionRowMinNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionColumnMinNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionColumnMinNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionFeatureChannelsMinNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionFeatureChannelsMinNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionFeatureChannelsArgumentMinNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionFeatureChannelsArgumentMinNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionRowMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionRowMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionColumnMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionColumnMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionFeatureChannelsMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionFeatureChannelsMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionFeatureChannelsArgumentMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionFeatureChannelsArgumentMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionRowMeanNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionRowMeanNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionColumnMeanNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionColumnMeanNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionFeatureChannelsMeanNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionFeatureChannelsMeanNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionSpatialMeanNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionSpatialMeanNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionRowSumNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionRowSumNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionColumnSumNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionColumnSumNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionFeatureChannelsSumNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionFeatureChannelsSumNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingAverageNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingAverageNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingL2NormNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingL2NormNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDilatedPoolingMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDilatedPoolingMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingMaxGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingMaxGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingAverageGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingAverageGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNPoolingL2NormGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNPoolingL2NormGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDilatedPoolingMaxGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDilatedPoolingMaxGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSpatialNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSpatialNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSpatialNormalizationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSpatialNormalizationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLocalContrastNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLocalContrastNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLocalContrastNormalizationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLocalContrastNormalizationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNCrossChannelNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNCrossChannelNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNCrossChannelNormalizationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNCrossChannelNormalizationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNInstanceNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNInstanceNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNInstanceNormalizationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNInstanceNormalizationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNGroupNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNGroupNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNGroupNormalizationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNGroupNormalizationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalizationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalizationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNBatchNormalizationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNBatchNormalizationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNScaleNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNScaleNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNBilinearScaleNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNBilinearScaleNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNLanczosScaleNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNLanczosScaleNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNBinaryArithmeticNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNBinaryArithmeticNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNAdditionNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNAdditionNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNSubtractionNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNSubtractionNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNMultiplicationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNMultiplicationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNDivisionNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNDivisionNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNComparisonNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNComparisonNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNArithmeticGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNArithmeticGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNAdditionGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNAdditionGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNSubtractionGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNSubtractionGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNMultiplicationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNMultiplicationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDropoutNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDropoutNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNDropoutGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNDropoutGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNLabelsNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNLabelsNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLossNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLossNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNYOLOLossNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNYOLOLossNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNConcatenationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNConcatenationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNConcatenationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNConcatenationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReshapeNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReshapeNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReshapeGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReshapeGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNReductionSpatialMeanGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNReductionSpatialMeanGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNPadNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNPadNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNPadGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNPadGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSoftMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSoftMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNSoftMaxGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNSoftMaxGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLogSoftMaxNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLogSoftMaxNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNLogSoftMaxGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNLogSoftMaxGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingNearestNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingNearestNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingBilinearNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingBilinearNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingNearestGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingNearestGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSCNNUpsamplingBilinearGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSCNNUpsamplingBilinearGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGramMatrixCalculationNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGramMatrixCalculationNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGramMatrixCalculationGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGramMatrixCalculationGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNForwardLossNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNForwardLossNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNLossGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNLossGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNInitialGradientNode {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNInitialGradientNode {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNNGraph {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNNGraph {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayOffsets {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayOffsets {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSNDArrayOffsets", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSNDArraySizes {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArraySizes {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSNDArraySizes", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayMultiaryBase {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayMultiaryBase {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayMultiaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayMultiaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayMultiaryGradientKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayMultiaryGradientKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayUnaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayUnaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayUnaryGradientKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayUnaryGradientKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayBinaryKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayBinaryKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayBinaryPrimaryGradientKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayBinaryPrimaryGradientKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayBinarySecondaryGradientKernel {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayBinarySecondaryGradientKernel {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayMatrixMultiplication {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayMatrixMultiplication {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayStridedSlice {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayStridedSlice {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayStridedSliceGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayStridedSliceGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayGatherGradientState {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayGatherGradientState {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayGather {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayGather {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayGatherGradient {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayGatherGradient {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayIdentity {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayIdentity {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayQuantizationDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayQuantizationDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayAffineQuantizationDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayAffineQuantizationDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayLUTQuantizationDescriptor {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayLUTQuantizationDescriptor {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayQuantizedMatrixMultiplication {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayQuantizedMatrixMultiplication {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayLUTDequantize {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayLUTDequantize {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayVectorLUTDequantize {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayVectorLUTDequantize {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSNDArrayAffineInt4Dequantize {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSNDArrayAffineInt4Dequantize {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSAccelerationStructureGroup {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSAccelerationStructureGroup {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for _MPSPackedFloat3 {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for _MPSPackedFloat3 {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("_MPSPackedFloat3", &[]);
}
unsafe impl objc2::encode::RefEncode for _MPSPackedFloat3__bindgen_ty_1 {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for _MPSPackedFloat3__bindgen_ty_1 {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("_MPSPackedFloat3__bindgen_ty_1", &[]);
}
unsafe impl objc2::encode::RefEncode for _MPSPackedFloat3__bindgen_ty_1__bindgen_ty_1 {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for _MPSPackedFloat3__bindgen_ty_1__bindgen_ty_1 {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("_MPSPackedFloat3__bindgen_ty_1__bindgen_ty_1", &[]);
}
unsafe impl objc2::encode::RefEncode for _MPSAxisAlignedBoundingBox {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for _MPSAxisAlignedBoundingBox {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("_MPSAxisAlignedBoundingBox", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSRayOriginDirection {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRayOriginDirection {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSRayOriginDirection", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSRayPackedOriginDirection {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRayPackedOriginDirection {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSRayPackedOriginDirection", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSRayOriginMinDistanceDirectionMaxDistance {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRayOriginMinDistanceDirectionMaxDistance {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSRayOriginMinDistanceDirectionMaxDistance", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSRayOriginMaskDirectionMaxDistance {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRayOriginMaskDirectionMaxDistance {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSRayOriginMaskDirectionMaxDistance", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistance {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistance {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistance", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndex {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndex {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndex", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexBufferIndex {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexBufferIndex {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexBufferIndex", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexCoordinates {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexCoordinates {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexCoordinates", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexBufferIndexCoordinates {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexBufferIndexCoordinates {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexBufferIndexCoordinates", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexInstanceIndex {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexInstanceIndex {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexInstanceIndex", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndex {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndex {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndex", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexInstanceIndexCoordinates {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexInstanceIndexCoordinates {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexInstanceIndexCoordinates", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndexCoordinates {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndexCoordinates {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Struct("MPSIntersectionDistancePrimitiveIndexBufferIndexInstanceIndexCoordinates", &[]);
}
unsafe impl objc2::encode::RefEncode for MPSAccelerationStructure {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSAccelerationStructure {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSPolygonBuffer {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSPolygonBuffer {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSPolygonAccelerationStructure {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSPolygonAccelerationStructure {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSTriangleAccelerationStructure {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSTriangleAccelerationStructure {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSQuadrilateralAccelerationStructure {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSQuadrilateralAccelerationStructure {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSInstanceAccelerationStructure {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSInstanceAccelerationStructure {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSSVGF {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSSVGF {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSSVGFDefaultTextureAllocator {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSSVGFDefaultTextureAllocator {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSSVGFDenoiser {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSSVGFDenoiser {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSTemporalAA {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSTemporalAA {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
unsafe impl objc2::encode::RefEncode for MPSRayIntersector {
    const ENCODING_REF: objc2::encode::Encoding = objc2::encode::Encoding::Pointer(&<Self as objc2::encode::Encode>::ENCODING);
}
unsafe impl objc2::encode::Encode for MPSRayIntersector {
    const ENCODING: objc2::encode::Encoding = objc2::encode::Encoding::Object;
}
