Is there anything in the Accelerate library which can take two buffers
of floats, scale one buffer by a constant value and then add it into
the other buffer?
It seems like I could pervert vImage into doing this sort of thing by
treating the buffers as "planar floats" and just specifying a very
wide, 1-pixel tall image, but if it's optimized for gigantic buffers,
it might not be optimal--I use less than 1K per pass. (I just do a lot
of passes.) Is there a less roundabout way?
I believe what you want is vSaxpy(), defined in vecLib/vectorOps.h.
Takes a scaler, multiples it by a an array of vector floats x and adds
to an array of vector floats y.
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.