MPSMatrixDescriptor(3) MetalPerformanceShaders.framework MPSMatrixDescriptor(3)

MPSMatrixDescriptor

#import <MPSMatrixTypes.h>

Inherits NSObject.


(__nonnull instancetype) + matrixDescriptorWithDimensions:columns:rowBytes:dataType:
(__nonnull instancetype) + matrixDescriptorWithRows:columns:rowBytes:dataType:
(__nonnull instancetype) + matrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:
(size_t) + rowBytesFromColumns:dataType:
(size_t) + rowBytesForColumns:dataType:


NSUInteger rows
NSUInteger columns
NSUInteger matrices
MPSDataType dataType
NSUInteger rowBytes
NSUInteger matrixBytes

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.

Create a MPSMatrixDescriptor with the specified dimensions and data type.

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.

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.

Create a MPSMatrixDescriptor with the specified dimensions and data type.

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.

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.

Return the recommended row stride, in bytes, for a given number of columns.

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.

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).

- columns [read], [write], [nonatomic], [assign]

The number of columns in a matrix.

- dataType [read], [write], [nonatomic], [assign]

The type of the data which makes up the values of the matrix.

- matrices [read], [nonatomic], [assign]

The number of matrices.

- matrixBytes [read], [nonatomic], [assign]

The stride, in bytes, between corresponding elements of consecutive matrices. Must be a multiple of rowBytes.

- rowBytes [read], [write], [nonatomic], [assign]

The stride, in bytes, between corresponding elements of consecutive rows. Must be a multiple of the element size.

- rows [read], [write], [nonatomic], [assign]

The number of rows in a matrix.

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3