pub struct MPSCNNSubPixelConvolutionDescriptor { /* private fields */ }MPSCNNConvolution and MPSNeuralNetwork only.Expand description
MPSCNNSubPixelConvolutionDescriptor can be used to create MPSCNNConvolution object that does sub pixel upsamling and reshaping opeartion as described in http://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Shi_Real-Time_Single_Image_CVPR_2016_paper.pdf
Conceptually MPSCNNConvolution with subPixelScaleFactor > 1 can be thought of as filter performing regular CNN convolution producing N output feature channels at each pixel of an intermediate MPSImage followed by a kernel that rearranges/reshapes these N channels at each pixel of intermediate MPSImage into a pixel block of size subPixelScaleFactor x subPixelScaleFactor with N/(subPixelScaleFactor * subPixelScaleFactor) featureChannels at each pixel of this pixel block. Thus each pixel in intermedaite MPSImage with N channels map to subPixelScaleFactor x subPixelScaleFactor pixel block in final destination MPSImage with N/(subPixelScaleFactor * subPixelScaleFactor) featureChannels. MPSCNNConvolution with subPixelScaleFactor > 1 fuses the convolution and reshaping operation into single compute kernel thus not only saving DRAM roundtrip but also memory needed for intermediate MPSImage had these operation done separately. Let N be the value of outputFeatureChannels property and let r = subPixelScaleFactor. Conceptually Convolution will produce intermedaite image Io of dimensions (treated as 3D tensor) width x height x N where width = (clipRect.size.width + r - 1) / r height = (clipRect.size.height + r -1) / r Reshaping happens as follows
Destination[clipRect.origin.x+x][clipRect.origin.y+y][c] = Io[ floor(x/r) ][ floor(y/r) ][ (N/r^2) * ( r * mod(y,r) + mod(x,r) ) + c ]
where x in [0,clipRect.size.width-1], y in [0,clipRect.size.height-1], c in [0,N/r^2 - 1]The following conditions must be met:
- N (outputFeatureChannels) must be multiple of r^2 (subPixelScaleFactor * subPixelScaleFactor).
- The destination MPSImage to encode call must have at least N/r^2 + destinationFeatureChannelOffset channels.
- Number of feature channels in reshaped output image (N/r^2) can be any value when groups = 1 but must be multiple of 4 when groups > 1.
See also Apple’s documentation
Implementations§
Source§impl MPSCNNSubPixelConvolutionDescriptor
impl MPSCNNSubPixelConvolutionDescriptor
Sourcepub unsafe fn subPixelScaleFactor(&self) -> NSUInteger
pub unsafe fn subPixelScaleFactor(&self) -> NSUInteger
Upsampling scale factor. Each pixel in input is upsampled into a subPixelScaleFactor x subPixelScaleFactor pixel block by rearranging the outputFeatureChannels as described above. Default value is 1.
Sourcepub unsafe fn setSubPixelScaleFactor(&self, sub_pixel_scale_factor: NSUInteger)
pub unsafe fn setSubPixelScaleFactor(&self, sub_pixel_scale_factor: NSUInteger)
Setter for subPixelScaleFactor.
Source§impl MPSCNNSubPixelConvolutionDescriptor
Methods declared on superclass MPSCNNConvolutionDescriptor.
impl MPSCNNSubPixelConvolutionDescriptor
Methods declared on superclass MPSCNNConvolutionDescriptor.
Sourcepub unsafe fn initWithCoder(
this: Allocated<Self>,
a_decoder: &NSCoder,
) -> Option<Retained<Self>>
pub unsafe fn initWithCoder( this: Allocated<Self>, a_decoder: &NSCoder, ) -> Option<Retained<Self>>
Sourcepub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels_neuronFilter(
kernel_width: NSUInteger,
kernel_height: NSUInteger,
input_feature_channels: NSUInteger,
output_feature_channels: NSUInteger,
neuron_filter: Option<&MPSCNNNeuron>,
) -> Retained<Self>
👎DeprecatedAvailable on crate features MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.
pub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels_neuronFilter( kernel_width: NSUInteger, kernel_height: NSUInteger, input_feature_channels: NSUInteger, output_feature_channels: NSUInteger, neuron_filter: Option<&MPSCNNNeuron>, ) -> Retained<Self>
MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.This method is deprecated. Please use neuronType, neuronParameterA and neuronParameterB properites to fuse neuron with convolution.
Parameter kernelWidth: The width of the filter window. Must be > 0. Large values will take a long time.
Parameter kernelHeight: The height of the filter window. Must be > 0. Large values will take a long time.
Parameter inputFeatureChannels: The number of feature channels in the input image. Must be >= 1.
Parameter outputFeatureChannels: The number of feature channels in the output image. Must be >= 1.
Parameter neuronFilter: An optional neuron filter that can be applied to the output of convolution.
Returns: A valid MPSCNNConvolutionDescriptor object or nil, if failure.
Sourcepub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels(
kernel_width: NSUInteger,
kernel_height: NSUInteger,
input_feature_channels: NSUInteger,
output_feature_channels: NSUInteger,
) -> Retained<Self>
pub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels( kernel_width: NSUInteger, kernel_height: NSUInteger, input_feature_channels: NSUInteger, output_feature_channels: NSUInteger, ) -> Retained<Self>
Creates a convolution descriptor.
Parameter kernelWidth: The width of the filter window. Must be > 0. Large values will take a long time.
Parameter kernelHeight: The height of the filter window. Must be > 0. Large values will take a long time.
Parameter inputFeatureChannels: The number of feature channels in the input image. Must be >= 1.
Parameter outputFeatureChannels: The number of feature channels in the output image. Must be >= 1.
Returns: A valid MPSCNNConvolutionDescriptor object or nil, if failure.
Methods from Deref<Target = MPSCNNConvolutionDescriptor>§
Sourcepub unsafe fn kernelWidth(&self) -> NSUInteger
pub unsafe fn kernelWidth(&self) -> NSUInteger
The width of the filter window. The default value is 3. Any positive non-zero value is valid, including even values. The position of the left edge of the filter window is given by offset.x - (kernelWidth>>1)
Sourcepub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger)
pub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger)
Setter for kernelWidth.
Sourcepub unsafe fn kernelHeight(&self) -> NSUInteger
pub unsafe fn kernelHeight(&self) -> NSUInteger
The height of the filter window. The default value is 3. Any positive non-zero value is valid, including even values. The position of the top edge of the filter window is given by offset.y - (kernelHeight>>1)
Sourcepub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger)
pub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger)
Setter for kernelHeight.
Sourcepub unsafe fn inputFeatureChannels(&self) -> NSUInteger
pub unsafe fn inputFeatureChannels(&self) -> NSUInteger
The number of feature channels per pixel in the input image.
Sourcepub unsafe fn setInputFeatureChannels(&self, input_feature_channels: NSUInteger)
pub unsafe fn setInputFeatureChannels(&self, input_feature_channels: NSUInteger)
Setter for inputFeatureChannels.
Sourcepub unsafe fn outputFeatureChannels(&self) -> NSUInteger
pub unsafe fn outputFeatureChannels(&self) -> NSUInteger
The number of feature channels per pixel in the output image.
Sourcepub unsafe fn setOutputFeatureChannels(
&self,
output_feature_channels: NSUInteger,
)
pub unsafe fn setOutputFeatureChannels( &self, output_feature_channels: NSUInteger, )
Setter for outputFeatureChannels.
Sourcepub unsafe fn strideInPixelsX(&self) -> NSUInteger
pub unsafe fn strideInPixelsX(&self) -> NSUInteger
The output stride (downsampling factor) in the x dimension. The default value is 1.
Sourcepub unsafe fn setStrideInPixelsX(&self, stride_in_pixels_x: NSUInteger)
pub unsafe fn setStrideInPixelsX(&self, stride_in_pixels_x: NSUInteger)
Setter for strideInPixelsX.
Sourcepub unsafe fn strideInPixelsY(&self) -> NSUInteger
pub unsafe fn strideInPixelsY(&self) -> NSUInteger
The output stride (downsampling factor) in the y dimension. The default value is 1.
Sourcepub unsafe fn setStrideInPixelsY(&self, stride_in_pixels_y: NSUInteger)
pub unsafe fn setStrideInPixelsY(&self, stride_in_pixels_y: NSUInteger)
Setter for strideInPixelsY.
Sourcepub unsafe fn groups(&self) -> NSUInteger
pub unsafe fn groups(&self) -> NSUInteger
Number of groups input and output channels are divided into. The default value is 1. Groups lets you reduce the parameterization. If groups is set to n, input is divided into n groups with inputFeatureChannels/n channels in each group. Similarly output is divided into n groups with outputFeatureChannels/n channels in each group. ith group in input is only connected to ith group in output so number of weights (parameters) needed is reduced by factor of n. Both inputFeatureChannels and outputFeatureChannels must be divisible by n and number of channels in each group must be multiple of 4.
Sourcepub unsafe fn setGroups(&self, groups: NSUInteger)
pub unsafe fn setGroups(&self, groups: NSUInteger)
Setter for groups.
Sourcepub unsafe fn dilationRateX(&self) -> NSUInteger
pub unsafe fn dilationRateX(&self) -> NSUInteger
dilationRateX property can be used to implement dilated convolution as described in https://arxiv.org/pdf/1511.07122v3.pdf to aggregate global information in dense prediction problems. Default value is 1. When set to value > 1, original kernel width, kW is dilated to
kW_Dilated = (kW-1)*dilationRateX + 1
by inserting d-1 zeros between consecutive entries in each row of the original kernel. The kernel is centered based on kW_Dilated.
Sourcepub unsafe fn setDilationRateX(&self, dilation_rate_x: NSUInteger)
pub unsafe fn setDilationRateX(&self, dilation_rate_x: NSUInteger)
Setter for dilationRateX.
Sourcepub unsafe fn dilationRateY(&self) -> NSUInteger
pub unsafe fn dilationRateY(&self) -> NSUInteger
dilationRateY property can be used to implement dilated convolution as described in https://arxiv.org/pdf/1511.07122v3.pdf to aggregate global information in dense prediction problems. Default value is 1. When set to value > 1, original kernel height, kH is dilated to
kH_Dilated = (kH-1)*dilationRateY + 1
by inserting d-1 rows of zeros between consecutive row of the original kernel. The kernel is centered based on kH_Dilated.
Sourcepub unsafe fn setDilationRateY(&self, dilation_rate_y: NSUInteger)
pub unsafe fn setDilationRateY(&self, dilation_rate_y: NSUInteger)
Setter for dilationRateY.
Sourcepub unsafe fn fusedNeuronDescriptor(&self) -> Retained<MPSNNNeuronDescriptor>
Available on crate feature MPSCNNNeuron only.
pub unsafe fn fusedNeuronDescriptor(&self) -> Retained<MPSNNNeuronDescriptor>
MPSCNNNeuron only.This mathod can be used to add a neuron activation funtion of given type with associated scalar parameters A and B that are shared across all output channels. Neuron activation fucntion is applied to output of convolution. This is a per-pixel operation that is fused with convolution kernel itself for best performance. Note that this method can only be used to fuse neuron of kind for which parameters A and B are shared across all channels of convoution output. It is an error to call this method for neuron activation functions like MPSCNNNeuronTypePReLU, which require per-channel parameter values. For those kind of neuron activation functions, use appropriate setter functions. Default is descriptor with neuronType MPSCNNNeuronTypeNone.
Note: in certain cases the neuron descriptor will be cached by the MPSNNGraph or the MPSCNNConvolution. If the neuron type changes after either is made, behavior is undefined.
Sourcepub unsafe fn setFusedNeuronDescriptor(
&self,
fused_neuron_descriptor: &MPSNNNeuronDescriptor,
)
Available on crate feature MPSCNNNeuron only.
pub unsafe fn setFusedNeuronDescriptor( &self, fused_neuron_descriptor: &MPSNNNeuronDescriptor, )
MPSCNNNeuron only.Setter for fusedNeuronDescriptor.
Sourcepub unsafe fn neuron(&self) -> Option<Retained<MPSCNNNeuron>>
👎DeprecatedAvailable on crate features MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.
pub unsafe fn neuron(&self) -> Option<Retained<MPSCNNNeuron>>
MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.MPSCNNNeuron filter to be applied as part of convolution. This is applied after BatchNormalization in the end. Default is nil. This is deprecated. You dont need to create MPSCNNNeuron object to fuse with convolution. Use neuron properties in this descriptor.
Sourcepub unsafe fn setNeuron(&self, neuron: Option<&MPSCNNNeuron>)
👎DeprecatedAvailable on crate features MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.
pub unsafe fn setNeuron(&self, neuron: Option<&MPSCNNNeuron>)
MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.Setter for neuron.
Sourcepub unsafe fn encodeWithCoder(&self, a_coder: &NSCoder)
pub unsafe fn encodeWithCoder(&self, a_coder: &NSCoder)
Sourcepub unsafe fn setBatchNormalizationParametersForInferenceWithMean_variance_gamma_beta_epsilon(
&self,
mean: *const c_float,
variance: *const c_float,
gamma: *const c_float,
beta: *const c_float,
epsilon: c_float,
)
pub unsafe fn setBatchNormalizationParametersForInferenceWithMean_variance_gamma_beta_epsilon( &self, mean: *const c_float, variance: *const c_float, gamma: *const c_float, beta: *const c_float, epsilon: c_float, )
Adds batch normalization for inference, it copies all the float arrays provided, expecting outputFeatureChannels elements in each.
This method will be used to pass in batch normalization parameters to the convolution during the init call. For inference we modify weights and bias going in convolution or Fully Connected layer to combine and optimize the layers.
w: weights for a corresponding output feature channel b: bias for a corresponding output feature channel W: batch normalized weights for a corresponding output feature channel B: batch normalized bias for a corresponding output feature channel
I = gamma / sqrt(variance + epsilon), J = beta - ( I * mean )
W = w * I B = b * I + J
Every convolution has (OutputFeatureChannel * kernelWidth * kernelHeight * InputFeatureChannel) weights
I, J are calculated, for every output feature channel separately to get the corresponding weights and bias Thus, I, J are calculated and then used for every (kernelWidth * kernelHeight * InputFeatureChannel) weights, and this is done OutputFeatureChannel number of times for each output channel.
thus, internally, batch normalized weights are computed as:
W[no][i][j][ni] = w[no][i][j][ni] * I[no]
no: index into outputFeatureChannel i : index into kernel Height j : index into kernel Width ni: index into inputFeatureChannel
One usually doesn’t see a bias term and batch normalization together as batch normalization potentially cancels out the bias term after training, but in MPS if the user provides it, batch normalization will use the above formula to incorporate it, if user does not have bias terms then put a float array of zeroes in the convolution init for bias terms of each output feature channel.
this comes from: https://arxiv.org/pdf/1502.03167v3.pdf
Note: in certain cases the batch normalization parameters will be cached by the MPSNNGraph or the MPSCNNConvolution. If the batch normalization parameters change after either is made, behavior is undefined.
Parameter mean: Pointer to an array of floats of mean for each output feature channel
Parameter variance: Pointer to an array of floats of variance for each output feature channel
Parameter gamma: Pointer to an array of floats of gamma for each output feature channel
Parameter beta: Pointer to an array of floats of beta for each output feature channel
Parameter epsilon: A small float value used to have numerical stability in the code
§Safety
meanmust be a valid pointer or null.variancemust be a valid pointer or null.gammamust be a valid pointer or null.betamust be a valid pointer or null.
Sourcepub unsafe fn setNeuronType_parameterA_parameterB(
&self,
neuron_type: MPSCNNNeuronType,
parameter_a: c_float,
parameter_b: c_float,
)
👎DeprecatedAvailable on crate feature MPSCNNNeuronType only.
pub unsafe fn setNeuronType_parameterA_parameterB( &self, neuron_type: MPSCNNNeuronType, parameter_a: c_float, parameter_b: c_float, )
MPSCNNNeuronType only.Adds a neuron activation function to convolution descriptor.
This mathod can be used to add a neuron activation funtion of given type with associated scalar parameters A and B that are shared across all output channels. Neuron activation fucntion is applied to output of convolution. This is a per-pixel operation that is fused with convolution kernel itself for best performance. Note that this method can only be used to fuse neuron of kind for which parameters A and B are shared across all channels of convoution output. It is an error to call this method for neuron activation functions like MPSCNNNeuronTypePReLU, which require per-channel parameter values. For those kind of neuron activation functions, use appropriate setter functions.
Note: in certain cases, the neuron descriptor will be cached by the MPSNNGraph or the MPSCNNConvolution. If the neuron type changes after either is made, behavior is undefined.
Parameter neuronType: type of neuron activation function. For full list see MPSCNNNeuronType.h
Parameter parameterA: parameterA of neuron activation that is shared across all channels of convolution output.
Parameter parameterB: parameterB of neuron activation that is shared across all channels of convolution output.
Sourcepub unsafe fn neuronType(&self) -> MPSCNNNeuronType
👎DeprecatedAvailable on crate feature MPSCNNNeuronType only.
pub unsafe fn neuronType(&self) -> MPSCNNNeuronType
MPSCNNNeuronType only.Getter funtion for neuronType set using setNeuronType:parameterA:parameterB method
Sourcepub unsafe fn neuronParameterA(&self) -> c_float
👎Deprecated
pub unsafe fn neuronParameterA(&self) -> c_float
Getter funtion for neuronType set using setNeuronType:parameterA:parameterB method
Sourcepub unsafe fn neuronParameterB(&self) -> c_float
👎Deprecated
pub unsafe fn neuronParameterB(&self) -> c_float
Getter funtion for neuronType set using setNeuronType:parameterA:parameterB method
Sourcepub unsafe fn setNeuronToPReLUWithParametersA(&self, a: &NSData)
👎Deprecated
pub unsafe fn setNeuronToPReLUWithParametersA(&self, a: &NSData)
Add per-channel neuron parameters A for PReLu neuron activation functions.
This method sets the neuron to PReLU, zeros parameters A and B and sets the per-channel neuron parameters A to an array containing a unique value of A for each output feature channel.
If the neuron function is f(v,a,b), it will apply
OutputImage(x,y,i) = f( ConvolutionResult(x,y,i), A[i], B[i] ) where i in [0,outputFeatureChannels-1]
See https://arxiv.org/pdf/1502.01852.pdf for details.
All other neuron types, where parameter A and parameter B are shared across channels must be set using -setNeuronOfType:parameterA:parameterB:
If batch normalization parameters are set, batch normalization will occur before neuron application i.e. output of convolution is first batch normalized followed by neuron activation. This function automatically sets neuronType to MPSCNNNeuronTypePReLU.
Note: in certain cases the neuron descriptor will be cached by the MPSNNGraph or the MPSCNNConvolution. If the neuron type changes after either is made, behavior is undefined.
Parameter A: An array containing per-channel float values for neuron parameter A.
Number of entries must be equal to outputFeatureChannels.
Methods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Panics
May panic if the object is invalid (which may be the case for objects
returned from unavailable init/new methods).
§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
this is difficult to use correctly, use Ivar::load instead.
Use Ivar::load instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
Attempt to downcast the object to a class of type T.
This is the reference-variant. Use Retained::downcast if you want
to convert a retained object to another type.
§Mutable classes
Some classes have immutable and mutable variants, such as NSString
and NSMutableString.
When some Objective-C API signature says it gives you an immutable class, it generally expects you to not mutate that, even though it may technically be mutable “under the hood”.
So using this method to convert a NSString to a NSMutableString,
while not unsound, is generally frowned upon unless you created the
string yourself, or the API explicitly documents the string to be
mutable.
See Apple’s documentation on mutability and on
isKindOfClass: for more details.
§Generic classes
Objective-C generics are called “lightweight generics”, and that’s because they aren’t exposed in the runtime. This makes it impossible to safely downcast to generic collections, so this is disallowed by this method.
You can, however, safely downcast to generic collections where all the
type-parameters are AnyObject.
§Panics
This works internally by calling isKindOfClass:. That means that the
object must have the instance method of that name, and an exception
will be thrown (if CoreFoundation is linked) or the process will abort
if that is not the case. In the vast majority of cases, you don’t need
to worry about this, since both root objects NSObject and
NSProxy implement this method.
§Examples
Cast an NSString back and forth from NSObject.
use objc2::rc::Retained;
use objc2_foundation::{NSObject, NSString};
let obj: Retained<NSObject> = NSString::new().into_super();
let string = obj.downcast_ref::<NSString>().unwrap();
// Or with `downcast`, if we do not need the object afterwards
let string = obj.downcast::<NSString>().unwrap();Try (and fail) to cast an NSObject to an NSString.
use objc2_foundation::{NSObject, NSString};
let obj = NSObject::new();
assert!(obj.downcast_ref::<NSString>().is_none());Try to cast to an array of strings.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
// This is invalid and doesn't type check.
let arr = arr.downcast_ref::<NSArray<NSString>>();This fails to compile, since it would require enumerating over the array to ensure that each element is of the desired type, which is a performance pitfall.
Downcast when processing each element instead.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
for elem in arr {
if let Some(data) = elem.downcast_ref::<NSString>() {
// handle `data`
}
}Trait Implementations§
Source§impl AsRef<MPSCNNConvolutionDescriptor> for MPSCNNSubPixelConvolutionDescriptor
impl AsRef<MPSCNNConvolutionDescriptor> for MPSCNNSubPixelConvolutionDescriptor
Source§fn as_ref(&self) -> &MPSCNNConvolutionDescriptor
fn as_ref(&self) -> &MPSCNNConvolutionDescriptor
Source§impl Borrow<MPSCNNConvolutionDescriptor> for MPSCNNSubPixelConvolutionDescriptor
impl Borrow<MPSCNNConvolutionDescriptor> for MPSCNNSubPixelConvolutionDescriptor
Source§fn borrow(&self) -> &MPSCNNConvolutionDescriptor
fn borrow(&self) -> &MPSCNNConvolutionDescriptor
Source§impl ClassType for MPSCNNSubPixelConvolutionDescriptor
impl ClassType for MPSCNNSubPixelConvolutionDescriptor
Source§const NAME: &'static str = "MPSCNNSubPixelConvolutionDescriptor"
const NAME: &'static str = "MPSCNNSubPixelConvolutionDescriptor"
Source§type Super = MPSCNNConvolutionDescriptor
type Super = MPSCNNConvolutionDescriptor
Source§type ThreadKind = <<MPSCNNSubPixelConvolutionDescriptor as ClassType>::Super as ClassType>::ThreadKind
type ThreadKind = <<MPSCNNSubPixelConvolutionDescriptor as ClassType>::Super as ClassType>::ThreadKind
Source§impl CopyingHelper for MPSCNNSubPixelConvolutionDescriptor
impl CopyingHelper for MPSCNNSubPixelConvolutionDescriptor
Source§type Result = MPSCNNSubPixelConvolutionDescriptor
type Result = MPSCNNSubPixelConvolutionDescriptor
Self if the type has no
immutable counterpart. Read moreSource§impl NSCoding for MPSCNNSubPixelConvolutionDescriptor
impl NSCoding for MPSCNNSubPixelConvolutionDescriptor
Source§unsafe fn encodeWithCoder(&self, coder: &NSCoder)
unsafe fn encodeWithCoder(&self, coder: &NSCoder)
NSCoder only.Source§impl NSCopying for MPSCNNSubPixelConvolutionDescriptor
impl NSCopying for MPSCNNSubPixelConvolutionDescriptor
Source§impl NSObjectProtocol for MPSCNNSubPixelConvolutionDescriptor
impl NSObjectProtocol for MPSCNNSubPixelConvolutionDescriptor
Source§fn isEqual(&self, other: Option<&AnyObject>) -> bool
fn isEqual(&self, other: Option<&AnyObject>) -> bool
Source§fn hash(&self) -> usize
fn hash(&self) -> usize
Source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
use isKindOfClass directly, or cast your objects with AnyObject::downcast_ref