nor's blog

By nor, 9 months ago, In English
  • Vote: I like it
  • +34
  • Vote: I do not like it

»
9 months ago, # |
  Vote: I like it +83 Vote: I do not like it

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

meme
»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

good to know

»
9 months ago, # |
  Vote: I like it +26 Vote: I do not like it

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

»
6 months ago, # |
  Vote: I like it +25 Vote: I do not like it

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