Class MPSVectorDescriptor

  • All Implemented Interfaces:
    NSObject

    public class MPSVectorDescriptor
    extends NSObject
    MPSVectorDescriptor [@dependency] This depends on Metal.framework A MPSVectorDescriptor describes the length and data type of a an array of 1-dimensional vectors. All vectors are stored as contiguous arrays of data.
    • Constructor Detail

      • MPSVectorDescriptor

        protected MPSVectorDescriptor​(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()
      • dataType

        public int dataType()
        [@property] dataType The type of the data which makes up the values of the vector.
      • debugDescription_static

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

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

        public static long hash_static()
      • 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)
      • length

        public long length()
        [@property] length The number of elements in the vector.
      • 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)
      • setDataType

        public void setDataType​(int value)
        [@property] dataType The type of the data which makes up the values of the vector.
      • setLength

        public void setLength​(long value)
        [@property] length The number of elements in the vector.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public long vectorBytes()
        [@property] vectorBytes The stride, in bytes, between corresponding elements of consecutive vectors. Must be a multiple of the element size
      • vectorBytesForLengthDataType

        public static long vectorBytesForLengthDataType​(long length,
                                                        int dataType)
        Return the recommended stride, in bytes, to be used for an array of vectors of a given length. To achieve best performance the optimal stride between vectors within an array of vectors is not necessarily equivalent to the number of elements per vector. This method returns the stride, in bytes, which gives best performance for a given vector length. Using this stride to construct your array is recommended, but not required (provided that the stride used is still large enough to allocate a full vector of data).
        Parameters:
        length - The number of elements in a single vector.
        dataType - The type of vector data values.
      • vectorDescriptorWithLengthDataType

        public static MPSVectorDescriptor vectorDescriptorWithLengthDataType​(long length,
                                                                             int dataType)
        Create a MPSVectorDescriptor with the specified length and data type. Use this function for creating a descriptor of a MPSVector object containing a single vector.
        Parameters:
        length - The number of elements in a single vector.
        dataType - The type of the data to be stored in the vector.
      • vectorDescriptorWithLengthVectorsVectorBytesDataType

        public static MPSVectorDescriptor vectorDescriptorWithLengthVectorsVectorBytesDataType​(long length,
                                                                                               long vectors,
                                                                                               long vectorBytes,
                                                                                               int dataType)
        Create a MPSVectorDescriptor with the specified length and data type. For performance considerations the optimal stride between vectors may not necessarily be equal to the vector length. The MPSVectorDescriptor class provides a method which may be used to determine this value, see the vectorBytesForLength API.
        Parameters:
        length - The number of elements in a single vector.
        vectors - The number of vectors in the MPSVector object.
        vectorBytes - The number of bytes between starting elements of consecutive vectors.
        dataType - The type of the data to be stored in the vector.
      • vectors

        public long vectors()
        [@property] vectors The number of vectors.
      • version_static

        public static long version_static()