
On 29/03/2011 13:56, Domagoj Saric wrote:
"Mathias Gaunard" <mathias.gaunard@ens-lyon.org> wrote in message news:imsgh3$90h$1@dough.gmane.org...
No. The library that will become Boost.SIMD already exists outside of Boost, as part of the NT2 project. It already has support for SSE and AVX, and basic support for AltiVec that needs to be improved.
Would it be possible to design Boost.SIMD so that it allows switching between different implementations/backends. For example OS X already provides the Accelerate framework so I might want to/need to use that, or I might want/need to use Intel's MKL or AMD's ACML-MV or Framewave...?
I'm looking for a library to replace Framewave (which seems to be dead for almost two years and might perhaps be useful for scavenging), for relatively simple 1D vector operations (multiplication, addition, trigonometric functions, log, exp...), if NT2 already supports those (SSE1 and optionally SSE2 versions) it would be a great place to start with/as an intermediate solution while waiting for Boost.SIMD...(?)
Boost.SIMD does not have first-class support for 1D vectors. It only works with SIMD registers. It's up to you to allocate your memory (which you can do using the SIMD allocator), load/store SIMD registers from/to it (which you can do using the SIMD iterator adaptor), run or parallelize loops, etc. There aren't many solutions to implement most basic functions, so I don't really see the point of providing a backend that calls some other library instead of calling the couple of native instructions supported by the processor. As for MKL, it provides fast implementations of math functions. We are not certain yet whether those will be part of Boost.SIMD or not -- indeed, maybe Boost.SIMD should only contain 'trivial' arithmetic and bitwise functions. In any case, our implementations of the trigonometric and exponential math functions are faster and more accurate than those of MKL. There could be, however, wrappers on top of MKL in NT2. We already have that for several other libraries.