Hi, I am writing some SIMD code where I would like to initialize a constant at compile-time with constexpr.
Both GCC and Clang are happy with code like shown below, but ICC unfortunately errors out.
using float_v = float __attribute__((vector_size(16)));
constexpr float_v broadcast(float x) { return float_v{x, x, x, x}; }
float test() { float_v v = broadcast(0); return v[0]; }
Does anyone know how to make this work on ICC without resorting to intrinsics?