init
TypeScriptstatic init(startIndex: number, endIndex: number): BNNSGraph_Builder_SliceRangeSwift declarationinit(startIndex: Int = 0, endIndex: Int)Returns a new slice range structure.
struct · iOS 26.0+ · SDK 27.1
struct SliceRangeA structure that represents a range. You can use standard Swift range operators to specify the range in slice operation. However, the `BNNSGraph.Builder.SliceRange` structure provides additional functionality: * You can specify a `stop` that's less that the `start` value. * You can supply negative `startIndex` and `endIndex` values to indicate the index is relative to the end of sequence * You can specify the stride. * You can specify an `UnboundedRange` with the `fillAll` constant. For example, the following code shows a slice operation that selects dimensions using a `SliceRange`, a Swift range, and an integer. ``` let slice = src[BNNSGraph.Builder.SliceRange(startIndex: 1, endIndex: -1), 5 ... 20, 3] ```
static init(startIndex: number, endIndex: number): BNNSGraph_Builder_SliceRangeSwift declarationinit(startIndex: Int = 0, endIndex: Int)Returns a new slice range structure.
get startIndex(): numberSwift declarationlet startIndex: Intstatic get fillAll(): BNNSGraph_Builder_SliceRangeSwift declarationstatic let fillAll: BNNSGraph.Builder.SliceRangeThe same as the ellipsis literal `...` used to indicate unspecified dimensions of the tensor.
get endIndex(): numberSwift declarationlet endIndex: IntNo declarations were skipped in this snapshot.