<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP_ctoz",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_ctoz"
  },
  "title" : "vDSP_ctoz"
}
-->

# vDSP_ctoz

Copies the contents of an interleaved single-precision complex vector to a split complex vector.

```
extern void vDSP_ctoz(const DSPComplex *__C, vDSP_Stride __IC, const DSPSplitComplex *__Z, vDSP_Stride __IZ, vDSP_Length __N);
```

## Parameters

`__C`

The interleaved-complex input vector.

`__IC`

The distance between the real elements in the input vector. For example, a stride of `2` corresponds to a single complex element.

`__Z`

The split-complex output vector.

`__IZ`

The distance between the elements in the ouput vector.

`__N`

The number of complex elements that the function processes.

## Discussion

For example, the following code converts the contents of an array of [`DSPComplex`](/documentation/Accelerate/DSPComplex) structures to a [`DSPSplitComplex`](/documentation/Accelerate/DSPSplitComplex) structure:

```swift
    let source: [DSPComplex] = [
        DSPComplex(real: 1.0, imag: 10.0),
        DSPComplex(real: 2.0, imag: 20.0),
        DSPComplex(real: 3.0, imag: 30.0),
        DSPComplex(real: 4.0, imag: 40.0),
    ]
    
    let destReal = UnsafeMutableBufferPointer<Float>.allocate(capacity: 4)
    let destImag = UnsafeMutableBufferPointer<Float>.allocate(capacity: 4)
    
    var destination = DSPSplitComplex(realp: destReal.baseAddress!,
                                      imagp: destImag.baseAddress!)
    
    vDSP_ctoz(source, 2,
              &destination, 1,
              4)
    
    print(Array(destReal)) // Prints "[1.0, 2.0, 3.0, 4.0]".
    print(Array(destImag)) // Prints "[10.0, 20.0, 30.0, 40.0]".
```

---

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)