The instruction exists (vbroadcastss zmm/m32
) but there seems to be no intrinsic to generate it.
I can code it as
static inline __m512 mybroadcast(float *x) {
__m512 v;
asm inline ( "vbroadcastss %1,%0 "
: "=v" (v)
: "m" (*x)
);
return v;
}
Is there a way to do this without inline asm?
I think _mm512_set1_ps
is what you want.
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_set1_ps&expand=5236,4980