<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNS/applyReduction(_:input:output:weights:filterParameters:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate4BNNSO14applyReduction_5input6output7weights16filterParametersyAC0D8FunctionO_So21BNNSNDArrayDescriptoraA2LSgSo010BNNSFilterI0aSgtKFZ"
  },
  "title" : "applyReduction(_:input:output:weights:filterParameters:)"
}
-->

# applyReduction(_:input:output:weights:filterParameters:)

Applies the specified reduction function.

```
static func applyReduction(_ reductionFunction: BNNS.ReductionFunction, input: BNNSNDArrayDescriptor, output: BNNSNDArrayDescriptor, weights: BNNSNDArrayDescriptor?, filterParameters: BNNSFilterParameters? = nil) throws
```

## Parameters

`reductionFunction`

The variable that specifies the reduction function.

`input`

The descriptor of the input.

`output`

The descriptor of the output.

`weights`

The descriptor of the weights.

`filterParameters`

The filter runtime parameters.

---

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)