Suppose I have a 2 element vector defines as follows (using the GCC syntax for packed vectors)
// packed vector of 2-elements
typedef double v2d __attribute__((vector_size(sizeof(double)*2)));
v2d x = ...;
double y = ...;
x[0] = pow(x[0], y)
x[1] = pow(x[1], y)
I'd like to know if there's a faster way to do the two power computations using vector operations. The architecture is GCC on x86-64 and platform specific code is OK.
exp()
andlog()
. There may likely be too much branching to be able to get a worthwhile speedup via vectorizing. But I'm just speculating though. – Mysticialpow
function gcc,pow
for SSE types – phuclv