I am trying to compile working code with intel c++ 2022.
I get the error _popcnt32 is undefined
Previously, including <immintrin.h> was all that was needed.
Why it is an error?
Thank you for posting in Intel Communities.
Could you please provide us with a sample reproducer so that we can investigate your issue from our end?
You have mentioned that you are using C++ compiler 2022 meaning nextgen compiler on Visual Studio. In that case, can you please share the version of Visual Studio that you are using?
Thanks and Regards,
Cannot post all the code
int mCmp = _mm256_movemask_epi8(Cmp);
int NewErrors = _popcnt32(mCmp);
The error is the same for Visual Studio 2019 and 2022
(it works with Intel compiler 19.2 and Visual studio 2017).
I can't reproduce your issue with icx 2022.0.0 and VS2019 16.11.11.
int NewErrors = _popcnt32(8);
And I used command " icx source.cpp " to compile the source code, it worked successfully.
Please confirm the below information on your end,
Do you use the compiler icx? And please tell us the version you used, and please tell us the visual studio version of VS 2019 you used.
Could you try the above simple code? And check if it can be compiled successfully.
We haven't heard back from you for a long time so we are assuming that your issue has been fixed. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.