c - SIMD (SSE) instruction for division in GCC -
i'd optimize following snippet using sse instructions if possible:
/* * data structure */ typedef struct v3d v3d; struct v3d { double x; double y; double z; } tmp = { 1.0, 2.0, 3.0 }; /* * part should "optimized" */ tmp.x /= 4.0; tmp.y /= 4.0; tmp.z /= 4.0;
is possible @ all?
i've used simd extension under windows, have not yet under linux. being said should able take advantage of divps
sse operation divide 4 float vector 4 float vector. using doubles, you'll want sse2 version divpd
. forgot, make sure build -msse2
switch.
i found page details sse gcc builtins. looks kind of old, should start.
Comments
Post a Comment