Class MPSNDArrayMultiaryBase

    • Constructor Detail

      • MPSNDArrayMultiaryBase

        protected MPSNDArrayMultiaryBase​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • copyWithZoneDevice

        public java.lang.Object copyWithZoneDevice​(org.moe.natj.general.ptr.VoidPtr zone,
                                                   MTLDevice device)
        Create a copy with
        Overrides:
        copyWithZoneDevice in class MPSKernel
        Parameters:
        zone - The NSZone in which to allocate the MPSNDArrayMultiaryKernel object
        device - The device on which the new kernel will run. Pass nil for same device.
        Returns:
        A valid MPSNDArrayMultiaryKernel, or nil if allocation failure.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • destinationArrayAllocator

        public MPSNDArrayAllocator destinationArrayAllocator()
        Method to allocate the result image for -encodeToCommandBuffer:sourceImage: Default: MPSTemporaryImage.defaultAllocator
      • destinationArrayDescriptorForSourceArraysSourceState

        public MPSNDArrayDescriptor destinationArrayDescriptorForSourceArraysSourceState​(NSArray<? extends MPSNDArray> sources,
                                                                                         MPSState state)
        Return a descriptor suitable for allocating a NSArray to receive the result The object properties (kernelSize, offsets, edgeMode, etc.) should be properly configured as if the -encode call was about to be made, before this method is called. Those properties may affect the results.
        Parameters:
        sources - The list of sources passed into the -encode call
        state - The source state object, if any passed to the -encode call
        Returns:
        a valid MPSNDArrayDescriptor that may be used to create a MPSNDArray to used to hold the results of this kernel.
      • dilationRatesForSourceIndex

        public MPSNDArraySizes dilationRatesForSourceIndex​(long sourceIndex)
        Get the kernel dilation rate for each dimension
        Parameters:
        sourceIndex - The index of the source image for which this applies
        Returns:
        The kernel dilation rate for each dimension.
      • edgeModeAtSourceIndex

        public long edgeModeAtSourceIndex​(long sourceIndex)
        The edge mode used for each source NDArray
        Parameters:
        sourceIndex - The index of the source image
        Returns:
        The MPSImageEdgeMode for that image
      • encodeWithCoder

        public void encodeWithCoder​(NSCoder coder)
        Initialize a MPSNDArrayMultiaryKernel from a NSCoder
        Specified by:
        encodeWithCoder in interface NSCoding
        Overrides:
        encodeWithCoder in class MPSKernel
        Parameters:
        coder - The NSCoder that contains the serialized object
      • hash_static

        public static long hash_static()
      • initWithCoderDevice

        public MPSNDArrayMultiaryBase initWithCoderDevice​(NSCoder coder,
                                                          java.lang.Object device)
        Initialize a MPSNDArrayMultiaryKernel from a NSCoder
        Overrides:
        initWithCoderDevice in class MPSKernel
        Parameters:
        coder - The NSCoder that contains the serialized object
        device - The device on which the kernel will run
        Returns:
        A valid MPSNDArrayMultiaryKernel, or nil if allocation failure.
      • initWithDevice

        public MPSNDArrayMultiaryBase initWithDevice​(java.lang.Object device)
        Description copied from class: MPSKernel
        Standard init with default properties per filter type
        Overrides:
        initWithDevice in class MPSKernel
        Parameters:
        device - The device that the filter will be used on. May not be NULL.
        Returns:
        a pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.
      • initWithDeviceSourceCount

        public MPSNDArrayMultiaryBase initWithDeviceSourceCount​(MTLDevice device,
                                                                long count)
        Initialize a MPSNDArrayMultiaryKernel
        Parameters:
        device - The device on which the kernel will run
        count - The maximum number of NDArrays read by the kernel
        Returns:
        A valid MPSNDArrayMultiaryKernel, or nil if allocation failure.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • kernelSizesForSourceIndex

        public MPSNDArraySizes kernelSizesForSourceIndex​(long sourceIndex)
        Get the diameters of the point spread function (PSF) in each dimension
        Parameters:
        sourceIndex - The MPSNDArrayMultiaryKernel source NDArray to which the kernel will be applied
        Returns:
        A list of kernel diameters in each dimension
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • offsetsAtSourceIndex

        public MPSNDArrayOffsets offsetsAtSourceIndex​(long sourceIndex)
        Read offsets to use when addressing a source NDArray The coordinate of the position read from this source array which is used to calculate the result value at [0,0,0,....] If the position read is actually a contiguous region (e.g. the area covered by a convolution kernel) then this is the center of that region, rounded down, for each dimension.
        Parameters:
        sourceIndex - The index of the source MPSNDArray to which the list of offsets is applied
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • resultStateForSourceArraysSourceStatesDestinationArray

        public MPSState resultStateForSourceArraysSourceStatesDestinationArray​(NSArray<? extends MPSNDArray> sourceArrays,
                                                                               NSArray<? extends MPSState> sourceStates,
                                                                               MPSNDArray destinationArray)
      • setDestinationArrayAllocator

        public void setDestinationArrayAllocator​(MPSNDArrayAllocator value)
        Method to allocate the result image for -encodeToCommandBuffer:sourceImage: Default: MPSTemporaryImage.defaultAllocator
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • stridesForSourceIndex

        public MPSNDArrayOffsets stridesForSourceIndex​(long sourceIndex)
        Return the downsampling ratio for the kernel in each dimension If the filter is a "backwards" filter such as a gradient filter or convolution transpose, then this is the upsampling ratio and zeros are inserted in the result.
        Parameters:
        sourceIndex - The index of the source for which the strides apply
        Returns:
        The strides from one destination sample to the next in each dimension of the corresponding source NDArray
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class MPSKernel
      • version_static

        public static long version_static()