<!--
{
  "availability" : [
    "iOS: 15.3.0 -",
    "iPadOS: 15.3.0 -",
    "macCatalyst: 15.3.0 -",
    "macOS: 12.2.0 -",
    "tvOS: 15.3.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraphPooling4DOpDescriptor/returnIndicesMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal Performance Shaders Graph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraphPooling4DOpDescriptor(py)returnIndicesMode"
  },
  "title" : "returnIndicesMode"
}
-->

# returnIndicesMode

Defines the mode for returned indices of maximum values within each pooling window.

```
var returnIndicesMode: MPSGraphPoolingReturnIndicesMode { get set }
```

## Discussion

Use this in conjunction with [`maxPooling4DReturnIndices(_:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling4DReturnIndices(_:descriptor:name:)) API.
If `returnIndicesMode = MPSGraphPoolingReturnIndicesNone` then only the first result
MPSGraph returns from [`maxPooling4DReturnIndices(_:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling4DReturnIndices(_:descriptor:name:))
will be valid and using the second result will assert.
Default value: `MPSGraphPoolingReturnIndicesNone`.

---

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)