Class MPSMatrixDescriptor

  • All Implemented Interfaces:
    NSObject

    public class MPSMatrixDescriptor
    extends NSObject
    MPSMatrixDescriptor [@dependency] This depends on Metal.framework A MPSMatrixDescriptor describes the sizes, strides, and data type of a an array of 2-dimensional matrices. All storage is assumed to be in "matrix-major". See the description for MPSMatrix for further details.
    • Constructor Detail

      • MPSMatrixDescriptor

        protected MPSMatrixDescriptor​(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()
      • 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)
      • matrixDescriptorWithDimensionsColumnsRowBytesDataType

        public static MPSMatrixDescriptor matrixDescriptorWithDimensionsColumnsRowBytesDataType​(long rows,
                                                                                                long columns,
                                                                                                long rowBytes,
                                                                                                int dataType)
        Create a MPSMatrixDescriptor with the specified dimensions and data type. For performance considerations the optimal row stride may not necessarily be equal to the number of columns in the matrix. The MPSMatrix class provides a method which may be used to determine this value, see the rowBytesForColumns API in the MPSMatrix class. The number of matrices described is initialized to 1.
        Parameters:
        rows - The number of rows of the matrix.
        columns - The number of columns of the matrix.
        rowBytes - The number of bytes between starting elements of consecutive rows. Must be a multiple of the element size.
        dataType - The type of the data to be stored in the matrix.
      • 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)
      • rowBytesFromColumnsDataType

        public static long rowBytesFromColumnsDataType​(long columns,
                                                       int dataType)
        Return the recommended row stride, in bytes, for a given number of columns. To achieve best performance the optimal stride between rows of a matrix is not necessarily equivalent to the number of columns. This method returns the row stride, in bytes, which gives best performance for a given number of columns. Using this row stride to construct your array is recommended, but not required (provided that the stride used is still large enough to allocate a full row of data).
        Parameters:
        columns - The number of columns in the matrix for which the recommended row stride, in bytes, is to be determined.
        dataType - The type of matrix data values.
      • 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()
      • columns

        public long columns()
        [@property] columns The number of columns in a matrix.
      • dataType

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

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

        public long rows()
        [@property] rows The number of rows in a matrix.
      • setColumns

        public void setColumns​(long value)
        [@property] columns The number of columns in a matrix.
      • setDataType

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

        public void setRowBytes​(long value)
        [@property] rowBytes The stride, in bytes, between corresponding elements of consecutive rows. Must be a multiple of the element size.
      • setRows

        public void setRows​(long value)
        [@property] rows The number of rows in a matrix.
      • matrices

        public long matrices()
        [@property] matrices The number of matrices.
      • matrixBytes

        public long matrixBytes()
        [@property] matrixBytes The stride, in bytes, between corresponding elements of consecutive matrices. Must be a multiple of rowBytes.
      • matrixDescriptorWithRowsColumnsMatricesRowBytesMatrixBytesDataType

        public static MPSMatrixDescriptor matrixDescriptorWithRowsColumnsMatricesRowBytesMatrixBytesDataType​(long rows,
                                                                                                             long columns,
                                                                                                             long matrices,
                                                                                                             long rowBytes,
                                                                                                             long matrixBytes,
                                                                                                             int dataType)
        Create a MPSMatrixDescriptor with the specified dimensions and data type. For performance considerations the optimal row stride may not necessarily be equal to the number of columns in the matrix. The MPSMatrix class provides a method which may be used to determine this value, see the rowBytesForColumns API in the MPSMatrix class.
        Parameters:
        rows - The number of rows of a single matrix.
        columns - The number of columns of a single matrix.
        matrices - The number of matrices in the MPSMatrix object.
        rowBytes - The number of bytes between starting elements of consecutive rows. Must be a multiple of the element size.
        matrixBytes - The number of bytes between starting elements of consecutive matrices. Must be a multiple of rowBytes.
        dataType - The type of the data to be stored in the matrix.
      • matrixDescriptorWithRowsColumnsRowBytesDataType

        public static MPSMatrixDescriptor matrixDescriptorWithRowsColumnsRowBytesDataType​(long rows,
                                                                                          long columns,
                                                                                          long rowBytes,
                                                                                          int dataType)
      • rowBytesForColumnsDataType

        public static long rowBytesForColumnsDataType​(long columns,
                                                      int dataType)