use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use objc2_metal::*;
use crate::*;
extern_class!(
#[unsafe(super(
MPSNDArrayUnaryKernel,
MPSNDArrayMultiaryKernel,
MPSNDArrayMultiaryBase,
MPSKernel,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
pub struct MPSNDArrayIdentity;
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCoding for MPSNDArrayIdentity {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCopying for MPSNDArrayIdentity {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
unsafe impl CopyingHelper for MPSNDArrayIdentity {
type Result = Self;
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNDArrayIdentity {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSSecureCoding for MPSNDArrayIdentity {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayIdentity {
extern_methods!(
#[unsafe(method(initWithDevice:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
) -> Retained<Self>;
#[cfg(feature = "MPSCoreTypes")]
#[unsafe(method(reshapeWithCommandBuffer:sourceArray:shape:destinationArray:))]
#[unsafe(method_family = none)]
pub unsafe fn reshapeWithCommandBuffer_sourceArray_shape_destinationArray(
&self,
cmd_buf: Option<&ProtocolObject<dyn MTLCommandBuffer>>,
source_array: &MPSNDArray,
shape: &MPSShape,
destination_array: Option<&MPSNDArray>,
) -> Option<Retained<MPSNDArray>>;
#[unsafe(method(reshapeWithCommandBuffer:sourceArray:dimensionCount:dimensionSizes:destinationArray:))]
#[unsafe(method_family = none)]
pub unsafe fn reshapeWithCommandBuffer_sourceArray_dimensionCount_dimensionSizes_destinationArray(
&self,
cmd_buf: Option<&ProtocolObject<dyn MTLCommandBuffer>>,
source_array: &MPSNDArray,
number_of_dimensions: NSUInteger,
dimension_sizes: NonNull<NSUInteger>,
destination_array: Option<&MPSNDArray>,
) -> Option<Retained<MPSNDArray>>;
#[cfg(feature = "MPSCoreTypes")]
#[unsafe(method(reshapeWithCommandEncoder:commandBuffer:sourceArray:shape:destinationArray:))]
#[unsafe(method_family = none)]
pub unsafe fn reshapeWithCommandEncoder_commandBuffer_sourceArray_shape_destinationArray(
&self,
encoder: Option<&ProtocolObject<dyn MTLComputeCommandEncoder>>,
cmd_buf: Option<&ProtocolObject<dyn MTLCommandBuffer>>,
source_array: &MPSNDArray,
shape: &MPSShape,
destination_array: Option<&MPSNDArray>,
) -> Option<Retained<MPSNDArray>>;
#[unsafe(method(reshapeWithCommandEncoder:commandBuffer:sourceArray:dimensionCount:dimensionSizes:destinationArray:))]
#[unsafe(method_family = none)]
pub unsafe fn reshapeWithCommandEncoder_commandBuffer_sourceArray_dimensionCount_dimensionSizes_destinationArray(
&self,
encoder: Option<&ProtocolObject<dyn MTLComputeCommandEncoder>>,
cmd_buf: Option<&ProtocolObject<dyn MTLCommandBuffer>>,
source_array: &MPSNDArray,
number_of_dimensions: NSUInteger,
dimension_sizes: NonNull<NSUInteger>,
destination_array: Option<&MPSNDArray>,
) -> Option<Retained<MPSNDArray>>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayIdentity {
extern_methods!(
#[unsafe(method(initWithDevice:sourceCount:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_sourceCount(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
count: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:device:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder_device(
this: Allocated<Self>,
coder: &NSCoder,
device: &ProtocolObject<dyn MTLDevice>,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayIdentity {
extern_methods!(
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
a_decoder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayIdentity {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}