Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 536

Visual Studio IntelliSense stopped recognizing many of the AVX, AVX2 intrinsics

$
0
0

Problem description:

Install the Parallel Studio (2016 update1) on windows operating system, Visual studio [2013/2015] was used for integration with Intel compiler. After IPS XE installation, visual Studio IntelliSense stopped recognizing many of the AVX, AVX2 intrinsics. Its long list of intrinsics but for example: _mm256_load_ps, _mm256_add_ps ,_mm256_sub_ps ,_mm256_mu l_ps ,_mm256_store_ps ...etc. would not be recognized by IntelliSense.

Reason:

The reason of this behavior of visual studio IntelliSense is that there are no declarations for these intrinsic in compiler's header files.

Workaround:

#define __INTEL_COMPILER_USE_INTRINSIC_PROTOTYPES 1
before #include <mmintrin.h>

This will add all the intrinsic prototypes back into the header files.

Advantages of header-less recognition:

This is a Intel compiler 15.0 to 16.0 regression. Because the intrinsic header files for AVX512 were taking a long time to compile, it was decided that the compiler could just learn to recognize them without header files or prototypes. In 16.0, the compiler does not require prototypes for intrinsic functions. However, when the compiler is recognizing functions without prototypes, it uses the old C rules, which view enums and integers are the same.We don't see acceptable fix for this situation in VS IDE. 

By default, we don't want to include every AVX512 intrinsic, as there are so many of them it actually has a noticeable slowdown parsing the user code. This is why we changed to header-less recognition in 16.0.

Note in future header files:

we have added a comment in mmintrin.h for 17.0/18.0 to explain the compiler's use of these header files. The user will need to manually enable the function headers as per the instructions.

Here is excerpt from the latest mmintrin.h file.
/*
 * Many of these function declarations are not visible to the
 * compiler; they are for reference only. The compiler recognizes the
 * function names as "builtins", without requiring the
 * declarations. This improves compile-time.  If user code requires
 * the actual declarations, they can be made visible like
 * this:
 * #define __INTEL_COMPILER_USE_INTRINSIC_PROTOTYPES 1
 * #include <mmintrin.h>
 */
 


Viewing all articles
Browse latest Browse all 536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>