<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/output/outputIndex",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "output::outputIndex"
  },
  "title" : "output::outputIndex"
}
-->

# output::outputIndex

Returns the index of the current output element being processed.

```
uint output::outputIndex()
```

## Return Value

The zero-based index of the current output element.

## Discussion

This function provides the zero-based index of the output element within the current
output range, useful for per-element computations and indexing operations. If sorting
is active, this corresponds to the post-sorting ordering.

> Visual: ![Graph](output__outputIndex)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)