MPSVectorDescriptor(3) MetalPerformanceShaders.framework MPSVectorDescriptor(3)

MPSVectorDescriptor

#import <MPSMatrixTypes.h>

Inherits NSObject.


(__nonnull instancetype) + vectorDescriptorWithLength:dataType:
(__nonnull instancetype) + vectorDescriptorWithLength:vectors:vectorBytes:dataType:
(size_t) + vectorBytesForLength:dataType:


NSUInteger length
NSUInteger vectors
MPSDataType dataType
NSUInteger vectorBytes

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.

Return the recommended stride, in bytes, to be used for an array of vectors of a given length.

Parameters:

length The number of elements in a single vector.
dataType The type of vector data values.

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

Create a MPSVectorDescriptor with the specified length and data type.

Parameters:

length The number of elements in a single vector.
dataType The type of the data to be stored in the vector.

Use this function for creating a descriptor of a MPSVector object containing a single vector.

Create a MPSVectorDescriptor with the specified length and data type.

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.

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.

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

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

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

The number of elements in the vector.

- vectorBytes [read], [nonatomic], [assign]

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

- vectors [read], [nonatomic], [assign]

The number of vectors.

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

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3