Vector Class Discussion

mathematical library functions
Author:  Date: 2013-03-27 09:51
I have generalized my Mandelbrot set code using templates to now work on float, double, Vec4f, Vec8f, Vec4d, and Vec2d. I create the colors using log, sin, and cos functions using "vectorclass_extra.h". For the standard math libraries everything works fine. I'm using Visual Studio 2012 and compiling in 64bit on a Intel Sandy-Bridge 2600K.
I test SSE and AVX. My code runs over 20x faster using Vec8f and four cores (OpenMP) than single float on one core.

I downloaded AMD libm developer.amd.com/tools/cpu-development/libm/. This is a bit faster on my Intel CPU but the images appear wrong for Vec4d and Vec2d. SSE or AVX does not matter. There appears to be a problem for double floating point.

I downloaded an evaluation version of Intel Parallel Studios and linked in svml_dispmt.lib and libircmt.lib. For SSE this draws stripes down the screen. For AVX it shows the image but it's note entirely correct. I have not tested using the GCC compiler on Linux yet. SVML has the fastest results but since the results are all wrong it's not very useful.

So currently I get the best results using LIBM for Vec8f and the standard math libraries for Vec4d.

Have you had similar experiences with these libraries? Do you have any other suggestions on how to use them?

 
thread check if all elements of a vector are zero new - chad - 2013-03-21
last replythread check if all elements of a vector are zero new - Agner - 2013-03-21
last replythread mathematical library functions - chad - 2013-03-27
last replythread mathematical library functions new - chad - 2013-03-30
last reply mathematical library functions new - Agner - 2013-04-01