Vector Class Discussion

compiling code with usage of blend16f and permute
Author: kp Date: 2018-07-10 20:18
I am seeing different behavior between Clang and gcc when I make use of permute16f and blend16f in my code. GCC compiles fine but Clang complains with index for __builtin_shufflevector must be a constant integer. It seems that the avxintrin.h in case of Clang expects immediate for mask. In my usage avx512 is emulated with avx2. So blend16f uses blend8f in vectorf256.h which produces 'const int maskb' using template parameters. But for some reason Clang is not able to reason that maskb is actually constexpr and throws 'index must be constant integer'.

Have you encountered this and if so what is the workaround with Clang?

Really appreciate your help.

 
thread compiling code with usage of blend16f and permute - kp - 2018-07-10
last replythread compiling code with usage of blend16f and permute new - kp - 2018-07-12
last replythread compiling code with usage of blend16f and permute new - Agner - 2018-07-13
last replythread compiling code with usage of blend16f and permute new - kp - 2018-07-13
last replythread compiling code with usage of blend16f and permute new - Agner - 2018-07-13
last reply compiling code with usage of blend16f and permute new - kp - 2018-07-16