.TH "MPSMatrixDescriptor" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSMatrixDescriptor .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits NSObject\&. .SS "Class Methods" .in +1c .ti -1c .RI "(__nonnull instancetype) + \fBmatrixDescriptorWithDimensions:columns:rowBytes:dataType:\fP" .br .ti -1c .RI "(__nonnull instancetype) + \fBmatrixDescriptorWithRows:columns:rowBytes:dataType:\fP" .br .ti -1c .RI "(__nonnull instancetype) + \fBmatrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:\fP" .br .ti -1c .RI "(size_t) + \fBrowBytesFromColumns:dataType:\fP" .br .ti -1c .RI "(size_t) + \fBrowBytesForColumns:dataType:\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "NSUInteger \fBrows\fP" .br .ti -1c .RI "NSUInteger \fBcolumns\fP" .br .ti -1c .RI "NSUInteger \fBmatrices\fP" .br .ti -1c .RI "\fBMPSDataType\fP \fBdataType\fP" .br .ti -1c .RI "NSUInteger \fBrowBytes\fP" .br .ti -1c .RI "NSUInteger \fBmatrixBytes\fP" .br .in -1c .SH "Detailed Description" .PP This depends on Metal\&.framework .PP \fBA\fP \fBMPSMatrixDescriptor\fP 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 \fBMPSMatrix\fP for further details\&. .SH "Method Documentation" .PP .SS "+ (__nonnull instancetype) matrixDescriptorWithDimensions: (NSUInteger) rows(NSUInteger) columns(NSUInteger) rowBytes(\fBMPSDataType\fP) dataType" Create a \fBMPSMatrixDescriptor\fP with the specified dimensions and data type\&. .PP \fBParameters:\fP .RS 4 \fIrows\fP The number of rows of the matrix\&. .br \fIcolumns\fP The number of columns of the matrix\&. .br \fIrowBytes\fP The number of bytes between starting elements of consecutive rows\&. Must be a multiple of the element size\&. .br \fIdataType\fP The type of the data to be stored in the matrix\&. .RE .PP For performance considerations the optimal row stride may not necessarily be equal to the number of columns in the matrix\&. The \fBMPSMatrix\fP class provides a method which may be used to determine this value, see the rowBytesForColumns API in the \fBMPSMatrix\fP class\&. The number of matrices described is initialized to 1\&. .SS "+ (__nonnull instancetype) matrixDescriptorWithRows: (NSUInteger) rows(NSUInteger) columns(NSUInteger) matrices(NSUInteger) rowBytes(NSUInteger) matrixBytes(\fBMPSDataType\fP) dataType" Create a \fBMPSMatrixDescriptor\fP with the specified dimensions and data type\&. .PP \fBParameters:\fP .RS 4 \fIrows\fP The number of rows of a single matrix\&. .br \fIcolumns\fP The number of columns of a single matrix\&. .br \fImatrices\fP The number of matrices in the \fBMPSMatrix\fP object\&. .br \fIrowBytes\fP The number of bytes between starting elements of consecutive rows\&. Must be a multiple of the element size\&. .br \fImatrixBytes\fP The number of bytes between starting elements of consecutive matrices\&. Must be a multiple of rowBytes\&. .br \fIdataType\fP The type of the data to be stored in the matrix\&. .RE .PP For performance considerations the optimal row stride may not necessarily be equal to the number of columns in the matrix\&. The \fBMPSMatrix\fP class provides a method which may be used to determine this value, see the rowBytesForColumns API in the \fBMPSMatrix\fP class\&. .SS "+ (__nonnull instancetype) matrixDescriptorWithRows: (NSUInteger) rows(NSUInteger) columns(NSUInteger) rowBytes(\fBMPSDataType\fP) dataType" .SS "+ (size_t) rowBytesForColumns: (NSUInteger) columns(\fBMPSDataType\fP) dataType" .SS "+ (size_t) rowBytesFromColumns: (NSUInteger) columns(\fBMPSDataType\fP) dataType" Return the recommended row stride, in bytes, for a given number of columns\&. .PP \fBParameters:\fP .RS 4 \fIcolumns\fP The number of columns in the matrix for which the recommended row stride, in bytes, is to be determined\&. .br \fIdataType\fP The type of matrix data values\&. .RE .PP 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)\&. .SH "Property Documentation" .PP .SS "\- columns\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The number of columns in a matrix\&. .SS "\- dataType\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The type of the data which makes up the values of the matrix\&. .SS "\- matrices\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The number of matrices\&. .SS "\- matrixBytes\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The stride, in bytes, between corresponding elements of consecutive matrices\&. Must be a multiple of rowBytes\&. .SS "\- rowBytes\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The stride, in bytes, between corresponding elements of consecutive rows\&. Must be a multiple of the element size\&. .SS "\- rows\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The number of rows in a matrix\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.