Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
94 Views

_mm_popcnt_u64 undefined identifier on 32bit linux icpc version 12.0.4

Hello,
apologies I'm sure there is a quick workaround to this regarding compiler flags or moving to a 64bit OS, Im running on 32bit ubuntu 11.04 ...

apt@apt-Precision-T1600:~/SPARSE/examples$ uname -a
Linux apt-Precision-T1600 2.6.38-13-generic-pae #56-Ubuntu SMP Tue Feb 14 14:32:30 UTC 2012 i686 i686 i386 GNU/Linux

The processor is sandybridge, whoch has pipcnt, but I get error: identifier "_mm_popcnt_u64" is undefined, when compiling some code, it is defined in an intrinsics related header that is included.


Thanks,

Andy






0 Kudos
1 Reply
Highlighted
Valued Contributor II
94 Views

Quoting Andy Nisbet
...The processor is sandybridge, whoch has pipcnt, but I get error: identifier "_mm_popcnt_u64" is undefined,

[SergeyK] It is undefinedon 32-bit platforms.

when compiling some code, it is defined in an intrinsics related header that is included...

There are two versions of '_mm_popcnt_u..' intrinsic function. That is, one isfor a 32-bit platform and another one is
for a 64-bit platform. I would consider a fix like ( pseudo code ):

...
#if _LINUX32_
__int32 iValue = _mm_popcnt_u32( ... );
#endif
#if _LINUX64_
__int64 iValue = _mm_popcnt_u64( ... );
#endif
...
0 Kudos