0

I need to do a lot of vector calculations. Therefore I seems wise that NEON should be used. The problem is that the function depends on doubles. This gives me two options, re-writing the entire code so that it works with floats, or creating a function using doubles as input and doubles as output and doing the computations with floats.

I need to do the following computation:

dotproduct = A[0]*B[0] + A[1]*B[1] + A[2]*B[2]

the arrays are dimensioned as doubles. How can I do this computation using NEON intrinsics?

Alex van Rijs
  • 803
  • 5
  • 17
  • 39
  • Assuming it is performance you are after and not accuracy, it is best to use single-precision every where which will let you use neon and reduce memory space/bandwidth cost. – auselen May 16 '13 at 09:42

1 Answers1

4

NEON does not support double-precision operations. You will have to either rewrite your function to operate on single-precision values, or use scalar double-precision VFP instructions instead of NEON.

Marat Dukhan
  • 11,993
  • 4
  • 27
  • 41