It’s already fixed for Swift 3.1.

Here is the change log.



-- 
Adrian Zubarev
Sent with Airmail

Am 22. November 2016 um 01:32:42, Rick Mann via swift-users 
(swift-users@swift.org) schrieb:

My googling is not turning up an answer that works in Xcode 8.1. I'd like to do 
this:


import Accelerate

extension
Array
where Element == Double
{
func
sum()
-> Double
{
var result: Double = 0.0
vDSP_sveD(self, 1, &result, vDSP_Length(self.count))
return result
}
}

But I get "same-type requirement makes generic parameter 'Element' non-generic."

Also, will there ever be any way to specialize something like

let numbers: [Double] = ...
let sum = numbers.reduce(0.0, +)

Into a call to vDSP_sveD()? Would it require compiler optimizations for 
Accelerate?

Thanks!

--  
Rick Mann
rm...@latencyzero.com


_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to