0

I am looking to sum the elements of two equal count arrays "element-by-element" to create a new array. So,

let a = [1.0, 2.0, 3.0] 
let b = [4.0, 5.0, 6.0] 

I want the following new array c

//c = [5.0, 7.0, 9.0]

I think its this function that could do it in Accelerate: vDSP_sveD. But I cannot use it very well.

Pat
  • 325
  • 1
  • 12
  • Here is an example for element-wise multiplication: http://stackoverflow.com/a/39727843/1187415 using Accelerate. It should not be too difficult to adapt that for addition. – Martin R Jan 23 '17 at 15:06
  • You can simply replace `vDSP_vmulD` by `vDSP_vaddD` in that answer. – Martin R Jan 23 '17 at 15:15

0 Answers0