strides
An array of strides, in elements, one for each dimension in the tensors you create with this descriptor, if applicable.
Declaration
@NSCopying var strides: MTLTensorExtents? { get set }Discussion
You are responsible for ensuring strides meets the following requirements:
The first element of
stridesis one.If usage contains machineLearning, the second element of
stridesis aligned to 64 bytes, and for anyilarger than one,strides[i]is equal tostrides[i-1] * dimensions[i-1].If dataType is a sub-byte MTLTensorDataType, for any
igreater than or equal to 1,strides[i]is aligned to 128 bytes. This is not a requirement for non-sub-byte data types, but following this convention improves performance.
Only set this property when creating tensors from a buffer.