---
title: "extentAtDimensionIndex:"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtltensorextents/extentatdimensionindex:"
---

# extentAtDimensionIndex:

Returns the extent at an index.

## Declaration

```occ
- (NSInteger) extentAtDimensionIndex:(NSUInteger) dimensionIndex;
```

## Parameters

- `dimensionIndex`: The index of the dimension. The first dimension is the innermost dimension.

## Return Value

Return Value The extent at dimensionIndex. This method returns -1 if dimensionIndex is greater than or equal to rank.
