0

I'm trying to use the Intel intrinsic gcc builtin-function _pext_u64. Code:

#include <iostream>

int main()
{
   std::cout << _pext_u64(25, 56) << '\n';
   return 0;
}

Compilation line and error:

$ make
g++ -o main.o -c main.cpp  -O3 -mbmi2
main.cpp: In function 'int main()':
main.cpp:5:18: error: '_pext_u64' was not declared in this scope
    5 |     std::cout << _pext_u64(25, 56) << '\n';
      |                  ^~~~~~~~~

Additional info:

$ gcc -dumpmachine
x86_64-w64-mingw32

What is going on?

ABu
  • 10,423
  • 6
  • 52
  • 103
  • 4
    Does this answer your question? [Header files for x86 SIMD intrinsics](https://stackoverflow.com/questions/11228855/header-files-for-x86-simd-intrinsics) and also `-mbmi2` - live - https://godbolt.org/z/qEx44z4dd – Richard Critten Nov 17 '22 at 19:54
  • 2
    The intel intrinsics are not compiler builtins. They are declared as functions in a header. – user17732522 Nov 17 '22 at 19:55

0 Answers0