home bbs files messages ]

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,041 of 243,242   
   bart to Bonita Montero   
   Re: Unicode... (1/2)   
   22 Nov 25 16:35:13   
   
   From: bc@freeuk.com   
      
   On 22/11/2025 15:05, Bonita Montero wrote:   
   > Take this and -mavx512bw and -std=c++23.   
   >   
   > #include    
   > #include    
   > #include    
   > #include    
   > #include    
   > #include    
   > #include    
   > #include    
   > #if defined(_MSC_VER)   
   >      #include    
   > #elif defined(__GNUC__) || defined(__clang__)   
   >      #include    
   > #endif   
   > #include "inline.h"   
      
   I don't have 'inline.h'. If I comment that out, then I get the errors   
   below from 'g++ -std=c++23 prog.c', also with -Wno-inline.   
      
   Your code seems incredibly fragile.   
      
   c.cpp: In function 'size_t utf8Width512(const char*)':   
   c.cpp:72:37: warning: AVX512F vector return without AVX512F enabled   
   changes the ABI [-Wpsabi]   
       72 |         ZERO = _mm512_setzero_si512(),   
          |                                     ^   
   c.cpp: In function 'size_t utf8Width256(const char*)':   
   c.cpp:123:37: warning: AVX vector return without AVX enabled changes the   
   ABI [-Wpsabi]   
      123 |         ZERO = _mm256_setzero_si256(),   
          |                                     ^   
   In file included from   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/x86gprintrin.h:73,   
                     from   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/x86intrin.h:27,   
                     from c.cpp:13:   
   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)   
          | ^~~~~~~~~~~~~~   
   c.cpp:95:106: note: called from here   
       95 |         count += _mm_popcnt_u64( one ) + _mm_popcnt_u64( two )   
   + _mm_popcnt_u64( three ) + _mm_popcnt_u64( four );   
          |   
                               ~~~~~~~~~~~~~~^~~~~~~~   
   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)   
          | ^~~~~~~~~~~~~~   
   c.cpp:95:80: note: called from here   
       95 |         count += _mm_popcnt_u64( one ) + _mm_popcnt_u64( two )   
   + _mm_popcnt_u64( three ) + _mm_popcnt_u64( four );   
          |   
     ~~~~~~~~~~~~~~^~~~~~~~~   
   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)   
          | ^~~~~~~~~~~~~~   
   c.cpp:95:56: note: called from here   
       95 |         count += _mm_popcnt_u64( one ) + _mm_popcnt_u64( two )   
   + _mm_popcnt_u64( three ) + _mm_popcnt_u64( four );   
          |                                          ~~~~~~~~~~~~~~^~~~~~~   
   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)   
          | ^~~~~~~~~~~~~~   
   c.cpp:95:32: note: called from here   
       95 |         count += _mm_popcnt_u64( one ) + _mm_popcnt_u64( two )   
   + _mm_popcnt_u64( three ) + _mm_popcnt_u64( four );   
          |                  ~~~~~~~~~~~~~~^~~~~~~   
   In file included from   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/immintrin.h:65,   
                     from   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/x86intrin.h:32:   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/avx512bwintrin.h:1716:1:   
   error: inlining failed in call to 'always_inline' '__mmask64   
   _mm512_cmpeq_epi8_mask(__m512i, __m512i)': target specific option mismatch   
     1716 | _mm512_cmpeq_epi8_mask (__m512i __A, __m512i __B)   
          | ^~~~~~~~~~~~~~~~~~~~~~   
   c.cpp:94:42: note: called from here   
       94 |             four = _mm512_cmpeq_epi8_mask( _mm512_and_si512(   
   chunk, FOUR_MASK ), FOUR_HEAD ) & nzMask;   
          |   
   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   In file included from   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/immintrin.h:55:   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/avx512fintrin.h:10651:1:   
   error: inlining failed in call to 'always_inline' '__m512i   
   _mm512_and_si512(__m512i, __m512i)': target specific option mismatch   
   10651 | _mm512_and_si512 (__m512i __A, __m512i __B)   
          | ^~~~~~~~~~~~~~~~   
   c.cpp:94:42: note: called from here   
       94 |             four = _mm512_cmpeq_epi8_mask( _mm512_and_si512(   
   chunk, FOUR_MASK ), FOUR_HEAD ) & nzMask;   
          |   
   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/avx512bwintrin.h:1716:1:   
   error: inlining failed in call to 'always_inline' '__mmask64   
   _mm512_cmpeq_epi8_mask(__m512i, __m512i)': target specific option mismatch   
     1716 | _mm512_cmpeq_epi8_mask (__m512i __A, __m512i __B)   
          | ^~~~~~~~~~~~~~~~~~~~~~   
   c.cpp:93:43: note: called from here   
       93 |             three = _mm512_cmpeq_epi8_mask( _mm512_and_si512(   
   chunk, THREE_MASK ), THREE_HEAD ) & nzMask,   
          |   
   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/avx512fintrin.h:10651:1:   
   error: inlining failed in call to 'always_inline' '__m512i   
   _mm512_and_si512(__m512i, __m512i)': target specific option mismatch   
   10651 | _mm512_and_si512 (__m512i __A, __m512i __B)   
          | ^~~~~~~~~~~~~~~~   
   c.cpp:93:43: note: called from here   
       93 |             three = _mm512_cmpeq_epi8_mask( _mm512_and_si512(   
   chunk, THREE_MASK ), THREE_HEAD ) & nzMask,   
          |   
   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/avx512bwintrin.h:1716:1:   
   error: inlining failed in call to 'always_inline' '__mmask64   
   _mm512_cmpeq_epi8_mask(__m512i, __m512i)': target specific option mismatch   
     1716 | _mm512_cmpeq_epi8_mask (__m512i __A, __m512i __B)   
          | ^~~~~~~~~~~~~~~~~~~~~~   
   c.cpp:92:41: note: called from here   
       92 |             two = _mm512_cmpeq_epi8_mask( _mm512_and_si512(   
   chunk, TWO_MASK ), TWO_HEAD ) & nzMask,   
          |   
   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   C:/tdm/lib/gcc/x86_64-w64-mingw32/14.1.0/include/avx512fintrin.h:10651:1:   
   error: inlining failed in call to 'always_inline' '__m512i   
   _mm512_and_si512(__m512i, __m512i)': target specific option mismatch   
   10651 | _mm512_and_si512 (__m512i __A, __m512i __B)   
          | ^~~~~~~~~~~~~~~~   
   c.cpp:92:41: note: called from here   
       92 |             two = _mm512_cmpeq_epi8_mask( _mm512_and_si512(   
      
   [continued in next message]   
      
   --- 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