---
title: BNNSGraph.Builder.SliceRange
framework: accelerate
role: symbol
role_heading: Structure
path: accelerate/bnnsgraph/builder/slicerange
---

# BNNSGraph.Builder.SliceRange

A structure that represents a range.

## Declaration

```swift
struct SliceRange
```

## Overview

Overview 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]

## Topics

### Initializers

- [init(startIndex:endIndex:)](accelerate/bnnsgraph/builder/slicerange/init(startindex:endindex:).md)

### Instance Properties

- [endIndex](accelerate/bnnsgraph/builder/slicerange/endindex.md)
- [startIndex](accelerate/bnnsgraph/builder/slicerange/startindex.md)

### Type Properties

- [fillAll](accelerate/bnnsgraph/builder/slicerange/fillall.md)

## Relationships

### Conforms To

- [BNNSGraph.Builder.SliceIndex](accelerate/bnnsgraph/builder/sliceindex.md)
- [Equatable](swift/equatable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
