poniedziałek, 10 grudnia 2018

This blog is obsolete

I'm available on Twitter. The up-to-date list of my articles or short notes is available on my homepage 0x80.pl.

I used to publish here announcements or short notes. For various reasons it didn't work well. This blog probably won't be updated any more.

niedziela, 1 maja 2016

GCC: and inlining failed in call to always_inline 'FOO': target specific option mismatch

AVX512 comes with the number of variants, and a compiler must know which AVX512 version it compiles.

GCC error inlining failed in call to always_inline 'FOO': target specific option mismatch occurs when a program containing some SIMD-intrinsics, and compiler has wrong or missing target options. The target option are introduced by "-m".

Lets look at the error from real world:

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlbwintrin.h:790:1: error: inlining failed in call to always_inline ‘_mm_movm_epi8’: target specific option mismatch


Now, when open avx512vlbwintrin.h, we see at the beginning of file:

...
#pragma GCC push_options
#pragma GCC target("avx512vl,avx512bw")
#define __DISABLE_AVX512VLBW__
...

Thus, in order to properly compile the program, gcc have to be feed with the two options listed at the target line: -mavx512vl and -mavx512bw.

sobota, 13 lutego 2016

bash: $0 value

When a script is run from a command line then the 0th parameter is the script's name. However, when a script is run via source command, then the 0th parameter is a shell name. Weird, but true.


$ cat test.sh 
echo "\$0 is $0"

$ bash test.sh
$0 is test.sh

$ source ./test.sh
$0 is bash

niedziela, 17 stycznia 2016

Base64 encoding with SIMD instructions

Base64 decoding could also be vectorized, although the speedup is not very impressive, merely 35%. Read more ...

wtorek, 12 stycznia 2016

Base64 encoding with SIMD instructions

An SSE code is more than 2 times faster on Core i7, and around 70% faster on Core i5. Read more...

wtorek, 29 grudnia 2015

Fast conversion of floating-point values to string

The conversion to string could be 15 times faster than sprintf. Read more...

niedziela, 27 grudnia 2015

Base64 encoding — implementation study

Although base64 encoding is a very basic algorithm, it could be sped up a little (25% sounds good?) Read more...