Linux运行有关SSE指令集代码出错:error: inlining failed in call to always_inline ‘int _mm_popcnt_u32(unsigned int)’: target specific option mismatch
_mm_popcnt_u32 (unsigned int __X)

先查看自己电脑的CPU是否支持sse指令集:
如何查看是否支持指令集
然后进入网站:https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=3828
查看报错函数对应的指令集(以我的这个错误为例)
for example:
Linux运行SSE指令集出错
搜索框里是报错的指令,下方是对应的指令集,在自己编写的CMakeLists.txt中添加:
set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -mpopcnt”)
再执行代码,即可编译成功。

相关文章:

  • 2021-06-18
  • 2022-12-23
  • 2022-01-22
  • 2022-01-18
  • 2021-09-30
  • 2022-01-09
  • 2021-09-20
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2021-12-24
  • 2021-06-16
  • 2021-07-17
  • 2021-12-05
相关资源
相似解决方案