.TH "MPSVectorDescriptor" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSVectorDescriptor .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits NSObject\&. .SS "Class Methods" .in +1c .ti -1c .RI "(__nonnull instancetype) + \fBvectorDescriptorWithLength:dataType:\fP" .br .ti -1c .RI "(__nonnull instancetype) + \fBvectorDescriptorWithLength:vectors:vectorBytes:dataType:\fP" .br .ti -1c .RI "(size_t) + \fBvectorBytesForLength:dataType:\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "NSUInteger \fBlength\fP" .br .ti -1c .RI "NSUInteger \fBvectors\fP" .br .ti -1c .RI "\fBMPSDataType\fP \fBdataType\fP" .br .ti -1c .RI "NSUInteger \fBvectorBytes\fP" .br .in -1c .SH "Detailed Description" .PP This depends on Metal\&.framework .PP \fBA\fP \fBMPSVectorDescriptor\fP describes the length and data type of a an array of 1-dimensional vectors\&. All vectors are stored as contiguous arrays of data\&. .SH "Method Documentation" .PP .SS "+ (size_t) vectorBytesForLength: (NSUInteger) length(\fBMPSDataType\fP) dataType" Return the recommended stride, in bytes, to be used for an array of vectors of a given length\&. .PP \fBParameters:\fP .RS 4 \fIlength\fP The number of elements in a single vector\&. .br \fIdataType\fP The type of vector data values\&. .RE .PP 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\&. .br 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)\&. .SS "+ (__nonnull instancetype) vectorDescriptorWithLength: (NSUInteger) length(\fBMPSDataType\fP) dataType" Create a \fBMPSVectorDescriptor\fP with the specified length and data type\&. .PP \fBParameters:\fP .RS 4 \fIlength\fP The number of elements in a single vector\&. .br \fIdataType\fP The type of the data to be stored in the vector\&. .RE .PP Use this function for creating a descriptor of a \fBMPSVector\fP object containing a single vector\&. .SS "+ (__nonnull instancetype) vectorDescriptorWithLength: (NSUInteger) length(NSUInteger) vectors(NSUInteger) vectorBytes(\fBMPSDataType\fP) dataType" Create a \fBMPSVectorDescriptor\fP with the specified length and data type\&. .PP \fBParameters:\fP .RS 4 \fIlength\fP The number of elements in a single vector\&. .br \fIvectors\fP The number of vectors in the \fBMPSVector\fP object\&. .br \fIvectorBytes\fP The number of bytes between starting elements of consecutive vectors\&. .br \fIdataType\fP The type of the data to be stored in the vector\&. .RE .PP For performance considerations the optimal stride between vectors may not necessarily be equal to the vector length\&. The \fBMPSVectorDescriptor\fP class provides a method which may be used to determine this value, see the vectorBytesForLength API\&. .SH "Property Documentation" .PP .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 vector\&. .SS "\- length\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The number of elements in the vector\&. .SS "\- vectorBytes\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The stride, in bytes, between corresponding elements of consecutive vectors\&. Must be a multiple of the element size .SS "\- vectors\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The number of vectors\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.