---
title: "offset(for:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtltensorbufferattachments/offset(for:)"
---

# offset(for:)

Returns the byte offset into the buffer for the given plane.

## Declaration

```swift
func offset(for plane: MTLTensorPlaneType) -> Int
```

## Parameters

- `plane`: The plane type to look up.

## Return Value

Return Value The byte offset for the given plane.
