Accelerate Framework
Posted: Thu Aug 23, 2012 1:31 pm
I came across the accelerate framework today
https://developer.apple.com/library/mac ... rateFWRef/
The Accelerate Framework contains C APIs for vector and matrix math, digital signal processing, large number handling, and image processing.
It's probably not something I would use myself but maybe someone finds it useful.
The following example computes the cosine of every value inside an array and puts the result in a second array
https://developer.apple.com/library/mac ... rateFWRef/
The Accelerate Framework contains C APIs for vector and matrix math, digital signal processing, large number handling, and image processing.
It's probably not something I would use myself but maybe someone finds it useful.
The following example computes the cosine of every value inside an array and puts the result in a second array
Code: Select all
ImportC "-framework Accelerate"
vvsin(*out, *in, *len)
vvcos(*out, *in, *len)
EndImport
Size.i = 100000
Dim A.d(Size - 1)
Dim B.d(Size - 1)
For i = 0 To Size - 1
B(i) = Random(9999) * 0.01
Next
vvcos(@A(), @B(), @Size)