I found a bug in the LibM branch of vectormath.h (VECTORMATH = 1) for the Vec2d cos function. static inline Vec2d cos (Vec2d const & x) //cosine
return amd_vrd2_sin(x);
}
It should be amd_vrd2_cos(x). When I change it the LibM library works for double floating point as well now. In other news, I tried my Mandelbrot code on Linux. I installed the free non-commercial Intel C++ compiler for Linux. SVML works fine for me on Linux and is faster than LibM. I still have not got it to work on Windows. In case your interest, here is class I found which implements exp, log, sin, cos, and sincos with AVX. It gives me the fastest results for my Mandelbrot code. Even faster than SVML. It only works for Vec8f though and does not work on Visual Studio. I may try and generalize for Vec8f, Vec4f, and Vec2d for GCC and Visual Studio.
software-lisc.fbk.eu/avx_mathfun/ |