use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use objc2_metal::*;
use crate::*;
extern_class!(
#[unsafe(super(
MPSNDArrayMatrixMultiplication,
MPSNDArrayMultiaryKernel,
MPSNDArrayMultiaryBase,
MPSKernel,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
pub struct MPSNDArrayQuantizedMatrixMultiplication;
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
extern_conformance!(
unsafe impl NSCoding for MPSNDArrayQuantizedMatrixMultiplication {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
extern_conformance!(
unsafe impl NSCopying for MPSNDArrayQuantizedMatrixMultiplication {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
unsafe impl CopyingHelper for MPSNDArrayQuantizedMatrixMultiplication {
type Result = Self;
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNDArrayQuantizedMatrixMultiplication {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
extern_conformance!(
unsafe impl NSSecureCoding for MPSNDArrayQuantizedMatrixMultiplication {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
impl MPSNDArrayQuantizedMatrixMultiplication {
extern_methods!(
#[unsafe(method(initWithDevice:sourceCount:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_sourceCount(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
source_count: NSUInteger,
) -> Retained<Self>;
#[cfg(feature = "MPSNDArrayQuantization")]
#[unsafe(method(initWithDevice:leftQuantizationDescriptor:rightQuantizationDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_leftQuantizationDescriptor_rightQuantizationDescriptor(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
left_quantization_descriptor: Option<&MPSNDArrayQuantizationDescriptor>,
right_quantization_descriptor: Option<&MPSNDArrayQuantizationDescriptor>,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
impl MPSNDArrayQuantizedMatrixMultiplication {
extern_methods!(
#[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",
feature = "MPSNDArrayMatrixMultiplication"
))]
impl MPSNDArrayQuantizedMatrixMultiplication {
extern_methods!(
#[unsafe(method(initWithDevice:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel",
feature = "MPSNDArrayMatrixMultiplication"
))]
impl MPSNDArrayQuantizedMatrixMultiplication {
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",
feature = "MPSNDArrayMatrixMultiplication"
))]
impl MPSNDArrayQuantizedMatrixMultiplication {
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>;
);
}
extern_class!(
#[unsafe(super(MPSNDArrayMultiaryKernel, MPSNDArrayMultiaryBase, MPSKernel, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
pub struct MPSNDArrayLUTDequantize;
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCoding for MPSNDArrayLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCopying for MPSNDArrayLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
unsafe impl CopyingHelper for MPSNDArrayLUTDequantize {
type Result = Self;
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNDArrayLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSSecureCoding for MPSNDArrayLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayLUTDequantize {
extern_methods!(
#[unsafe(method(initWithDevice:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
) -> Retained<Self>;
#[unsafe(method(initWithDevice:sourceCount:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_sourceCount(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
source_count: NSUInteger,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayLUTDequantize {
extern_methods!(
#[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 MPSNDArrayLUTDequantize {
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 MPSNDArrayLUTDequantize {
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>;
);
}
extern_class!(
#[unsafe(super(MPSNDArrayMultiaryKernel, MPSNDArrayMultiaryBase, MPSKernel, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
pub struct MPSNDArrayVectorLUTDequantize;
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCoding for MPSNDArrayVectorLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCopying for MPSNDArrayVectorLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
unsafe impl CopyingHelper for MPSNDArrayVectorLUTDequantize {
type Result = Self;
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNDArrayVectorLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSSecureCoding for MPSNDArrayVectorLUTDequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayVectorLUTDequantize {
extern_methods!(
#[unsafe(method(vectorAxis))]
#[unsafe(method_family = none)]
pub unsafe fn vectorAxis(&self) -> NSUInteger;
#[unsafe(method(setVectorAxis:))]
#[unsafe(method_family = none)]
pub unsafe fn setVectorAxis(&self, vector_axis: NSUInteger);
#[unsafe(method(initWithDevice:axis:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_axis(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
axis: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithDevice:sourceCount:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_sourceCount(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
source_count: NSUInteger,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayVectorLUTDequantize {
extern_methods!(
#[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 MPSNDArrayVectorLUTDequantize {
extern_methods!(
#[unsafe(method(initWithDevice:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayVectorLUTDequantize {
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 MPSNDArrayVectorLUTDequantize {
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>;
);
}
extern_class!(
#[unsafe(super(MPSNDArrayMultiaryKernel, MPSNDArrayMultiaryBase, MPSKernel, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
pub struct MPSNDArrayAffineInt4Dequantize;
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCoding for MPSNDArrayAffineInt4Dequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSCopying for MPSNDArrayAffineInt4Dequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
unsafe impl CopyingHelper for MPSNDArrayAffineInt4Dequantize {
type Result = Self;
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNDArrayAffineInt4Dequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
extern_conformance!(
unsafe impl NSSecureCoding for MPSNDArrayAffineInt4Dequantize {}
);
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayAffineInt4Dequantize {
extern_methods!(
#[unsafe(method(initWithDevice:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
) -> Retained<Self>;
#[cfg(feature = "MPSNDArrayQuantization")]
#[unsafe(method(initWithDevice:quantizationDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_quantizationDescriptor(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
quantization_descriptor: &MPSNDArrayAffineQuantizationDescriptor,
) -> Retained<Self>;
#[unsafe(method(initWithDevice:sourceCount:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDevice_sourceCount(
this: Allocated<Self>,
device: &ProtocolObject<dyn MTLDevice>,
source_count: NSUInteger,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "MPSCore",
feature = "MPSKernel",
feature = "MPSNDArrayKernel"
))]
impl MPSNDArrayAffineInt4Dequantize {
extern_methods!(
#[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 MPSNDArrayAffineInt4Dequantize {
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 MPSNDArrayAffineInt4Dequantize {
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>;
);
}