Speed ​​up frames on iphone

Frame acceleration is good if I want to do some algebra on vectors or calculate ffts. But, if I didn’t miss something, in case I want to calculate the cosine (or any other trigger) of the values ​​in the vector, there is no way to do this with acceleration. In addition, vecLib is marked as inaccessible on iphone, and vDSP skips things like square roots, logarithms, trigonometric functions ...

Am I really right? o_o

If I, then how do I speed up the computation of these missing functions and take advantage of the acceleration capabilities?


Answer:

As MrMage said below, there is a family of vv... functions available in Accelerate. This includes triggers, logs, roots, etc. But no complex numbers are supported. Thanks MrMage!

+4
source share
2 answers

According to iOS 5.1 docs, at least vvsinf (and similar features from vecLib) are available in iOS 5.0 and later. I think this should satisfy your needs.

+3
source

My reading of the documentation tells me that Accelerate / vfp.h exists on iOS and that the trigger functions are there. However, I have not tried to use it, so I will continue, believing that I am mistaken.

Fast trigger implementations are not very smart. There was a mathematical thing called the Taylor extension, which says something like:

 sin(theta+epsilon) = sin(theta) + x*epsilon + small corrections 

Thus, this means that you can create a lookup table that for theta key values ​​records sin (theta) and x. Then you execute the above equation, which is really fast (look at the acceleration of Fused Add and Multiply).

0
source

Source: https://habr.com/ru/post/1402075/


All Articles