1

Trying to compile C++ with BMI2 support (Haswell New Instructions). Getting this annoying error - C3861: '_blsr_u64': identifier not found

According to MSDN, _blsr_u64 needs ammintrin.h or immintrin.h headers.

ammintrin.h could not be found and immintrin.h just does not solve this.

Any ideas how to use _blsr_u64?

I'm trying to transform this:

x &= (x) - 1

To this:

x = _blsr_u64(x)

Windows7, Visual Studio 2010, .NET Framework 4.

giacomo
  • 11
  • 2
  • MSDN page you are referring to is for VS 2015.You are using Visual Studio 2010 which was released long before Intel documented BMI extensions. You'll have to upgrade to VS2013 or newer (preferred), or resort to some external assembly library. – Andrey Turkin Apr 30 '17 at 20:46

0 Answers0