<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vSnaxpy(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vSnaxpy"
  },
  "title" : "vSnaxpy(_:_:_:_:_:)"
}
-->

# vSnaxpy(_:_:_:_:_:)

Performs the computation of `vSaxpy` `n` times, using a different multiplier each time.

```
func vSnaxpy(_ n: Int32, _ m: Int32, _ a: UnsafePointer<vFloat>, _ x: UnsafePointer<vFloat>, _ y: UnsafeMutablePointer<vFloat>)
```

## Parameters

`n`

Number of elements in vector `a`; must be a multiple of 4.

`m`

Number of elements in each of the vectors `x` and `y`; must be a multiple of 4.

`a`

A vector array of `float` values.

`x`

A second vector array of `float` values.

`y`

A second vector array of `float` values.

## Discussion

For i = 0 to n-1, the elements of `x` are multiplied by `a`[i] and added to the corresponding elements of `y`.  The results are accumulated and stored in `y`.

---

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)