This is a simple code to generate a matrix representing the Mandelbrot set.
It requires the Vc library for the matrix generation and ROOT for the visualization.
How to build with clang:
clang++ -o Complex.o Complex.cpp -lVc -std=c++11If you want to check how much you earn from the vectorization of your code, try to compile it forcing the scalar implementation of the Vc library (no SIMD):
clang++ -o Complex.o Complex.cpp -lVc -std=c++11 -DVC_IMPL=ScalarIf you are using gcc just replace in the commands above clang++ with g++.
If you are using icc you have to replace clang++ with icc AND you have to append the -O1 option to the above listed commands. The -O1 option disables some speed optimizations of the compiler. Without that option in our tests the results obtained with the SIMD implementation are different with respect to the ones obtained with the scalar implementation (even though the resulting pictures are very similar and very nice).
You can find a more sophisticated version of this example in the repository of the Vc library.