Class MPSGraphTensorData

  • All Implemented Interfaces:
    NSObject

    public class MPSGraphTensorData
    extends MPSGraphObject
    Representation of a compute datatype MPSGraphTensorData is how we pass data to an MPSGraph, a reference will be taken to your data and used just in time when MPSGraph is run. API-Since: 14.0
    • Constructor Detail

      • MPSGraphTensorData

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static MPSGraphTensorData allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • 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()
      • dataType

        public int dataType()
        dataType of the tensorData
      • debugDescription_static

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

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

        @NotNull
        public @NotNull MPSGraphDevice device()
        device of the tensorData
      • hash_static

        public static long hash_static()
      • initWithMPSMatrix

        public MPSGraphTensorData initWithMPSMatrix​(@NotNull
                                                    @NotNull MPSMatrix matrix)
        Initialize an MPSGraphTensorData with an MPSMatrix The device of the MPSMatrix will be used to get the MPSDevice for this MPSGraphTensorData. - Parameters: - matrix: MPSMatrix to be used within the MPSGraphTensorData - Returns: A valid MPSGraphTensorData, or nil if allocation failure.
      • initWithMPSMatrixRank

        public MPSGraphTensorData initWithMPSMatrixRank​(@NotNull
                                                        @NotNull MPSMatrix matrix,
                                                        long rank)
        Initialize an MPSGraphTensorData with an MPSMatrix enforcing rank of the result. The device of the MPSMatrix will be used to get the MPSDevice for this MPSGraphTensorData. - Parameters: - matrix: MPSMatrix to be used within the MPSGraphTensorData - rank: The rank of the resulting TensorData tensor. NOTE: must be within { 1, ... ,16 }. - Returns: A valid MPSGraphTensorData of given rank, or nil if allocation failure.
      • initWithMPSNDArray

        public MPSGraphTensorData initWithMPSNDArray​(@NotNull
                                                     @NotNull MPSNDArray ndarray)
        Initialize an MPSGraphTensorData with an MPSNDArray The device of the MPSNDArray will be used to get the MPSDevice for this MPSGraphTensorData. - Parameters: - ndarray: MPSNDArray to be used within the MPSGraphTensorData - Returns: A valid MPSGraphTensorData, or nil if allocation failure.
      • initWithMPSVector

        public MPSGraphTensorData initWithMPSVector​(@NotNull
                                                    @NotNull MPSVector vector)
        Initialize an MPSGraphTensorData with an MPSVector The device of the MPSVector will be used to get the MPSDevice for this MPSGraphTensorData. - Parameters: - vector: MPSVector to be used within the MPSGraphTensorData - Returns: A valid MPSGraphTensorData, or nil if allocation failure.
      • initWithMPSVectorRank

        public MPSGraphTensorData initWithMPSVectorRank​(@NotNull
                                                        @NotNull MPSVector vector,
                                                        long rank)
        Initialize an MPSGraphTensorData with an MPSVector enforcing rank of the result. The device of the MPSVector will be used to get the MPSDevice for this MPSGraphTensorData. - Parameters: - vector: MPSVector to be used within the MPSGraphTensorData - rank: The rank of the resulting TensorData tensor. NOTE: must be within { 1, ... ,16 }. - Returns: A valid MPSGraphTensorData, 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)
      • keyPathsForValuesAffectingValueForKey

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

        @NotNull
        public @NotNull MPSNDArray mpsndarray()
        Return an mpsndarray object will copy contents if the contents are not stored in an MPSNDArray - Returns: A valid MPSNDArray, or nil if allocation fails.
      • resolveClassMethod

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

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • 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.