Is it possible in GCC to use a structure or class as a vector type for SSE instructions?
sort of:
typedef struct vfloat __attribute__((vector_size(16))) {
float x,y,z,w;
} vfloat;
Instead of canonical:
typedef float v4sf __attribute__ ((vector_size(16)));
union vfloat {
v4sf v;
float f[4];
};
It would be very convenient, but I can not get it to work.
source
share