Блог пользователя nor

Автор nor, 3 месяца назад, По-английски
  • Проголосовать: нравится
  • +34
  • Проголосовать: не нравится

»
3 месяца назад, # |
  Проголосовать: нравится +83 Проголосовать: не нравится

A c++ user trying to squeeze their solution nowadays:

meme
»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

good to know

»
3 месяца назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

Just code the SIMD sections in assembly. Shouldn't be that hard >_>

»
2 недели назад, # |
  Проголосовать: нравится +25 Проголосовать: не нравится

One of the ways to fix it is to add the target pragma AFTER the STL includes. This should make your code compile, but a lot of code would simply not be optimized, so use it at your own risk.

It is not necessary to leave the whole STL without optimization, you only need the place where the error occurs to be before any target pragma. If you look closely at the output, you will see that the error occurs at C:/Programs/gcc13-64-winlibs/include/c++/13.2.0/bits/allocator.h:184:7. So you need to add only #include <bits/allocator.h> before the pragmas to make your code compile.

this code compiles on g++-13 in custom test