Hi, I have this simple program where I try to store a floating point number in a __m256 variable from AVX
#include <stdio.h> #include <stdlib.h> #include <x86intrin.h> #ifndef __AVX__ #error AVX not defined #endif int main( int argc, char *argv[] ) { __m256 RR; __m256 BB; RR.m256_f32[0] = 1.0; BB.m256_f32[0] = 1.0; return 0; }
But when I compile with ICC i get:
$ icc -march=native -g -O0 -std=c99 -g intel_test_a.c -o intel_test_a -rdynamic -ldl
intel_test_a.c(42): error: expression must have struct or union type
RR.m256_f32[0] = 1.0;
^
intel_test_a.c(43): error: expression must have struct or union type
BB.m256_f32[0] = 1.0;
^
compilation aborted for intel_test_a.c (code 2)
just wonder what I'm doing wrong? I am using linux (debian).
Thanks