Class MPSMatrixCopyDescriptor

  • All Implemented Interfaces:
    NSObject

    public class MPSMatrixCopyDescriptor
    extends NSObject
    A list of copy operations The MPSMatrixCopy filter can do multiple copy operations. For RNN filters, these copies are often small, and are more efficient when grouped together. The MPSMatriceCopyDescriptor provides a container to list the operations. The operations occur in any order, and may not alias. API-Since: 11.0
    • Constructor Detail

      • MPSMatrixCopyDescriptor

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

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

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

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

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

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

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

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

        public static MPSMatrixCopyDescriptor descriptorWithSourceMatrixDestinationMatrixOffsets​(@NotNull
                                                                                                 @NotNull MPSMatrix sourceMatrix,
                                                                                                 @NotNull
                                                                                                 @NotNull MPSMatrix destinationMatrix,
                                                                                                 MPSMatrixCopyOffsets offsets)
        convenience allocator for single copies API-Since: 11.0
      • hash_static

        public static long hash_static()
      • initWithDeviceCount

        public MPSMatrixCopyDescriptor initWithDeviceCount​(@NotNull
                                                           @NotNull MTLDevice device,
                                                           long count)
        initialize a MPSMatrixCopyDescriptor with default values. Use -setCopyOperationAtIndex:sourceMatrix:destinationMatrix:copyOffsets to initialize. All indices must be initialized before use.
        Parameters:
        device - The device on which the copy will be performed
        count - The number of copy operations the object will encode
        Returns:
        A MPSMatrixCopyDescriptor. It still needs to be initialized with -setCopyOperationAtIndex:sourceMatrix:destinationMatrix:copyOffsets API-Since: 11.0
      • initWithSourceMatricesDestinationMatricesOffsetVectorOffset

        public MPSMatrixCopyDescriptor initWithSourceMatricesDestinationMatricesOffsetVectorOffset​(@NotNull
                                                                                                   @NotNull NSArray<? extends MPSMatrix> sourceMatrices,
                                                                                                   @NotNull
                                                                                                   @NotNull NSArray<? extends MPSMatrix> destinationMatrices,
                                                                                                   @Nullable
                                                                                                   @Nullable MPSVector offsets,
                                                                                                   long byteOffset)
        Initialize a MPSMatrixCopyDescriptor using offsets generated on the GPU Use this method when the offsets needed are coming from GPU based computation.
        Parameters:
        sourceMatrices - A list of matrices from which the matrix data is read
        destinationMatrices - A list of matrices to which to write the data. The count must match the number of source matrices.
        offsets - A MPSVector of type MPSDataTypeUInt32 containing the list of offsets, stored as a packed array of MPSMatrixCopyOffsets.
        byteOffset - A byte offset into the offsets vector where the data starts in 'offsets'. This value must be a multiple of 16.
        Returns:
        A valid MPSMatrixCopyDescriptor to represent the list of copy operations API-Since: 11.0
      • 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

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

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

        public void setCopyOperationAtIndexSourceMatrixDestinationMatrixOffsets​(long index,
                                                                                @NotNull
                                                                                @NotNull MPSMatrix sourceMatrix,
                                                                                @NotNull
                                                                                @NotNull MPSMatrix destinationMatrix,
                                                                                MPSMatrixCopyOffsets offsets)
        Initialize a MPSMatrixCopyDescriptor using offsets generated on the CPU This is for one at a time intialization of the copy operations
        Parameters:
        index - The index of the copy operation
        sourceMatrix - The source matrix for this copy operation
        destinationMatrix - The destination matrix for this copy operation
        offsets - The offsets to use for the copy operation API-Since: 11.0
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.