problems with intrinsics

I encounter a problem with pgc++ using intrinsics under Linux Ubuntu 17.10. I am using pgc++ 17.4. When I include
xmmintrin.h, I have no problem, but if I include immintrin.h the pgc++ compiler generates many errors :

"/opt/pgi/linux86-64/17.4/include/immintrin.h", line 47: error: expected an

"/opt/pgi/linux86-64/17.4/include/immintrin.h", line 47: error: inline
          specifier allowed on function declarations only

Is there a way to fix this problem ?

If I make a correction changing “ATTRIBUTE” to “extern” which is the case in the GNU files, I get the following errors:

/opt/pgi/linux86-64/17.4/include/immintrin.h", line 1434: error: no suitable
          user-defined conversion from "__m256d" to "__m256" exists
    return (__m256)__A;

Best regards

Hi JM,

This is a known issue (TPR#24665) when using this file with C++. I’ve added your post to the TPR.

The “ATTRIBUTES” to “extern” change is a typo so easily fixed, but the conversion operations need to be added so there’s not easy work around.

Thanks for the report,

Thank you for the answer ;-)