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

# vSswap(_:_:_:)

Interchanges the elements of two vectors.

```
func vSswap(_ n: Int32, _ x: UnsafeMutablePointer<vFloat>, _ y: UnsafeMutablePointer<vFloat>)
```

## Parameters

`n`

number of elements in vectors `x` and `y`; must be a multiple of 4.

`x`

vector with `n` elements of type `float`.

`y`

vector with `n` elements of type `float`.

## Discussion

Each element of vector `x` is replaced by the corresponding element of `y`, and vice versa.

---

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)