我似乎无法调用 vDSP* 加速功能。我收到以下错误:
无法将“UnsafePointer<Float>”类型的值转换为预期的参数类型“UnsafePointer<Float>”
示例代码:
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))
}
任何建议都非常感谢!