Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,039 of 243,242    |
|    bart to Bonita Montero    |
|    Re: Unicode...    |
|    22 Nov 25 14:28:11    |
   
   From: bc@freeuk.com   
      
   On 22/11/2025 14:08, Bonita Montero wrote:   
   > Am 22.11.2025 um 14:38 schrieb bart:   
   >> Doesn't compile, even after I add suitable *intrin headers.   
   >> I took out L_FORCEINLINE (not recognised); added std:: to countr_one,   
   >> but it still gave me errors like this:   
   >> C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/popcntintrin.h: In   
   >> lambda function:   
   >> C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/popcntintrin.h:42:1:   
   >> error: inlining failed in call to 'always_inline' 'long long int   
   >> _mm_popcnt_u64(long long unsigned int)': target specific option mismatch   
   >> 42 | _mm_popcnt_u64 (unsigned long long __X)   
   >> | ^~~~~~~~~~~~~~   
   >> You have to give complete compilable code or have only simple   
   >> dependencies like stdio.h.   
   >   
   > Try __attribute__((always_inline)) instead. The code requires enabled   
   > AVX512 compilation   
   > with g++ and a AVX512-compatible CPU (Intel since Skylake-X Xeons, AMD   
   > since Zen4).   
   > If you want to test for an older CPU you can stick with the below code,   
   > which is AVX2.   
      
   Still doesn't work. I'm using g++ 14.1.0. It doesn't like 'countr_one'   
   with or without std::   
      
   Would it hurt to post a complete, compilable program? Plus the compiler   
   invocation if it needs anything unusual.   
      
   It only needs a minimal main() routine which I can tweak to my test   
   input. Unless all it needs to use it is a call to utf8Width("abc") which   
   returns a simple integer.   
      
   But ATM my C version is still faster!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca