_mm_popcnt_u64 undefined identifier on 32bit linux icpc version 12.0.4

_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

Dr. Andy Nisbet
Availability
Room E128, School of Computing, Mathematics & Digital Media Technology, John Dalton Building, Manchester Metropolitan University, Chester Street, Manchester M1 5GD,
UK.
Email: A.Nisbet@mmu.ac.uk, Phone:(+44)-161-247-1556;
Fax:(+44)-161-247-6840.
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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
...

Leave a Comment

Please sign in to add a comment. Not a member? Join today