I need to convert large arrays of float in memory to arrays of double and back. Are there any SSE compiler intrinsics in Visual C++ 15 update 3 that would help?
EDIT: it's a conversion between two wire formats, so #define won't help. A data structure is stored as floats, but a third party processing library expects an array of double.
You can use SSE for this:
float -> double: _mm_cvtps_pd
double -> float: _mm_cvtpd_ps
Try a simple scalar loop first though as (a) the compiler may vectorize for you anyway and (b) you may well be memory-bound, so SIMD optimisation may not help much.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With