---
title: "element::index"
framework: Compute Graph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/element/index
---

# element::index

Returns the index of the current element.

## Declaration

```swift
uint element::index()
```

## Return Value

Return Value The zero-based index of the element

## Discussion

Discussion Use this function to get the element’s position in the element buffer, which can be useful for creating unique variations or patterns. note:
