Class MPSImageCopyToMatrix

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject

    public class MPSImageCopyToMatrix
    extends MPSKernel
    MPSImageCopyToMatrix The MPSImageCopyToMatrix copies image data to a MPSMatrix. The image data is stored in a row of a matrix. The dataLayout specifies the order in which the feature channels in the MPSImage get stored in the matrix. If MPSImage stores a batch of images, the images are copied into multiple rows, one row per image. The number of elements in a row in the matrix must be >= image width * image height * number of featureChannels in the image.
    • Constructor Detail

      • MPSImageCopyToMatrix

        protected MPSImageCopyToMatrix​(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()
      • dataLayout

        public long dataLayout()
        [@property] dataLayout The data layout to use Returns the data layout. When copying from a MPSImage to a MPSMatrix, this describes the order in which the image values are stored in the buffer associated with the MPSMatrix. Default: MPSDataLayoutFeatureChannelsxHeightxWidth
      • debugDescription_static

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

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

        public long destinationMatrixBatchIndex()
        [@property] destinationMatrixBatchIndex The index of the destination matrix in the batch. This property is modifiable and defaults to 0 at initialization time.
      • destinationMatrixOrigin

        public MTLOrigin destinationMatrixOrigin()
        [@property] destinationMatrixOrigin The origin, relative to [0, 0] in the destination matrix, at which to start writing results. This property is modifiable and defaults to [0, 0] at initialization time. If a different origin is desired then this should be modified prior to encoding the kernel. The z value must be 0.
      • encodeToCommandBufferSourceImageDestinationMatrix

        public void encodeToCommandBufferSourceImageDestinationMatrix​(MTLCommandBuffer commandBuffer,
                                                                      MPSImage sourceImage,
                                                                      MPSMatrix destinationMatrix)
        Encode a kernel that copies a MPSImage to a MPSMatrix into a command buffer using a MTLComputeCommandEncoder. The kernel copies feature channels from sourceImage to the buffer associated with destinationMatrix. The kernel will not begin to execute until after the command buffer has been enqueued and committed. NOTE: The destinationMatrix.dataType must match the feature channel data type in sourceImage.
        Parameters:
        commandBuffer - A valid MTLCommandBuffer.
        sourceImage - A valid MPSImage describing the image to copy from.
        destinationMatrix - A valid MPSMatrix or MPSTemporaryMatrix object describing the matrix to copy to.
      • hash_static

        public static long hash_static()
      • initWithCoderDevice

        public MPSImageCopyToMatrix initWithCoderDevice​(NSCoder aDecoder,
                                                        java.lang.Object device)
        NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead.
        Overrides:
        initWithCoderDevice in class MPSKernel
        Parameters:
        aDecoder - The NSCoder subclass with your serialized MPSKernel
        device - The MTLDevice on which to make the MPSKernel
        Returns:
        A new MPSKernel object, or nil if failure.
      • initWithDevice

        public MPSImageCopyToMatrix 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.
      • initWithDeviceDataLayout

        public MPSImageCopyToMatrix initWithDeviceDataLayout​(MTLDevice device,
                                                             long dataLayout)
        Initialize a MPSMatrixCopy object on a device
        Parameters:
        device - The device the kernel will run on
        dataLayout - The data layout
        Returns:
        A valid MPSMatrixCopy object or nil, if 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)
      • keyPathsForValuesAffectingValueForKey

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

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

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

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

        public void setDestinationMatrixBatchIndex​(long value)
        [@property] destinationMatrixBatchIndex The index of the destination matrix in the batch. This property is modifiable and defaults to 0 at initialization time.
      • setDestinationMatrixOrigin

        public void setDestinationMatrixOrigin​(MTLOrigin value)
        [@property] destinationMatrixOrigin The origin, relative to [0, 0] in the destination matrix, at which to start writing results. This property is modifiable and defaults to [0, 0] at initialization time. If a different origin is desired then this should be modified prior to encoding the kernel. The z value must be 0.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • 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()