I'm trying to apply the log2 onto a __m128 variable. Like this:
#include <immintrin.h>
int main (void) {
__m128 two_v = {2.0, 2.0, 2.0, 2.0};
__m128 log2_v = _mm_log2_ps(two_v); // log_2 := log(2)
return 0;
}
Trying to compile this returns this error:
error: initializing '__m128' with an expression of
incompatible type 'int'
__m128 log2_v = _mm_log2_ps(two_v); // log_2 := log(2)
^ ~~~~~~~~~~~~~~~~~~
How can I fix it?