Reputation: 12007
I have two matricies (of type float *
), so I guess they can be viewed as arrays.
I need to do an element-wise addition of the two matrices, and I would like to increase performance as much as possible. This will be for an iOS app, so I would like to see if the Accelerate.framework
has such a function to do this.
The documentation for Accelerate.framework
is a bit difficult to understand though. There are a bunch of functions with the word add
in them, but I have no idea which or how they work.
Has anyone had to do this before? Can you point me in the correct direction?
NOTE: I will also need to do the same this for division (i.e., element-wise division); and I'd like to also use Accelerate.framework
if possible.
Upvotes: 1
Views: 421
Reputation: 106167
If your matrices can be viewed as arrays (are contiguous in memory), the functions you’re looking for are vDSP_vadd
and vDSP_vdiv
.
Upvotes: 1