---
title: "sliceDimension(_:withSubrange:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsndarraydescriptor/slicedimension(_:withsubrange:)"
---

# sliceDimension(_:withSubrange:)

## Declaration

```swift
func sliceDimension(_ dimensionIndex: Int, withSubrange subRange: MPSDimensionSlice)
```
