<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/copying-element-swapping-and-merging-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Copying, element swapping, and merging functions"
}
-->

# Copying, element swapping, and merging functions

Copy, swap, and merge the elements of two vectors.

## Topics

### Vector copying functions

The functions in this group copy one vector to another vector.

[`static func copy(DSPSplitComplex, to: inout DSPSplitComplex, count: Int)`](/documentation/Accelerate/vDSP/copy(_:to:count:)-96jr5)

Copies a complex single-precision vector.

[`static func copy(DSPDoubleSplitComplex, to: inout DSPDoubleSplitComplex, count: Int)`](/documentation/Accelerate/vDSP/copy(_:to:count:)-7zpro)

Copies a complex double-precision vector.

[`extern void vDSP_zvmov(const DSPSplitComplex *__A, vDSP_Stride __IA, const DSPSplitComplex *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_zvmov)

Moves a complex single-precision vector.

[`extern void vDSP_zvmovD(const DSPDoubleSplitComplex *__A, vDSP_Stride __IA, const DSPDoubleSplitComplex *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_zvmovD)

Moves a complex double-precision vector.

### Vector-to-vector element swapping functions

[`static func swapElements<T, U>(inout T, inout U)`](/documentation/Accelerate/vDSP/swapElements(_:_:)-96xn7)

Swaps the elements of two single-precision vectors.

[`static func swapElements<T, U>(inout T, inout U)`](/documentation/Accelerate/vDSP/swapElements(_:_:)-62wvt)

Swaps the elements of two double-precision vectors.

[`extern void vDSP_vswap(float *__A, vDSP_Stride __IA, float *__B, vDSP_Stride __IB, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vswap)

Swaps the elements of two single-precision vectors using the specified stride.

[`extern void vDSP_vswapD(double *__A, vDSP_Stride __IA, double *__B, vDSP_Stride __IB, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vswapD)

Swaps the elements of two double-precision vectors using the specified stride.

### Vector-to-vector merging functions

[`static func taperedMerge<T, U>(T, U) -> [Float]`](/documentation/Accelerate/vDSP/taperedMerge(_:_:)-5dhoj)

Returns the result of a tapered merge between two single-precision vectors.

[`static func taperedMerge<T, U>(T, U) -> [Double]`](/documentation/Accelerate/vDSP/taperedMerge(_:_:)-9s9j5)

Returns the result of a tapered merge between two double-precision vectors.

[`static func taperedMerge<T, U, V>(T, U, result: inout V)`](/documentation/Accelerate/vDSP/taperedMerge(_:_:result:)-74fuy)

Computes the result of a tapered merge between two single-precision vectors.

[`static func taperedMerge<T, U, V>(T, U, result: inout V)`](/documentation/Accelerate/vDSP/taperedMerge(_:_:result:)-9361o)

Computes the result of a tapered merge between two double-precision vectors.

[`extern void vDSP_vtmerg(const float *__A, vDSP_Stride __IA, const float *__B, vDSP_Stride __IB, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vtmerg)

Performs a tapered merge between two single-precision vectors.

[`extern void vDSP_vtmergD(const double *__A, vDSP_Stride __IA, const double *__B, vDSP_Stride __IB, double *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vtmergD)

Performs a tapered merge between two double-precision vectors.



---

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)