-1

I cannot seem to call vDSP* accelerate functions. I get the following error:

Cannot convert value of type 'UnsafePointer<Float>' to expected argument type 'UnsafePointer<Float>'

Sample code:

var m:Float = 0.0 as! Float
var points : [Float]

points.withUnsafeBufferPointer {(buffer: UnsafeBufferPointer<Float>) -> Void in
        vDSP_minv(buffer.baseAddress!, vDSP_Stride(2), &m, vDSP_Length(2))
}

Any suggestions much appreciated!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
George
  • 193
  • 1
  • 8

1 Answers1

0

I was experimenting with generics and overloaded my class mistakenly using the Float class which caused the strange error message:

class bar<Float> { ... } 
George
  • 193
  • 1
  • 8