Hi, I’m trying to look at the SIMD stuff in JUCE and I made a quick sine LFO using 2D rotation
SIMDRegister<double> mod1XY;
SIMDRegister<double> mod1SC;
SIMDRegister<double> mod1CS;
setup...
mod1XY.set(0, 0.0);
mod1XY.set(1, 1.0);
double a = .0001;
mod1CS.set(0,cos(a));
mod1CS.set(1,sin(a));
mod1SC.set(0, -sin(a));
mod1SC.set(1, cos(a));
double getLFO()
{
SIMDRegister<double> mod = mod1XY * mod1CS;
SIMDRegister<double> mod2 = mod1XY * mod1SC;
mod1XY.set(0, mod.get(0) + mod.get(1));
mod1XY.set(1, mod2.get(0) + mod2.get(1));
return (mod1XY.get(0));
}
But it seems quite long winded for doubles, especially without the swizzling. Plus the get and set seem to go though a lot of code. Is it a waste of time, or am I doing something wrong?
Thanks,
Dave