use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use objc2_metal::*;
use crate::*;
extern_protocol!(
pub unsafe trait MPSHandle: NSSecureCoding + NSObjectProtocol {
#[unsafe(method(label))]
#[unsafe(method_family = none)]
unsafe fn label(&self) -> Option<Retained<NSString>>;
}
);
extern_protocol!(
pub unsafe trait MPSNNTrainableNode: NSObjectProtocol {
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(trainingStyle))]
#[unsafe(method_family = none)]
unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setTrainingStyle:))]
#[unsafe(method_family = none)]
unsafe fn setTrainingStyle(&self, training_style: MPSNNTrainingStyle);
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNImageNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNImageNode {}
);
impl MPSNNImageNode {
extern_methods!(
#[unsafe(method(initWithHandle:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithHandle(
this: Allocated<Self>,
handle: Option<&NSObject>,
) -> Retained<Self>;
#[unsafe(method(nodeWithHandle:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithHandle(handle: Option<&NSObject>) -> Retained<Self>;
#[unsafe(method(exportedNodeWithHandle:))]
#[unsafe(method_family = none)]
pub unsafe fn exportedNodeWithHandle(handle: Option<&NSObject>) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(handle))]
#[unsafe(method_family = none)]
pub unsafe fn handle(&self) -> Option<Retained<ProtocolObject<dyn MPSHandle>>>;
#[unsafe(method(setHandle:))]
#[unsafe(method_family = none)]
pub unsafe fn setHandle(&self, handle: Option<&ProtocolObject<dyn MPSHandle>>);
#[cfg(all(feature = "MPSCore", feature = "MPSCoreTypes"))]
#[unsafe(method(format))]
#[unsafe(method_family = none)]
pub unsafe fn format(&self) -> MPSImageFeatureChannelFormat;
#[cfg(all(feature = "MPSCore", feature = "MPSCoreTypes"))]
#[unsafe(method(setFormat:))]
#[unsafe(method_family = none)]
pub unsafe fn setFormat(&self, format: MPSImageFeatureChannelFormat);
#[cfg(all(feature = "MPSCore", feature = "MPSImage"))]
#[unsafe(method(imageAllocator))]
#[unsafe(method_family = none)]
pub unsafe fn imageAllocator(&self) -> Retained<ProtocolObject<dyn MPSImageAllocator>>;
#[cfg(all(feature = "MPSCore", feature = "MPSImage"))]
#[unsafe(method(setImageAllocator:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageAllocator(
&self,
image_allocator: &ProtocolObject<dyn MPSImageAllocator>,
);
#[unsafe(method(exportFromGraph))]
#[unsafe(method_family = none)]
pub unsafe fn exportFromGraph(&self) -> bool;
#[unsafe(method(setExportFromGraph:))]
#[unsafe(method_family = none)]
pub unsafe fn setExportFromGraph(&self, export_from_graph: bool);
#[unsafe(method(synchronizeResource))]
#[unsafe(method_family = none)]
pub unsafe fn synchronizeResource(&self) -> bool;
#[unsafe(method(setSynchronizeResource:))]
#[unsafe(method_family = none)]
pub unsafe fn setSynchronizeResource(&self, synchronize_resource: bool);
#[unsafe(method(stopGradient))]
#[unsafe(method_family = none)]
pub unsafe fn stopGradient(&self) -> bool;
#[unsafe(method(setStopGradient:))]
#[unsafe(method_family = none)]
pub unsafe fn setStopGradient(&self, stop_gradient: bool);
);
}
impl MPSNNImageNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNStateNode {}
);
impl MPSNNStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(handle))]
#[unsafe(method_family = none)]
pub unsafe fn handle(&self) -> Option<Retained<ProtocolObject<dyn MPSHandle>>>;
#[unsafe(method(setHandle:))]
#[unsafe(method_family = none)]
pub unsafe fn setHandle(&self, handle: Option<&ProtocolObject<dyn MPSHandle>>);
#[unsafe(method(exportFromGraph))]
#[unsafe(method_family = none)]
pub unsafe fn exportFromGraph(&self) -> bool;
#[unsafe(method(setExportFromGraph:))]
#[unsafe(method_family = none)]
pub unsafe fn setExportFromGraph(&self, export_from_graph: bool);
#[unsafe(method(synchronizeResource))]
#[unsafe(method_family = none)]
pub unsafe fn synchronizeResource(&self) -> bool;
#[unsafe(method(setSynchronizeResource:))]
#[unsafe(method_family = none)]
pub unsafe fn setSynchronizeResource(&self, synchronize_resource: bool);
);
}
impl MPSNNStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNStateNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNGradientStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNGradientStateNode {}
);
impl MPSNNGradientStateNode {
extern_methods!();
}
impl MPSNNGradientStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNGradientStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientStateNode, MPSNNStateNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNConvolutionGradientStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNConvolutionGradientStateNode {}
);
impl MPSCNNConvolutionGradientStateNode {
extern_methods!();
}
impl MPSCNNConvolutionGradientStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNConvolutionGradientStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNConvolutionGradientStateNode,
MPSNNGradientStateNode,
MPSNNStateNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNConvolutionTransposeGradientStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNConvolutionTransposeGradientStateNode {}
);
impl MPSCNNConvolutionTransposeGradientStateNode {
extern_methods!();
}
impl MPSCNNConvolutionTransposeGradientStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNConvolutionTransposeGradientStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNStateNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNBinaryGradientStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNBinaryGradientStateNode {}
);
impl MPSNNBinaryGradientStateNode {
extern_methods!();
}
impl MPSNNBinaryGradientStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNBinaryGradientStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNStateNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNMultiaryGradientStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNMultiaryGradientStateNode {}
);
impl MPSNNMultiaryGradientStateNode {
extern_methods!();
}
impl MPSNNMultiaryGradientStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNMultiaryGradientStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNBinaryGradientStateNode, MPSNNStateNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNArithmeticGradientStateNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNArithmeticGradientStateNode {}
);
impl MPSNNArithmeticGradientStateNode {
extern_methods!();
}
impl MPSNNArithmeticGradientStateNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNArithmeticGradientStateNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
#[cfg(feature = "block2")]
pub type MPSGradientNodeBlock = *mut block2::DynBlock<
dyn Fn(
NonNull<MPSNNFilterNode>,
NonNull<MPSNNFilterNode>,
NonNull<MPSNNImageNode>,
NonNull<MPSNNImageNode>,
),
>;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNFilterNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNFilterNode {}
);
impl MPSNNFilterNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(resultImage))]
#[unsafe(method_family = none)]
pub unsafe fn resultImage(&self) -> Retained<MPSNNImageNode>;
#[unsafe(method(resultState))]
#[unsafe(method_family = none)]
pub unsafe fn resultState(&self) -> Option<Retained<MPSNNStateNode>>;
#[unsafe(method(resultStates))]
#[unsafe(method_family = none)]
pub unsafe fn resultStates(&self) -> Option<Retained<NSArray<MPSNNStateNode>>>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(paddingPolicy))]
#[unsafe(method_family = none)]
pub unsafe fn paddingPolicy(&self) -> Retained<ProtocolObject<dyn MPSNNPadding>>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setPaddingPolicy:))]
#[unsafe(method_family = none)]
pub unsafe fn setPaddingPolicy(&self, padding_policy: &ProtocolObject<dyn MPSNNPadding>);
#[unsafe(method(label))]
#[unsafe(method_family = none)]
pub unsafe fn label(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setLabel:))]
#[unsafe(method_family = none)]
pub unsafe fn setLabel(&self, label: Option<&NSString>);
#[unsafe(method(gradientFilterWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSource(
&self,
gradient_image: &MPSNNImageNode,
) -> Retained<MPSNNGradientFilterNode>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
#[unsafe(method(gradientFiltersWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<NSArray<MPSNNGradientFilterNode>>;
#[unsafe(method(gradientFiltersWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSource(
&self,
gradient_image: &MPSNNImageNode,
) -> Retained<NSArray<MPSNNGradientFilterNode>>;
#[cfg(feature = "block2")]
#[unsafe(method(trainingGraphWithSourceGradient:nodeHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn trainingGraphWithSourceGradient_nodeHandler(
&self,
gradient_image: Option<&MPSNNImageNode>,
node_handler: MPSGradientNodeBlock,
) -> Option<Retained<NSArray<MPSNNFilterNode>>>;
);
}
impl MPSNNFilterNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNGradientFilterNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNGradientFilterNode {}
);
impl MPSNNGradientFilterNode {
extern_methods!(
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
source_gradient: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
#[unsafe(method(gradientFiltersWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSources(
&self,
source_gradient: &NSArray<MPSNNImageNode>,
) -> Retained<NSArray<MPSNNGradientFilterNode>>;
#[unsafe(method(gradientFilterWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSource(
&self,
source_gradient: &MPSNNImageNode,
) -> Retained<MPSNNGradientFilterNode>;
#[unsafe(method(gradientFiltersWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSource(
&self,
source_gradient: &MPSNNImageNode,
) -> Retained<NSArray<MPSNNGradientFilterNode>>;
);
}
impl MPSNNGradientFilterNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNGradientFilterNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNConvolutionNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNConvolutionNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNConvolutionNode {}
);
impl MPSCNNConvolutionNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(trainingStyle))]
#[unsafe(method_family = none)]
pub unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setTrainingStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrainingStyle(&self, training_style: MPSNNTrainingStyle);
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(accumulatorPrecision))]
#[unsafe(method_family = none)]
pub unsafe fn accumulatorPrecision(&self) -> MPSNNConvolutionAccumulatorPrecisionOption;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setAccumulatorPrecision:))]
#[unsafe(method_family = none)]
pub unsafe fn setAccumulatorPrecision(
&self,
accumulator_precision: MPSNNConvolutionAccumulatorPrecisionOption,
);
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSource:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSource:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[unsafe(method(convolutionGradientState))]
#[unsafe(method_family = none)]
pub unsafe fn convolutionGradientState(
&self,
) -> Option<Retained<MPSCNNConvolutionGradientStateNode>>;
);
}
impl MPSCNNConvolutionNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNConvolutionNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNConvolutionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNFullyConnectedNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNFullyConnectedNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNFullyConnectedNode {}
);
impl MPSCNNFullyConnectedNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSource:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSource:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNFullyConnectedNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNFullyConnectedNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNConvolutionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNBinaryConvolutionNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNBinaryConvolutionNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNBinaryConvolutionNode {}
);
impl MPSCNNBinaryConvolutionNode {
extern_methods!(
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(nodeWithSource:weights:scaleValue:type:flags:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights_scaleValue_type_flags(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
scale_value: c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(initWithSource:weights:scaleValue:type:flags:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights_scaleValue_type_flags(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
scale_value: c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(nodeWithSource:weights:outputBiasTerms:outputScaleTerms:inputBiasTerms:inputScaleTerms:type:flags:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
output_bias_terms: *const c_float,
output_scale_terms: *const c_float,
input_bias_terms: *const c_float,
input_scale_terms: *const c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(initWithSource:weights:outputBiasTerms:outputScaleTerms:inputBiasTerms:inputScaleTerms:type:flags:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
output_bias_terms: *const c_float,
output_scale_terms: *const c_float,
input_bias_terms: *const c_float,
input_scale_terms: *const c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[unsafe(method(convolutionGradientState))]
#[unsafe(method_family = none)]
pub unsafe fn convolutionGradientState(
&self,
) -> Option<Retained<MPSCNNConvolutionGradientStateNode>>;
);
}
impl MPSCNNBinaryConvolutionNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSource:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSource:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNBinaryConvolutionNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNBinaryConvolutionNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNBinaryConvolutionNode,
MPSCNNConvolutionNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNBinaryFullyConnectedNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNBinaryFullyConnectedNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNBinaryFullyConnectedNode {}
);
impl MPSCNNBinaryFullyConnectedNode {
extern_methods!(
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(nodeWithSource:weights:scaleValue:type:flags:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights_scaleValue_type_flags(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
scale_value: c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(initWithSource:weights:scaleValue:type:flags:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights_scaleValue_type_flags(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
scale_value: c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(nodeWithSource:weights:outputBiasTerms:outputScaleTerms:inputBiasTerms:inputScaleTerms:type:flags:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
output_bias_terms: *const c_float,
output_scale_terms: *const c_float,
input_bias_terms: *const c_float,
input_scale_terms: *const c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCNNConvolution", feature = "MPSNeuralNetworkTypes"))]
#[unsafe(method(initWithSource:weights:outputBiasTerms:outputScaleTerms:inputBiasTerms:inputScaleTerms:type:flags:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights_outputBiasTerms_outputScaleTerms_inputBiasTerms_inputScaleTerms_type_flags(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
output_bias_terms: *const c_float,
output_scale_terms: *const c_float,
input_bias_terms: *const c_float,
input_scale_terms: *const c_float,
r#type: MPSCNNBinaryConvolutionType,
flags: MPSCNNBinaryConvolutionFlags,
) -> Retained<Self>;
);
}
impl MPSCNNBinaryFullyConnectedNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSource:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSource:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNBinaryFullyConnectedNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNBinaryFullyConnectedNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNConvolutionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNConvolutionTransposeNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNConvolutionTransposeNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNConvolutionTransposeNode {}
);
impl MPSCNNConvolutionTransposeNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSource:convolutionGradientState:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_convolutionGradientState_weights(
source_node: &MPSNNImageNode,
convolution_gradient_state: Option<&MPSCNNConvolutionGradientStateNode>,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSource:convolutionGradientState:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_convolutionGradientState_weights(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
convolution_gradient_state: Option<&MPSCNNConvolutionGradientStateNode>,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[unsafe(method(convolutionGradientState))]
#[unsafe(method_family = none)]
pub unsafe fn convolutionGradientState(
&self,
) -> Option<Retained<MPSCNNConvolutionGradientStateNode>>;
);
}
impl MPSCNNConvolutionTransposeNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSource:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_weights(
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSource:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_weights(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
weights: &ProtocolObject<dyn MPSCNNConvolutionDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNConvolutionTransposeNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNConvolutionTransposeNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNConvolutionGradientNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNConvolutionGradientNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNConvolutionGradientNode {}
);
impl MPSCNNConvolutionGradientNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:convolutionGradientState:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_convolutionGradientState_weights(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSourceGradient:sourceImage:convolutionGradientState:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_convolutionGradientState_weights(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
);
}
impl MPSCNNConvolutionGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNConvolutionGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNConvolutionGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNFullyConnectedGradientNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNFullyConnectedGradientNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNFullyConnectedGradientNode {}
);
impl MPSCNNFullyConnectedGradientNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:convolutionGradientState:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_convolutionGradientState_weights(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSourceGradient:sourceImage:convolutionGradientState:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_convolutionGradientState_weights(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
);
}
impl MPSCNNFullyConnectedGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNFullyConnectedGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNConvolutionGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNConvolutionTransposeGradientNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNConvolutionTransposeGradientNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNConvolutionTransposeGradientNode {}
);
impl MPSCNNConvolutionTransposeGradientNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:convolutionTransposeGradientState:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_convolutionTransposeGradientState_weights(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionTransposeGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSourceGradient:sourceImage:convolutionTransposeGradientState:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_convolutionTransposeGradientState_weights(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionTransposeGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
);
}
impl MPSCNNConvolutionTransposeGradientNode {
extern_methods!(
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:convolutionGradientState:weights:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_convolutionGradientState_weights(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNConvolution")]
#[unsafe(method(initWithSourceGradient:sourceImage:convolutionGradientState:weights:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_convolutionGradientState_weights(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSCNNConvolutionGradientStateNode,
weights: Option<&ProtocolObject<dyn MPSCNNConvolutionDataSource>>,
) -> Retained<Self>;
);
}
impl MPSCNNConvolutionTransposeGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNConvolutionTransposeGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronNode {}
);
impl MPSCNNNeuronNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(a))]
#[unsafe(method_family = none)]
pub unsafe fn a(&self) -> c_float;
#[unsafe(method(b))]
#[unsafe(method_family = none)]
pub unsafe fn b(&self) -> c_float;
#[unsafe(method(c))]
#[unsafe(method_family = none)]
pub unsafe fn c(&self) -> c_float;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronAbsoluteNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronAbsoluteNode {}
);
impl MPSCNNNeuronAbsoluteNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronAbsoluteNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronAbsoluteNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronELUNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronELUNode {}
);
impl MPSCNNNeuronELUNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a(source_node: &MPSNNImageNode, a: c_float) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronELUNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronELUNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronReLUNNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronReLUNNode {}
);
impl MPSCNNNeuronReLUNNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronReLUNNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronReLUNNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronLinearNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronLinearNode {}
);
impl MPSCNNNeuronLinearNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronLinearNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronLinearNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronReLUNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronReLUNode {}
);
impl MPSCNNNeuronReLUNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a(source_node: &MPSNNImageNode, a: c_float) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronReLUNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronReLUNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronSigmoidNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronSigmoidNode {}
);
impl MPSCNNNeuronSigmoidNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronSigmoidNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronSigmoidNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronHardSigmoidNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronHardSigmoidNode {}
);
impl MPSCNNNeuronHardSigmoidNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronHardSigmoidNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronHardSigmoidNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronSoftPlusNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronSoftPlusNode {}
);
impl MPSCNNNeuronSoftPlusNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronSoftPlusNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronSoftPlusNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronSoftSignNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronSoftSignNode {}
);
impl MPSCNNNeuronSoftSignNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronSoftSignNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronSoftSignNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronTanHNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronTanHNode {}
);
impl MPSCNNNeuronTanHNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronTanHNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronTanHNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronPReLUNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronPReLUNode {}
);
impl MPSCNNNeuronPReLUNode {
extern_methods!(
#[unsafe(method(nodeWithSource:aData:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_aData(
source_node: &MPSNNImageNode,
a_data: &NSData,
) -> Retained<Self>;
#[unsafe(method(initWithSource:aData:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_aData(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a_data: &NSData,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronPReLUNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronPReLUNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronPowerNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronPowerNode {}
);
impl MPSCNNNeuronPowerNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:c:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b_c(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
c: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:c:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b_c(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
c: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronPowerNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronPowerNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronExponentialNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronExponentialNode {}
);
impl MPSCNNNeuronExponentialNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:c:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b_c(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
c: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:c:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b_c(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
c: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronExponentialNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronExponentialNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronLogarithmNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronLogarithmNode {}
);
impl MPSCNNNeuronLogarithmNode {
extern_methods!(
#[unsafe(method(nodeWithSource:a:b:c:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_a_b_c(
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
c: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:a:b:c:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_a_b_c(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
a: c_float,
b: c_float,
c: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNeuronLogarithmNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronLogarithmNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNeuronNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronGeLUNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronGeLUNode {}
);
impl MPSCNNNeuronGeLUNode {
extern_methods!(
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
);
}
impl MPSCNNNeuronGeLUNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSource:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_descriptor(
source_node: &MPSNNImageNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronGeLUNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNeuronGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNeuronGradientNode {}
);
impl MPSCNNNeuronGradientNode {
extern_methods!(
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:descriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_descriptor(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:descriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_descriptor(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
descriptor: &MPSNNNeuronDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNNeuron")]
#[unsafe(method(descriptor))]
#[unsafe(method_family = none)]
pub unsafe fn descriptor(&self) -> Retained<MPSNNNeuronDescriptor>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNeuronGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNUnaryReductionNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNUnaryReductionNode {}
);
impl MPSNNUnaryReductionNode {
extern_methods!(
#[unsafe(method(clipRectSource))]
#[unsafe(method_family = none)]
pub unsafe fn clipRectSource(&self) -> MTLRegion;
#[unsafe(method(setClipRectSource:))]
#[unsafe(method_family = none)]
pub unsafe fn setClipRectSource(&self, clip_rect_source: MTLRegion);
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNUnaryReductionNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNUnaryReductionNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionRowMinNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionRowMinNode {}
);
impl MPSNNReductionRowMinNode {
extern_methods!();
}
impl MPSNNReductionRowMinNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionRowMinNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionRowMinNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionColumnMinNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionColumnMinNode {}
);
impl MPSNNReductionColumnMinNode {
extern_methods!();
}
impl MPSNNReductionColumnMinNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionColumnMinNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionColumnMinNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionFeatureChannelsMinNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionFeatureChannelsMinNode {}
);
impl MPSNNReductionFeatureChannelsMinNode {
extern_methods!();
}
impl MPSNNReductionFeatureChannelsMinNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsMinNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsMinNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionFeatureChannelsArgumentMinNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionFeatureChannelsArgumentMinNode {}
);
impl MPSNNReductionFeatureChannelsArgumentMinNode {
extern_methods!();
}
impl MPSNNReductionFeatureChannelsArgumentMinNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsArgumentMinNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsArgumentMinNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionRowMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionRowMaxNode {}
);
impl MPSNNReductionRowMaxNode {
extern_methods!();
}
impl MPSNNReductionRowMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionRowMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionRowMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionColumnMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionColumnMaxNode {}
);
impl MPSNNReductionColumnMaxNode {
extern_methods!();
}
impl MPSNNReductionColumnMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionColumnMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionColumnMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionFeatureChannelsMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionFeatureChannelsMaxNode {}
);
impl MPSNNReductionFeatureChannelsMaxNode {
extern_methods!();
}
impl MPSNNReductionFeatureChannelsMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionFeatureChannelsArgumentMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionFeatureChannelsArgumentMaxNode {}
);
impl MPSNNReductionFeatureChannelsArgumentMaxNode {
extern_methods!();
}
impl MPSNNReductionFeatureChannelsArgumentMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsArgumentMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsArgumentMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionRowMeanNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionRowMeanNode {}
);
impl MPSNNReductionRowMeanNode {
extern_methods!();
}
impl MPSNNReductionRowMeanNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionRowMeanNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionRowMeanNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionColumnMeanNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionColumnMeanNode {}
);
impl MPSNNReductionColumnMeanNode {
extern_methods!();
}
impl MPSNNReductionColumnMeanNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionColumnMeanNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionColumnMeanNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionFeatureChannelsMeanNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionFeatureChannelsMeanNode {}
);
impl MPSNNReductionFeatureChannelsMeanNode {
extern_methods!();
}
impl MPSNNReductionFeatureChannelsMeanNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsMeanNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsMeanNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionSpatialMeanNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionSpatialMeanNode {}
);
impl MPSNNReductionSpatialMeanNode {
extern_methods!();
}
impl MPSNNReductionSpatialMeanNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionSpatialMeanNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionSpatialMeanNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionRowSumNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionRowSumNode {}
);
impl MPSNNReductionRowSumNode {
extern_methods!();
}
impl MPSNNReductionRowSumNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionRowSumNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionRowSumNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionColumnSumNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionColumnSumNode {}
);
impl MPSNNReductionColumnSumNode {
extern_methods!();
}
impl MPSNNReductionColumnSumNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionColumnSumNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionColumnSumNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNUnaryReductionNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionFeatureChannelsSumNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionFeatureChannelsSumNode {}
);
impl MPSNNReductionFeatureChannelsSumNode {
extern_methods!(
#[unsafe(method(weight))]
#[unsafe(method_family = none)]
pub unsafe fn weight(&self) -> c_float;
#[unsafe(method(setWeight:))]
#[unsafe(method_family = none)]
pub unsafe fn setWeight(&self, weight: c_float);
);
}
impl MPSNNReductionFeatureChannelsSumNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsSumNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionFeatureChannelsSumNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingNode {}
);
impl MPSCNNPoolingNode {
extern_methods!(
#[unsafe(method(kernelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn kernelWidth(&self) -> NSUInteger;
#[unsafe(method(kernelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn kernelHeight(&self) -> NSUInteger;
#[unsafe(method(strideInPixelsX))]
#[unsafe(method_family = none)]
pub unsafe fn strideInPixelsX(&self) -> NSUInteger;
#[unsafe(method(strideInPixelsY))]
#[unsafe(method_family = none)]
pub unsafe fn strideInPixelsY(&self) -> NSUInteger;
#[unsafe(method(nodeWithSource:filterSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize(
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:filterSize:stride:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize_stride(
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:stride:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize_stride(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNPoolingNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingAverageNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingAverageNode {}
);
impl MPSCNNPoolingAverageNode {
extern_methods!();
}
impl MPSCNNPoolingAverageNode {
extern_methods!(
#[unsafe(method(nodeWithSource:filterSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize(
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:filterSize:stride:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize_stride(
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:stride:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize_stride(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingAverageNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingAverageNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNPoolingNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingL2NormNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingL2NormNode {}
);
impl MPSCNNPoolingL2NormNode {
extern_methods!();
}
impl MPSCNNPoolingL2NormNode {
extern_methods!(
#[unsafe(method(nodeWithSource:filterSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize(
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:filterSize:stride:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize_stride(
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:stride:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize_stride(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingL2NormNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingL2NormNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNPoolingNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingMaxNode {}
);
impl MPSCNNPoolingMaxNode {
extern_methods!();
}
impl MPSCNNPoolingMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:filterSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize(
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:filterSize:stride:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize_stride(
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:stride:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize_stride(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNDilatedPoolingMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNDilatedPoolingMaxNode {}
);
impl MPSCNNDilatedPoolingMaxNode {
extern_methods!(
#[unsafe(method(dilationRateX))]
#[unsafe(method_family = none)]
pub unsafe fn dilationRateX(&self) -> NSUInteger;
#[unsafe(method(dilationRateY))]
#[unsafe(method_family = none)]
pub unsafe fn dilationRateY(&self) -> NSUInteger;
#[unsafe(method(nodeWithSource:filterSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize(
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:filterSize:stride:dilationRate:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_filterSize_stride_dilationRate(
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
dilation_rate: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:dilationRateX:dilationRateY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_dilationRateX_dilationRateY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
dilation_rate_x: NSUInteger,
dilation_rate_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:stride:dilationRate:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize_stride_dilationRate(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
stride: NSUInteger,
dilation_rate: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:filterSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_filterSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: NSUInteger,
) -> Retained<Self>;
);
}
impl MPSCNNDilatedPoolingMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNDilatedPoolingMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingGradientNode {}
);
impl MPSCNNPoolingGradientNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
#[unsafe(method(kernelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn kernelWidth(&self) -> NSUInteger;
#[unsafe(method(kernelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn kernelHeight(&self) -> NSUInteger;
#[unsafe(method(strideInPixelsX))]
#[unsafe(method_family = none)]
pub unsafe fn strideInPixelsX(&self) -> NSUInteger;
#[unsafe(method(strideInPixelsY))]
#[unsafe(method_family = none)]
pub unsafe fn strideInPixelsY(&self) -> NSUInteger;
);
}
impl MPSCNNPoolingGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNPoolingGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingMaxGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingMaxGradientNode {}
);
impl MPSCNNPoolingMaxGradientNode {
extern_methods!();
}
impl MPSCNNPoolingMaxGradientNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingMaxGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingMaxGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNPoolingGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingAverageGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingAverageGradientNode {}
);
impl MPSCNNPoolingAverageGradientNode {
extern_methods!();
}
impl MPSCNNPoolingAverageGradientNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingAverageGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingAverageGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNPoolingGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNPoolingL2NormGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNPoolingL2NormGradientNode {}
);
impl MPSCNNPoolingL2NormGradientNode {
extern_methods!();
}
impl MPSCNNPoolingL2NormGradientNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
);
}
impl MPSCNNPoolingL2NormGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNPoolingL2NormGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSCNNPoolingGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNDilatedPoolingMaxGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNDilatedPoolingMaxGradientNode {}
);
impl MPSCNNDilatedPoolingMaxGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:dilationRateX:dilationRateY:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_dilationRateX_dilationRateY(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
dilation_rate_x: NSUInteger,
dilation_rate_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:dilationRateX:dilationRateY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_dilationRateX_dilationRateY(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
dilation_rate_x: NSUInteger,
dilation_rate_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(dilationRateX))]
#[unsafe(method_family = none)]
pub unsafe fn dilationRateX(&self) -> NSUInteger;
#[unsafe(method(dilationRateY))]
#[unsafe(method_family = none)]
pub unsafe fn dilationRateY(&self) -> NSUInteger;
);
}
impl MPSCNNDilatedPoolingMaxGradientNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:paddingPolicy:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight_strideInPixelsX_strideInPixelsY_paddingPolicy(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
stride_in_pixels_x: NSUInteger,
stride_in_pixels_y: NSUInteger,
padding_policy: Option<&ProtocolObject<dyn MPSNNPadding>>,
) -> Retained<Self>;
);
}
impl MPSCNNDilatedPoolingMaxGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNDilatedPoolingMaxGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNNormalizationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNNormalizationNode {}
);
impl MPSCNNNormalizationNode {
extern_methods!(
#[unsafe(method(alpha))]
#[unsafe(method_family = none)]
pub unsafe fn alpha(&self) -> c_float;
#[unsafe(method(setAlpha:))]
#[unsafe(method_family = none)]
pub unsafe fn setAlpha(&self, alpha: c_float);
#[unsafe(method(beta))]
#[unsafe(method_family = none)]
pub unsafe fn beta(&self) -> c_float;
#[unsafe(method(setBeta:))]
#[unsafe(method_family = none)]
pub unsafe fn setBeta(&self, beta: c_float);
#[unsafe(method(delta))]
#[unsafe(method_family = none)]
pub unsafe fn delta(&self) -> c_float;
#[unsafe(method(setDelta:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelta(&self, delta: c_float);
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNormalizationNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNSpatialNormalizationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNSpatialNormalizationNode {}
);
impl MPSCNNSpatialNormalizationNode {
extern_methods!(
#[unsafe(method(kernelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn kernelWidth(&self) -> NSUInteger;
#[unsafe(method(setKernelWidth:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger);
#[unsafe(method(kernelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn kernelHeight(&self) -> NSUInteger;
#[unsafe(method(setKernelHeight:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger);
#[unsafe(method(nodeWithSource:kernelSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_kernelSize(
source_node: &MPSNNImageNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNSpatialNormalizationNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
);
}
impl MPSCNNSpatialNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNSpatialNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNSpatialNormalizationGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNSpatialNormalizationGradientNode {}
);
impl MPSCNNSpatialNormalizationGradientNode {
extern_methods!(
#[unsafe(method(kernelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn kernelWidth(&self) -> NSUInteger;
#[unsafe(method(setKernelWidth:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger);
#[unsafe(method(kernelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn kernelHeight(&self) -> NSUInteger;
#[unsafe(method(setKernelHeight:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger);
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelSize(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelSize(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(alpha))]
#[unsafe(method_family = none)]
pub unsafe fn alpha(&self) -> c_float;
#[unsafe(method(setAlpha:))]
#[unsafe(method_family = none)]
pub unsafe fn setAlpha(&self, alpha: c_float);
#[unsafe(method(beta))]
#[unsafe(method_family = none)]
pub unsafe fn beta(&self) -> c_float;
#[unsafe(method(setBeta:))]
#[unsafe(method_family = none)]
pub unsafe fn setBeta(&self, beta: c_float);
#[unsafe(method(delta))]
#[unsafe(method_family = none)]
pub unsafe fn delta(&self) -> c_float;
#[unsafe(method(setDelta:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelta(&self, delta: c_float);
);
}
impl MPSCNNSpatialNormalizationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNSpatialNormalizationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNormalizationNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNLocalContrastNormalizationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNLocalContrastNormalizationNode {}
);
impl MPSCNNLocalContrastNormalizationNode {
extern_methods!(
#[unsafe(method(pm))]
#[unsafe(method_family = none)]
pub unsafe fn pm(&self) -> c_float;
#[unsafe(method(setPm:))]
#[unsafe(method_family = none)]
pub unsafe fn setPm(&self, pm: c_float);
#[unsafe(method(ps))]
#[unsafe(method_family = none)]
pub unsafe fn ps(&self) -> c_float;
#[unsafe(method(setPs:))]
#[unsafe(method_family = none)]
pub unsafe fn setPs(&self, ps: c_float);
#[unsafe(method(p0))]
#[unsafe(method_family = none)]
pub unsafe fn p0(&self) -> c_float;
#[unsafe(method(setP0:))]
#[unsafe(method_family = none)]
pub unsafe fn setP0(&self, p0: c_float);
#[unsafe(method(kernelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn kernelWidth(&self) -> NSUInteger;
#[unsafe(method(setKernelWidth:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger);
#[unsafe(method(kernelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn kernelHeight(&self) -> NSUInteger;
#[unsafe(method(setKernelHeight:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger);
#[unsafe(method(nodeWithSource:kernelSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_kernelSize(
source_node: &MPSNNImageNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNLocalContrastNormalizationNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
);
}
impl MPSCNNLocalContrastNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNLocalContrastNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNLocalContrastNormalizationGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNLocalContrastNormalizationGradientNode {}
);
impl MPSCNNLocalContrastNormalizationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelWidth:kernelHeight:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelWidth_kernelHeight(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_width: NSUInteger,
kernel_height: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(alpha))]
#[unsafe(method_family = none)]
pub unsafe fn alpha(&self) -> c_float;
#[unsafe(method(setAlpha:))]
#[unsafe(method_family = none)]
pub unsafe fn setAlpha(&self, alpha: c_float);
#[unsafe(method(beta))]
#[unsafe(method_family = none)]
pub unsafe fn beta(&self) -> c_float;
#[unsafe(method(setBeta:))]
#[unsafe(method_family = none)]
pub unsafe fn setBeta(&self, beta: c_float);
#[unsafe(method(delta))]
#[unsafe(method_family = none)]
pub unsafe fn delta(&self) -> c_float;
#[unsafe(method(setDelta:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelta(&self, delta: c_float);
#[unsafe(method(p0))]
#[unsafe(method_family = none)]
pub unsafe fn p0(&self) -> c_float;
#[unsafe(method(setP0:))]
#[unsafe(method_family = none)]
pub unsafe fn setP0(&self, p0: c_float);
#[unsafe(method(pm))]
#[unsafe(method_family = none)]
pub unsafe fn pm(&self) -> c_float;
#[unsafe(method(setPm:))]
#[unsafe(method_family = none)]
pub unsafe fn setPm(&self, pm: c_float);
#[unsafe(method(ps))]
#[unsafe(method_family = none)]
pub unsafe fn ps(&self) -> c_float;
#[unsafe(method(setPs:))]
#[unsafe(method_family = none)]
pub unsafe fn setPs(&self, ps: c_float);
#[unsafe(method(kernelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn kernelWidth(&self) -> NSUInteger;
#[unsafe(method(kernelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn kernelHeight(&self) -> NSUInteger;
);
}
impl MPSCNNLocalContrastNormalizationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNLocalContrastNormalizationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSCNNNormalizationNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNCrossChannelNormalizationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNCrossChannelNormalizationNode {}
);
impl MPSCNNCrossChannelNormalizationNode {
extern_methods!(
#[unsafe(method(kernelSizeInFeatureChannels))]
#[unsafe(method_family = none)]
pub unsafe fn kernelSizeInFeatureChannels(&self) -> NSUInteger;
#[unsafe(method(setKernelSizeInFeatureChannels:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelSizeInFeatureChannels(
&self,
kernel_size_in_feature_channels: NSUInteger,
);
#[unsafe(method(nodeWithSource:kernelSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_kernelSize(
source_node: &MPSNNImageNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:kernelSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_kernelSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNCrossChannelNormalizationNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
);
}
impl MPSCNNCrossChannelNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNCrossChannelNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNCrossChannelNormalizationGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNCrossChannelNormalizationGradientNode {}
);
impl MPSCNNCrossChannelNormalizationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:kernelSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_kernelSize(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:kernelSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_kernelSize(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
kernel_size: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(kernelSize))]
#[unsafe(method_family = none)]
pub unsafe fn kernelSize(&self) -> NSUInteger;
);
}
impl MPSCNNCrossChannelNormalizationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNCrossChannelNormalizationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNInstanceNormalizationNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNInstanceNormalizationNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNInstanceNormalizationNode {}
);
impl MPSCNNInstanceNormalizationNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(trainingStyle))]
#[unsafe(method_family = none)]
pub unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setTrainingStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrainingStyle(&self, training_style: MPSNNTrainingStyle);
#[cfg(feature = "MPSCNNInstanceNormalization")]
#[unsafe(method(nodeWithSource:dataSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_dataSource(
source: &MPSNNImageNode,
data_source: &ProtocolObject<dyn MPSCNNInstanceNormalizationDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNInstanceNormalization")]
#[unsafe(method(initWithSource:dataSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_dataSource(
this: Allocated<Self>,
source: &MPSNNImageNode,
data_source: &ProtocolObject<dyn MPSCNNInstanceNormalizationDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNInstanceNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNInstanceNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNInstanceNormalizationGradientNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNInstanceNormalizationGradientNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNInstanceNormalizationGradientNode {}
);
impl MPSCNNInstanceNormalizationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSCNNInstanceNormalizationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNInstanceNormalizationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNGroupNormalizationNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNGroupNormalizationNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNGroupNormalizationNode {}
);
impl MPSCNNGroupNormalizationNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(trainingStyle))]
#[unsafe(method_family = none)]
pub unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setTrainingStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrainingStyle(&self, training_style: MPSNNTrainingStyle);
#[cfg(feature = "MPSCNNGroupNormalization")]
#[unsafe(method(nodeWithSource:dataSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_dataSource(
source: &MPSNNImageNode,
data_source: &ProtocolObject<dyn MPSCNNGroupNormalizationDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNGroupNormalization")]
#[unsafe(method(initWithSource:dataSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_dataSource(
this: Allocated<Self>,
source: &MPSNNImageNode,
data_source: &ProtocolObject<dyn MPSCNNGroupNormalizationDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNGroupNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNGroupNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNGroupNormalizationGradientNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNGroupNormalizationGradientNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNGroupNormalizationGradientNode {}
);
impl MPSCNNGroupNormalizationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSCNNGroupNormalizationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNGroupNormalizationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNBatchNormalizationNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNBatchNormalizationNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNBatchNormalizationNode {}
);
impl MPSCNNBatchNormalizationNode {
extern_methods!(
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(flags))]
#[unsafe(method_family = none)]
pub unsafe fn flags(&self) -> MPSCNNBatchNormalizationFlags;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setFlags:))]
#[unsafe(method_family = none)]
pub unsafe fn setFlags(&self, flags: MPSCNNBatchNormalizationFlags);
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(trainingStyle))]
#[unsafe(method_family = none)]
pub unsafe fn trainingStyle(&self) -> MPSNNTrainingStyle;
#[cfg(feature = "MPSNeuralNetworkTypes")]
#[unsafe(method(setTrainingStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrainingStyle(&self, training_style: MPSNNTrainingStyle);
#[cfg(feature = "MPSCNNBatchNormalization")]
#[unsafe(method(nodeWithSource:dataSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_dataSource(
source: &MPSNNImageNode,
data_source: &ProtocolObject<dyn MPSCNNBatchNormalizationDataSource>,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNBatchNormalization")]
#[unsafe(method(initWithSource:dataSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_dataSource(
this: Allocated<Self>,
source: &MPSNNImageNode,
data_source: &ProtocolObject<dyn MPSCNNBatchNormalizationDataSource>,
) -> Retained<Self>;
);
}
impl MPSCNNBatchNormalizationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNBatchNormalizationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNBatchNormalizationGradientNode;
);
extern_conformance!(
unsafe impl MPSNNTrainableNode for MPSCNNBatchNormalizationGradientNode {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNBatchNormalizationGradientNode {}
);
impl MPSCNNBatchNormalizationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSCNNBatchNormalizationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNBatchNormalizationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait MPSImageTransformProvider: NSSecureCoding + NSObjectProtocol {
#[cfg(all(feature = "MPSCore", feature = "MPSCoreTypes", feature = "MPSImage"))]
#[unsafe(method(transformForSourceImage:handle:))]
#[unsafe(method_family = none)]
unsafe fn transformForSourceImage_handle(
&self,
image: &MPSImage,
handle: Option<&ProtocolObject<dyn MPSHandle>>,
) -> MPSScaleTransform;
}
);
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNScaleNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNScaleNode {}
);
impl MPSNNScaleNode {
extern_methods!(
#[unsafe(method(nodeWithSource:outputSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_outputSize(
source_node: &MPSNNImageNode,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:transformProvider:outputSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_transformProvider_outputSize(
source_node: &MPSNNImageNode,
transform_provider: Option<&ProtocolObject<dyn MPSImageTransformProvider>>,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:outputSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_outputSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:transformProvider:outputSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_transformProvider_outputSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
transform_provider: Option<&ProtocolObject<dyn MPSImageTransformProvider>>,
size: MTLSize,
) -> Retained<Self>;
);
}
impl MPSNNScaleNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNScaleNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNScaleNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNBilinearScaleNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNBilinearScaleNode {}
);
impl MPSNNBilinearScaleNode {
extern_methods!();
}
impl MPSNNBilinearScaleNode {
extern_methods!(
#[unsafe(method(nodeWithSource:outputSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_outputSize(
source_node: &MPSNNImageNode,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:transformProvider:outputSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_transformProvider_outputSize(
source_node: &MPSNNImageNode,
transform_provider: Option<&ProtocolObject<dyn MPSImageTransformProvider>>,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:outputSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_outputSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:transformProvider:outputSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_transformProvider_outputSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
transform_provider: Option<&ProtocolObject<dyn MPSImageTransformProvider>>,
size: MTLSize,
) -> Retained<Self>;
);
}
impl MPSNNBilinearScaleNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNBilinearScaleNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNScaleNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNLanczosScaleNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNLanczosScaleNode {}
);
impl MPSNNLanczosScaleNode {
extern_methods!();
}
impl MPSNNLanczosScaleNode {
extern_methods!(
#[unsafe(method(nodeWithSource:outputSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_outputSize(
source_node: &MPSNNImageNode,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:transformProvider:outputSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_transformProvider_outputSize(
source_node: &MPSNNImageNode,
transform_provider: Option<&ProtocolObject<dyn MPSImageTransformProvider>>,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:outputSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_outputSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
size: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:transformProvider:outputSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_transformProvider_outputSize(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
transform_provider: Option<&ProtocolObject<dyn MPSImageTransformProvider>>,
size: MTLSize,
) -> Retained<Self>;
);
}
impl MPSNNLanczosScaleNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNLanczosScaleNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNBinaryArithmeticNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNBinaryArithmeticNode {}
);
impl MPSNNBinaryArithmeticNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(nodeWithLeftSource:rightSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithLeftSource_rightSource(
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(initWithLeftSource:rightSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeftSource_rightSource(
this: Allocated<Self>,
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(gradientClass))]
#[unsafe(method_family = none)]
pub unsafe fn gradientClass(&self) -> &'static AnyClass;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
#[unsafe(method(gradientFiltersWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<NSArray<MPSNNGradientFilterNode>>;
#[unsafe(method(primaryScale))]
#[unsafe(method_family = none)]
pub unsafe fn primaryScale(&self) -> c_float;
#[unsafe(method(setPrimaryScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryScale(&self, primary_scale: c_float);
#[unsafe(method(secondaryScale))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryScale(&self) -> c_float;
#[unsafe(method(setSecondaryScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryScale(&self, secondary_scale: c_float);
#[unsafe(method(bias))]
#[unsafe(method_family = none)]
pub unsafe fn bias(&self) -> c_float;
#[unsafe(method(setBias:))]
#[unsafe(method_family = none)]
pub unsafe fn setBias(&self, bias: c_float);
#[unsafe(method(primaryStrideInPixelsX))]
#[unsafe(method_family = none)]
pub unsafe fn primaryStrideInPixelsX(&self) -> NSUInteger;
#[unsafe(method(setPrimaryStrideInPixelsX:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryStrideInPixelsX(&self, primary_stride_in_pixels_x: NSUInteger);
#[unsafe(method(primaryStrideInPixelsY))]
#[unsafe(method_family = none)]
pub unsafe fn primaryStrideInPixelsY(&self) -> NSUInteger;
#[unsafe(method(setPrimaryStrideInPixelsY:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryStrideInPixelsY(&self, primary_stride_in_pixels_y: NSUInteger);
#[unsafe(method(primaryStrideInFeatureChannels))]
#[unsafe(method_family = none)]
pub unsafe fn primaryStrideInFeatureChannels(&self) -> NSUInteger;
#[unsafe(method(setPrimaryStrideInFeatureChannels:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryStrideInFeatureChannels(
&self,
primary_stride_in_feature_channels: NSUInteger,
);
#[unsafe(method(secondaryStrideInPixelsX))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryStrideInPixelsX(&self) -> NSUInteger;
#[unsafe(method(setSecondaryStrideInPixelsX:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryStrideInPixelsX(&self, secondary_stride_in_pixels_x: NSUInteger);
#[unsafe(method(secondaryStrideInPixelsY))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryStrideInPixelsY(&self) -> NSUInteger;
#[unsafe(method(setSecondaryStrideInPixelsY:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryStrideInPixelsY(&self, secondary_stride_in_pixels_y: NSUInteger);
#[unsafe(method(secondaryStrideInFeatureChannels))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryStrideInFeatureChannels(&self) -> NSUInteger;
#[unsafe(method(setSecondaryStrideInFeatureChannels:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryStrideInFeatureChannels(
&self,
secondary_stride_in_feature_channels: NSUInteger,
);
#[unsafe(method(minimumValue))]
#[unsafe(method_family = none)]
pub unsafe fn minimumValue(&self) -> c_float;
#[unsafe(method(setMinimumValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setMinimumValue(&self, minimum_value: c_float);
#[unsafe(method(maximumValue))]
#[unsafe(method_family = none)]
pub unsafe fn maximumValue(&self) -> c_float;
#[unsafe(method(setMaximumValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaximumValue(&self, maximum_value: c_float);
);
}
impl MPSNNBinaryArithmeticNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNBinaryArithmeticNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNBinaryArithmeticNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNAdditionNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNAdditionNode {}
);
impl MPSNNAdditionNode {
extern_methods!();
}
impl MPSNNAdditionNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(nodeWithLeftSource:rightSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithLeftSource_rightSource(
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(initWithLeftSource:rightSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeftSource_rightSource(
this: Allocated<Self>,
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNAdditionNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNAdditionNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNBinaryArithmeticNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNSubtractionNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNSubtractionNode {}
);
impl MPSNNSubtractionNode {
extern_methods!();
}
impl MPSNNSubtractionNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(nodeWithLeftSource:rightSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithLeftSource_rightSource(
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(initWithLeftSource:rightSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeftSource_rightSource(
this: Allocated<Self>,
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNSubtractionNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNSubtractionNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNBinaryArithmeticNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNMultiplicationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNMultiplicationNode {}
);
impl MPSNNMultiplicationNode {
extern_methods!();
}
impl MPSNNMultiplicationNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(nodeWithLeftSource:rightSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithLeftSource_rightSource(
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(initWithLeftSource:rightSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeftSource_rightSource(
this: Allocated<Self>,
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNMultiplicationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNMultiplicationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNBinaryArithmeticNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNDivisionNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNDivisionNode {}
);
impl MPSNNDivisionNode {
extern_methods!();
}
impl MPSNNDivisionNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(nodeWithLeftSource:rightSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithLeftSource_rightSource(
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(initWithLeftSource:rightSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeftSource_rightSource(
this: Allocated<Self>,
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNDivisionNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNDivisionNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNBinaryArithmeticNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNComparisonNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNComparisonNode {}
);
impl MPSNNComparisonNode {
extern_methods!(
#[cfg(feature = "MPSCNNMath")]
#[unsafe(method(comparisonType))]
#[unsafe(method_family = none)]
pub unsafe fn comparisonType(&self) -> MPSNNComparisonType;
#[cfg(feature = "MPSCNNMath")]
#[unsafe(method(setComparisonType:))]
#[unsafe(method_family = none)]
pub unsafe fn setComparisonType(&self, comparison_type: MPSNNComparisonType);
);
}
impl MPSNNComparisonNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(nodeWithLeftSource:rightSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithLeftSource_rightSource(
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(initWithLeftSource:rightSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeftSource_rightSource(
this: Allocated<Self>,
left: &MPSNNImageNode,
right: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSNNComparisonNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNComparisonNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNArithmeticGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNArithmeticGradientNode {}
);
impl MPSNNArithmeticGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithGradientImages:forwardFilter:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithGradientImages_forwardFilter_isSecondarySourceFilter(
this: Allocated<Self>,
gradient_images: &NSArray<MPSNNImageNode>,
filter: &MPSNNFilterNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(primaryScale))]
#[unsafe(method_family = none)]
pub unsafe fn primaryScale(&self) -> c_float;
#[unsafe(method(setPrimaryScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryScale(&self, primary_scale: c_float);
#[unsafe(method(secondaryScale))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryScale(&self) -> c_float;
#[unsafe(method(setSecondaryScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryScale(&self, secondary_scale: c_float);
#[unsafe(method(bias))]
#[unsafe(method_family = none)]
pub unsafe fn bias(&self) -> c_float;
#[unsafe(method(setBias:))]
#[unsafe(method_family = none)]
pub unsafe fn setBias(&self, bias: c_float);
#[unsafe(method(secondaryStrideInPixelsX))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryStrideInPixelsX(&self) -> NSUInteger;
#[unsafe(method(setSecondaryStrideInPixelsX:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryStrideInPixelsX(&self, secondary_stride_in_pixels_x: NSUInteger);
#[unsafe(method(secondaryStrideInPixelsY))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryStrideInPixelsY(&self) -> NSUInteger;
#[unsafe(method(setSecondaryStrideInPixelsY:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryStrideInPixelsY(&self, secondary_stride_in_pixels_y: NSUInteger);
#[unsafe(method(secondaryStrideInFeatureChannels))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryStrideInFeatureChannels(&self) -> NSUInteger;
#[unsafe(method(setSecondaryStrideInFeatureChannels:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryStrideInFeatureChannels(
&self,
secondary_stride_in_feature_channels: NSUInteger,
);
#[unsafe(method(minimumValue))]
#[unsafe(method_family = none)]
pub unsafe fn minimumValue(&self) -> c_float;
#[unsafe(method(setMinimumValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setMinimumValue(&self, minimum_value: c_float);
#[unsafe(method(maximumValue))]
#[unsafe(method_family = none)]
pub unsafe fn maximumValue(&self) -> c_float;
#[unsafe(method(setMaximumValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaximumValue(&self, maximum_value: c_float);
#[unsafe(method(isSecondarySourceFilter))]
#[unsafe(method_family = none)]
pub unsafe fn isSecondarySourceFilter(&self) -> bool;
);
}
impl MPSNNArithmeticGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNArithmeticGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSNNArithmeticGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNAdditionGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNAdditionGradientNode {}
);
impl MPSNNAdditionGradientNode {
extern_methods!();
}
impl MPSNNAdditionGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithGradientImages:forwardFilter:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithGradientImages_forwardFilter_isSecondarySourceFilter(
this: Allocated<Self>,
gradient_images: &NSArray<MPSNNImageNode>,
filter: &MPSNNFilterNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
);
}
impl MPSNNAdditionGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNAdditionGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSNNArithmeticGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNSubtractionGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNSubtractionGradientNode {}
);
impl MPSNNSubtractionGradientNode {
extern_methods!();
}
impl MPSNNSubtractionGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithGradientImages:forwardFilter:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithGradientImages_forwardFilter_isSecondarySourceFilter(
this: Allocated<Self>,
gradient_images: &NSArray<MPSNNImageNode>,
filter: &MPSNNFilterNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
);
}
impl MPSNNSubtractionGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNSubtractionGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(
MPSNNArithmeticGradientNode,
MPSNNGradientFilterNode,
MPSNNFilterNode,
NSObject
))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNMultiplicationGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNMultiplicationGradientNode {}
);
impl MPSNNMultiplicationGradientNode {
extern_methods!();
}
impl MPSNNMultiplicationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_isSecondarySourceFilter(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNBinaryGradientStateNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
#[unsafe(method(initWithGradientImages:forwardFilter:isSecondarySourceFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithGradientImages_forwardFilter_isSecondarySourceFilter(
this: Allocated<Self>,
gradient_images: &NSArray<MPSNNImageNode>,
filter: &MPSNNFilterNode,
is_secondary_source_filter: bool,
) -> Retained<Self>;
);
}
impl MPSNNMultiplicationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNMultiplicationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNDropoutNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNDropoutNode {}
);
impl MPSCNNDropoutNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:keepProbability:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_keepProbability(
source: &MPSNNImageNode,
keep_probability: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:keepProbability:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_keepProbability(
this: Allocated<Self>,
source: &MPSNNImageNode,
keep_probability: c_float,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:keepProbability:seed:maskStrideInPixels:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_keepProbability_seed_maskStrideInPixels(
source: &MPSNNImageNode,
keep_probability: c_float,
seed: NSUInteger,
mask_stride_in_pixels: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSource:keepProbability:seed:maskStrideInPixels:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_keepProbability_seed_maskStrideInPixels(
this: Allocated<Self>,
source: &MPSNNImageNode,
keep_probability: c_float,
seed: NSUInteger,
mask_stride_in_pixels: MTLSize,
) -> Retained<Self>;
#[unsafe(method(keepProbability))]
#[unsafe(method_family = none)]
pub unsafe fn keepProbability(&self) -> c_float;
#[unsafe(method(seed))]
#[unsafe(method_family = none)]
pub unsafe fn seed(&self) -> NSUInteger;
#[unsafe(method(maskStrideInPixels))]
#[unsafe(method_family = none)]
pub unsafe fn maskStrideInPixels(&self) -> MTLSize;
);
}
impl MPSCNNDropoutNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNDropoutNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNDropoutGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNDropoutGradientNode {}
);
impl MPSCNNDropoutGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:keepProbability:seed:maskStrideInPixels:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_keepProbability_seed_maskStrideInPixels(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
keep_probability: c_float,
seed: NSUInteger,
mask_stride_in_pixels: MTLSize,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:keepProbability:seed:maskStrideInPixels:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_keepProbability_seed_maskStrideInPixels(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
keep_probability: c_float,
seed: NSUInteger,
mask_stride_in_pixels: MTLSize,
) -> Retained<Self>;
#[unsafe(method(keepProbability))]
#[unsafe(method_family = none)]
pub unsafe fn keepProbability(&self) -> c_float;
#[unsafe(method(seed))]
#[unsafe(method_family = none)]
pub unsafe fn seed(&self) -> NSUInteger;
#[unsafe(method(maskStrideInPixels))]
#[unsafe(method_family = none)]
pub unsafe fn maskStrideInPixels(&self) -> MTLSize;
);
}
impl MPSCNNDropoutGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNDropoutGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNStateNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNLabelsNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNLabelsNode {}
);
impl MPSNNLabelsNode {
extern_methods!();
}
impl MPSNNLabelsNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNLabelsNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNLossNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNLossNode {}
);
impl MPSCNNLossNode {
extern_methods!(
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSource:lossDescriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_lossDescriptor(
source: &MPSNNImageNode,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSource:lossDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_lossDescriptor(
this: Allocated<Self>,
source: &MPSNNImageNode,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[unsafe(method(inputLabels))]
#[unsafe(method_family = none)]
pub unsafe fn inputLabels(&self) -> Retained<MPSNNLabelsNode>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
);
}
impl MPSCNNLossNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNLossNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNYOLOLossNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNYOLOLossNode {}
);
impl MPSCNNYOLOLossNode {
extern_methods!(
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSource:lossDescriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_lossDescriptor(
source: &MPSNNImageNode,
descriptor: &MPSCNNYOLOLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSource:lossDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_lossDescriptor(
this: Allocated<Self>,
source: &MPSNNImageNode,
descriptor: &MPSCNNYOLOLossDescriptor,
) -> Retained<Self>;
#[unsafe(method(inputLabels))]
#[unsafe(method_family = none)]
pub unsafe fn inputLabels(&self) -> Retained<MPSNNLabelsNode>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
);
}
impl MPSCNNYOLOLossNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNYOLOLossNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNConcatenationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNConcatenationNode {}
);
impl MPSNNConcatenationNode {
extern_methods!(
#[unsafe(method(nodeWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources(source_nodes: &NSArray<MPSNNImageNode>) -> Retained<Self>;
#[unsafe(method(initWithSources:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
) -> Retained<Self>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
);
}
impl MPSNNConcatenationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNConcatenationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNConcatenationGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNConcatenationGradientNode {}
);
impl MPSNNConcatenationGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
gradient_source_node: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
gradient_source_node: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSNNConcatenationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNConcatenationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReshapeNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReshapeNode {}
);
impl MPSNNReshapeNode {
extern_methods!(
#[unsafe(method(nodeWithSource:resultWidth:resultHeight:resultFeatureChannels:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_resultWidth_resultHeight_resultFeatureChannels(
source: &MPSNNImageNode,
result_width: NSUInteger,
result_height: NSUInteger,
result_feature_channels: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:resultWidth:resultHeight:resultFeatureChannels:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_resultWidth_resultHeight_resultFeatureChannels(
this: Allocated<Self>,
source: &MPSNNImageNode,
result_width: NSUInteger,
result_height: NSUInteger,
result_feature_channels: NSUInteger,
) -> Retained<Self>;
);
}
impl MPSNNReshapeNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReshapeNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReshapeGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReshapeGradientNode {}
);
impl MPSNNReshapeGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSNNReshapeGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReshapeGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNReductionSpatialMeanGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNReductionSpatialMeanGradientNode {}
);
impl MPSNNReductionSpatialMeanGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSNNReductionSpatialMeanGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNReductionSpatialMeanGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNPadNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNPadNode {}
);
impl MPSNNPadNode {
extern_methods!(
#[unsafe(method(fillValue))]
#[unsafe(method_family = none)]
pub unsafe fn fillValue(&self) -> c_float;
#[unsafe(method(setFillValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setFillValue(&self, fill_value: c_float);
#[cfg(all(feature = "MPSCore", feature = "MPSCoreTypes"))]
#[unsafe(method(nodeWithSource:paddingSizeBefore:paddingSizeAfter:edgeMode:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_paddingSizeBefore_paddingSizeAfter_edgeMode(
source: &MPSNNImageNode,
padding_size_before: MPSImageCoordinate,
padding_size_after: MPSImageCoordinate,
edge_mode: MPSImageEdgeMode,
) -> Retained<Self>;
#[cfg(all(feature = "MPSCore", feature = "MPSCoreTypes"))]
#[unsafe(method(initWithSource:paddingSizeBefore:paddingSizeAfter:edgeMode:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_paddingSizeBefore_paddingSizeAfter_edgeMode(
this: Allocated<Self>,
source: &MPSNNImageNode,
padding_size_before: MPSImageCoordinate,
padding_size_after: MPSImageCoordinate,
edge_mode: MPSImageEdgeMode,
) -> Retained<Self>;
);
}
impl MPSNNPadNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNPadNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNPadGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNPadGradientNode {}
);
impl MPSNNPadGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSNNPadGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNPadGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNSoftMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNSoftMaxNode {}
);
impl MPSCNNSoftMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNSoftMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNSoftMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNSoftMaxGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNSoftMaxGradientNode {}
);
impl MPSCNNSoftMaxGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSCNNSoftMaxGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNSoftMaxGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNLogSoftMaxNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNLogSoftMaxNode {}
);
impl MPSCNNLogSoftMaxNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
);
}
impl MPSCNNLogSoftMaxNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNLogSoftMaxNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNLogSoftMaxGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNLogSoftMaxGradientNode {}
);
impl MPSCNNLogSoftMaxGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
);
}
impl MPSCNNLogSoftMaxGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNLogSoftMaxGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNUpsamplingNearestNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNUpsamplingNearestNode {}
);
impl MPSCNNUpsamplingNearestNode {
extern_methods!(
#[unsafe(method(nodeWithSource:integerScaleFactorX:integerScaleFactorY:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_integerScaleFactorX_integerScaleFactorY(
source_node: &MPSNNImageNode,
integer_scale_factor_x: NSUInteger,
integer_scale_factor_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:integerScaleFactorX:integerScaleFactorY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_integerScaleFactorX_integerScaleFactorY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
integer_scale_factor_x: NSUInteger,
integer_scale_factor_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(scaleFactorX))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorX(&self) -> c_double;
#[unsafe(method(scaleFactorY))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorY(&self) -> c_double;
);
}
impl MPSCNNUpsamplingNearestNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNUpsamplingNearestNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNUpsamplingBilinearNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNUpsamplingBilinearNode {}
);
impl MPSCNNUpsamplingBilinearNode {
extern_methods!(
#[unsafe(method(nodeWithSource:integerScaleFactorX:integerScaleFactorY:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_integerScaleFactorX_integerScaleFactorY(
source_node: &MPSNNImageNode,
integer_scale_factor_x: NSUInteger,
integer_scale_factor_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:integerScaleFactorX:integerScaleFactorY:alignCorners:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_integerScaleFactorX_integerScaleFactorY_alignCorners(
source_node: &MPSNNImageNode,
integer_scale_factor_x: NSUInteger,
integer_scale_factor_y: NSUInteger,
align_corners: bool,
) -> Retained<Self>;
#[unsafe(method(initWithSource:integerScaleFactorX:integerScaleFactorY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_integerScaleFactorX_integerScaleFactorY(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
integer_scale_factor_x: NSUInteger,
integer_scale_factor_y: NSUInteger,
) -> Retained<Self>;
#[unsafe(method(initWithSource:integerScaleFactorX:integerScaleFactorY:alignCorners:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_integerScaleFactorX_integerScaleFactorY_alignCorners(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
integer_scale_factor_x: NSUInteger,
integer_scale_factor_y: NSUInteger,
align_corners: bool,
) -> Retained<Self>;
#[unsafe(method(scaleFactorX))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorX(&self) -> c_double;
#[unsafe(method(scaleFactorY))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorY(&self) -> c_double;
#[unsafe(method(alignCorners))]
#[unsafe(method_family = none)]
pub unsafe fn alignCorners(&self) -> bool;
);
}
impl MPSCNNUpsamplingBilinearNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNUpsamplingBilinearNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNUpsamplingNearestGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNUpsamplingNearestGradientNode {}
);
impl MPSCNNUpsamplingNearestGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:scaleFactorX:scaleFactorY:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
scale_factor_x: c_double,
scale_factor_y: c_double,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:scaleFactorX:scaleFactorY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
scale_factor_x: c_double,
scale_factor_y: c_double,
) -> Retained<Self>;
#[unsafe(method(scaleFactorX))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorX(&self) -> c_double;
#[unsafe(method(scaleFactorY))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorY(&self) -> c_double;
);
}
impl MPSCNNUpsamplingNearestGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNUpsamplingNearestGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSCNNUpsamplingBilinearGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSCNNUpsamplingBilinearGradientNode {}
);
impl MPSCNNUpsamplingBilinearGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:scaleFactorX:scaleFactorY:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
scale_factor_x: c_double,
scale_factor_y: c_double,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:scaleFactorX:scaleFactorY:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_scaleFactorX_scaleFactorY(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
scale_factor_x: c_double,
scale_factor_y: c_double,
) -> Retained<Self>;
#[unsafe(method(scaleFactorX))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorX(&self) -> c_double;
#[unsafe(method(scaleFactorY))]
#[unsafe(method_family = none)]
pub unsafe fn scaleFactorY(&self) -> c_double;
);
}
impl MPSCNNUpsamplingBilinearGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSCNNUpsamplingBilinearGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait MPSNNGramMatrixCallback:
NSObjectProtocol + NSSecureCoding + NSCopying
{
#[cfg(all(feature = "MPSCore", feature = "MPSImage"))]
#[unsafe(method(alphaForSourceImage:destinationImage:))]
#[unsafe(method_family = none)]
unsafe fn alphaForSourceImage_destinationImage(
&self,
source_image: &MPSImage,
destination_image: &MPSImage,
) -> c_float;
}
);
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNGramMatrixCalculationNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNGramMatrixCalculationNode {}
);
impl MPSNNGramMatrixCalculationNode {
extern_methods!(
#[unsafe(method(alpha))]
#[unsafe(method_family = none)]
pub unsafe fn alpha(&self) -> c_float;
#[unsafe(method(propertyCallBack))]
#[unsafe(method_family = none)]
pub unsafe fn propertyCallBack(
&self,
) -> Option<Retained<ProtocolObject<dyn MPSNNGramMatrixCallback>>>;
#[unsafe(method(setPropertyCallBack:))]
#[unsafe(method_family = none)]
pub unsafe fn setPropertyCallBack(
&self,
property_call_back: Option<&ProtocolObject<dyn MPSNNGramMatrixCallback>>,
);
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source_node: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(nodeWithSource:alpha:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_alpha(
source_node: &MPSNNImageNode,
alpha: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSource:alpha:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_alpha(
this: Allocated<Self>,
source_node: &MPSNNImageNode,
alpha: c_float,
) -> Retained<Self>;
);
}
impl MPSNNGramMatrixCalculationNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNGramMatrixCalculationNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNGramMatrixCalculationGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNGramMatrixCalculationGradientNode {}
);
impl MPSNNGramMatrixCalculationGradientNode {
extern_methods!(
#[unsafe(method(alpha))]
#[unsafe(method_family = none)]
pub unsafe fn alpha(&self) -> c_float;
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
) -> Retained<Self>;
#[unsafe(method(nodeWithSourceGradient:sourceImage:gradientState:alpha:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_gradientState_alpha(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
alpha: c_float,
) -> Retained<Self>;
#[unsafe(method(initWithSourceGradient:sourceImage:gradientState:alpha:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_gradientState_alpha(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
gradient_state: &MPSNNGradientStateNode,
alpha: c_float,
) -> Retained<Self>;
);
}
impl MPSNNGramMatrixCalculationGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNGramMatrixCalculationGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait MPSNNLossCallback:
NSObjectProtocol + NSSecureCoding + NSCopying
{
#[cfg(all(feature = "MPSCore", feature = "MPSImage"))]
#[unsafe(method(scalarWeightForSourceImage:destinationImage:))]
#[unsafe(method_family = none)]
unsafe fn scalarWeightForSourceImage_destinationImage(
&self,
source_image: &MPSImage,
destination_image: &MPSImage,
) -> c_float;
}
);
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNForwardLossNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNForwardLossNode {}
);
impl MPSNNForwardLossNode {
extern_methods!(
#[cfg(feature = "MPSCNNTypes")]
#[unsafe(method(lossType))]
#[unsafe(method_family = none)]
pub unsafe fn lossType(&self) -> MPSCNNLossType;
#[cfg(feature = "MPSCNNTypes")]
#[unsafe(method(reductionType))]
#[unsafe(method_family = none)]
pub unsafe fn reductionType(&self) -> MPSCNNReductionType;
#[unsafe(method(numberOfClasses))]
#[unsafe(method_family = none)]
pub unsafe fn numberOfClasses(&self) -> NSUInteger;
#[unsafe(method(reduceAcrossBatch))]
#[unsafe(method_family = none)]
pub unsafe fn reduceAcrossBatch(&self) -> bool;
#[unsafe(method(weight))]
#[unsafe(method_family = none)]
pub unsafe fn weight(&self) -> c_float;
#[unsafe(method(labelSmoothing))]
#[unsafe(method_family = none)]
pub unsafe fn labelSmoothing(&self) -> c_float;
#[unsafe(method(epsilon))]
#[unsafe(method_family = none)]
pub unsafe fn epsilon(&self) -> c_float;
#[unsafe(method(delta))]
#[unsafe(method_family = none)]
pub unsafe fn delta(&self) -> c_float;
#[unsafe(method(propertyCallBack))]
#[unsafe(method_family = none)]
pub unsafe fn propertyCallBack(
&self,
) -> Option<Retained<ProtocolObject<dyn MPSNNLossCallback>>>;
#[unsafe(method(setPropertyCallBack:))]
#[unsafe(method_family = none)]
pub unsafe fn setPropertyCallBack(
&self,
property_call_back: Option<&ProtocolObject<dyn MPSNNLossCallback>>,
);
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSource:labels:weights:lossDescriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_labels_weights_lossDescriptor(
source: &MPSNNImageNode,
labels: &MPSNNImageNode,
weights: &MPSNNImageNode,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSource:labels:lossDescriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource_labels_lossDescriptor(
source: &MPSNNImageNode,
labels: &MPSNNImageNode,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSources:lossDescriptor:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources_lossDescriptor(
source_nodes: &NSArray<MPSNNImageNode>,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSource:labels:weights:lossDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_labels_weights_lossDescriptor(
this: Allocated<Self>,
source: &MPSNNImageNode,
labels: &MPSNNImageNode,
weights: Option<&MPSNNImageNode>,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSource:labels:lossDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_labels_lossDescriptor(
this: Allocated<Self>,
source: &MPSNNImageNode,
labels: &MPSNNImageNode,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSources:lossDescriptor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources_lossDescriptor(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
descriptor: &MPSCNNLossDescriptor,
) -> Retained<Self>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
source_gradient: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNLossGradientNode>;
#[unsafe(method(gradientFiltersWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSources(
&self,
source_gradient: &NSArray<MPSNNImageNode>,
) -> Retained<NSArray<MPSNNLossGradientNode>>;
#[unsafe(method(gradientFilterWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSource(
&self,
source_gradient: &MPSNNImageNode,
) -> Retained<MPSNNLossGradientNode>;
#[unsafe(method(gradientFiltersWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFiltersWithSource(
&self,
source_gradient: &MPSNNImageNode,
) -> Retained<NSArray<MPSNNLossGradientNode>>;
);
}
impl MPSNNForwardLossNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNForwardLossNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNGradientFilterNode, MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNLossGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNLossGradientNode {}
);
impl MPSNNLossGradientNode {
extern_methods!(
#[cfg(feature = "MPSCNNTypes")]
#[unsafe(method(lossType))]
#[unsafe(method_family = none)]
pub unsafe fn lossType(&self) -> MPSCNNLossType;
#[cfg(feature = "MPSCNNTypes")]
#[unsafe(method(reductionType))]
#[unsafe(method_family = none)]
pub unsafe fn reductionType(&self) -> MPSCNNReductionType;
#[unsafe(method(numberOfClasses))]
#[unsafe(method_family = none)]
pub unsafe fn numberOfClasses(&self) -> NSUInteger;
#[unsafe(method(reduceAcrossBatch))]
#[unsafe(method_family = none)]
pub unsafe fn reduceAcrossBatch(&self) -> bool;
#[unsafe(method(weight))]
#[unsafe(method_family = none)]
pub unsafe fn weight(&self) -> c_float;
#[unsafe(method(labelSmoothing))]
#[unsafe(method_family = none)]
pub unsafe fn labelSmoothing(&self) -> c_float;
#[unsafe(method(epsilon))]
#[unsafe(method_family = none)]
pub unsafe fn epsilon(&self) -> c_float;
#[unsafe(method(delta))]
#[unsafe(method_family = none)]
pub unsafe fn delta(&self) -> c_float;
#[unsafe(method(isLabelsGradientFilter))]
#[unsafe(method_family = none)]
pub unsafe fn isLabelsGradientFilter(&self) -> bool;
#[unsafe(method(propertyCallBack))]
#[unsafe(method_family = none)]
pub unsafe fn propertyCallBack(
&self,
) -> Option<Retained<ProtocolObject<dyn MPSNNLossCallback>>>;
#[unsafe(method(setPropertyCallBack:))]
#[unsafe(method_family = none)]
pub unsafe fn setPropertyCallBack(
&self,
property_call_back: Option<&ProtocolObject<dyn MPSNNLossCallback>>,
);
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:labels:weights:gradientState:lossDescriptor:isLabelsGradientFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_labels_weights_gradientState_lossDescriptor_isLabelsGradientFilter(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
labels: &MPSNNImageNode,
weights: &MPSNNImageNode,
gradient_state: Option<&MPSNNGradientStateNode>,
descriptor: &MPSCNNLossDescriptor,
is_labels_gradient_filter: bool,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSourceGradient:sourceImage:labels:gradientState:lossDescriptor:isLabelsGradientFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSourceGradient_sourceImage_labels_gradientState_lossDescriptor_isLabelsGradientFilter(
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
labels: &MPSNNImageNode,
gradient_state: Option<&MPSNNGradientStateNode>,
descriptor: &MPSCNNLossDescriptor,
is_labels_gradient_filter: bool,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(nodeWithSources:gradientState:lossDescriptor:isLabelsGradientFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSources_gradientState_lossDescriptor_isLabelsGradientFilter(
source_nodes: &NSArray<MPSNNImageNode>,
gradient_state: Option<&MPSNNGradientStateNode>,
descriptor: &MPSCNNLossDescriptor,
is_labels_gradient_filter: bool,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSourceGradient:sourceImage:labels:weights:gradientState:lossDescriptor:isLabelsGradientFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_labels_weights_gradientState_lossDescriptor_isLabelsGradientFilter(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
labels: &MPSNNImageNode,
weights: Option<&MPSNNImageNode>,
gradient_state: Option<&MPSNNGradientStateNode>,
descriptor: &MPSCNNLossDescriptor,
is_labels_gradient_filter: bool,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSourceGradient:sourceImage:labels:gradientState:lossDescriptor:isLabelsGradientFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSourceGradient_sourceImage_labels_gradientState_lossDescriptor_isLabelsGradientFilter(
this: Allocated<Self>,
source_gradient: &MPSNNImageNode,
source_image: &MPSNNImageNode,
labels: &MPSNNImageNode,
gradient_state: Option<&MPSNNGradientStateNode>,
descriptor: &MPSCNNLossDescriptor,
is_labels_gradient_filter: bool,
) -> Retained<Self>;
#[cfg(feature = "MPSCNNLoss")]
#[unsafe(method(initWithSources:gradientState:lossDescriptor:isLabelsGradientFilter:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSources_gradientState_lossDescriptor_isLabelsGradientFilter(
this: Allocated<Self>,
source_nodes: &NSArray<MPSNNImageNode>,
gradient_state: Option<&MPSNNGradientStateNode>,
descriptor: &MPSCNNLossDescriptor,
is_labels_gradient_filter: bool,
) -> Retained<Self>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
);
}
impl MPSNNLossGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNLossGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MPSNNFilterNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPSNNInitialGradientNode;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPSNNInitialGradientNode {}
);
impl MPSNNInitialGradientNode {
extern_methods!(
#[unsafe(method(nodeWithSource:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithSource(source: &MPSNNImageNode) -> Retained<Self>;
#[unsafe(method(initWithSource:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource(
this: Allocated<Self>,
source: &MPSNNImageNode,
) -> Retained<Self>;
#[unsafe(method(gradientFilterWithSources:))]
#[unsafe(method_family = none)]
pub unsafe fn gradientFilterWithSources(
&self,
gradient_images: &NSArray<MPSNNImageNode>,
) -> Retained<MPSNNGradientFilterNode>;
);
}
impl MPSNNInitialGradientNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl MPSNNInitialGradientNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}