Skip to content

Instantly share code, notes, and snippets.

@theoknock
Created May 27, 2024 00:21
Show Gist options
  • Save theoknock/e5461e81f42accf70255188142792e55 to your computer and use it in GitHub Desktop.
Save theoknock/e5461e81f42accf70255188142792e55 to your computer and use it in GitHub Desktop.
Uses vDSP to simplify and accelerate linearization of arrays
let n = vDSP_Length(88200)
let stride = vDSP_Stride(1)
var a: Float32 = 0.0
var b: Float32 = 1.0
var c = [Float32](repeating: 0,
count: Int(vDSP_Length(88200)))
vDSP_vgen(&a,
&b,
&c,
stride,
n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment