How to vectorize a distance calculation using SSE2

前端 未结 2 952
再見小時候
再見小時候 2021-01-03 09:00

A and B are vectors or length N, where N could be in the range 20 to 200 say. I want to calculate the square of the distance between these vectors, i.e. d^2 = ||A-B||^2.

2条回答
  •  悲哀的现实
    2021-01-03 09:13

    From the MSDN documentation, the 1105 error code means the compiler is not able to figure out how to reduce the code to vectorized instructions. For floating point operations it is indicated that you need to specify the /fp:fast option to enable any floating point reductions at all.

提交回复
热议问题