batchStride
TypeScriptget batchStride(): numberSwift declarationvar batchStride: Int { get }The increment, in values, between each batch of values.
enum · iOS 14.0+ · SDK 27.1
enum ShapeAn enumeration that describes the number of dimensions, the length of each dimension, the data layout, and the stride of an n-dimensional array.
get batchStride(): numberSwift declarationvar batchStride: Int { get }The increment, in values, between each batch of values.
get rank(): numberSwift declarationvar rank: Int { get }The number of dimensions.
get size(): [number, number, number, number, number, number, number, number]Swift declarationvar size: (Int, Int, Int, Int, Int, Int, Int, Int) { get }The size of each dimension.
get layout(): BNNSDataLayoutSwift declarationvar layout: BNNSDataLayout { get }The data layout.
get stride(): [number, number, number, number, number, number, number, number]Swift declarationvar stride: (Int, Int, Int, Int, Int, Int, Int, Int) { get }The stride of each dimension.
static init(size: Array<number>, dataLayout?: (BNNS_DataLayout) | null, stride?: (Array<number>) | null): BNNS_ShapeSwift declarationinit(_ size: [Int], dataLayout: BNNS.DataLayout? = nil, stride: [Int]? = nil)Creates a new shape from the specified size, layout and stride. - Parameter size: An array specifying the number of values in each dimension. - Parameter dataLayout: The dimension of the array, and how the data is stored. - Parameter stride: An array specifying the increment, in values, between a value and the next in each dimension. When `nil`, `stride` is initialized with zeros of count `rank`, indicating that values are contiguous for all axes. Pass `nil` to `dataLayout` to have `Shape.init(size:dataLayout:stride:)` return a shape with the default data layout for the dimension count that's equal to the number of elements in the `size` array. The default layouts for each dimensionality are: * 1D: `.vector` * 2D: `.matrixFirstMajor` * 3D: `.tensor3DFirstMajor` * 4D: `.tensor4DFirstMajor` * 5D: `.tensor5DFirstMajor` * 6D: `.tensor6DFirstMajor` * 7D: `.tensor7DFirstMajor` * 8D: `.tensor8DFirstMajor` A stride value of 0 is interpreted to mean that values are contiguous for that axis.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
BNNS.Shape.init(arrayLiteral:)
A variable number of Swift arguments is not supported.