From: Fokko B. <fpb...@gm...> - 2008-05-11 21:34:53
|
Dear Blitz++-users, Please allow me to introduce CVMLCPP, a library that offers some nice features such as an easy front-end to the FFTW, convolution & correlation, but also a voxelizer. With minimal effort, it is usable with Blitz++: only some wrappers are needed. Example: #include <cassert> #include <algorithm> #include <base/BlitzArray> #include <signal/Fourier> using namespace cvmlcpp; // Have a blitz++ array blitz::Array<int, 3> a(3, 4, 5); std::fill(a.begin(), a.end(), 7); // Create a wrapper around "a" for cvmlcpp-compatibility BlitzArray<int, 3> ba(a); assert( (3*4*5*7) == std::accumulate(ba.begin(), ba.end(), 0)); // Create output and a wrapper blitz::Array<std::complex<double>, 3> a_fft(3, 4, 5); BlitzArray<std::complex<double>, 3> ba_fft(a); // Compute 3D-Fourier tranform with "fftw" doDFT(ba, ba_ffft); The BlitzArray<..> class is usable as a regular blitz::Array, it is just a subclass providing some glue. The library has been tested with gcc 4.1 / 4.2 and blitz 0.9, all as provided on Ubuntu 8.04. Should you be interested, the CVMLCPP is available (under GPL) here: http://tech.unige.ch/cvmlcpp/ Documentation: http://tech.unige.ch/cvmlcpp/source/doc/ Specific information about the use of Blitz++ / CVMLCPP: http://tech.unige.ch/cvmlcpp/source/doc/BlitzArray.html A more extensive example can be found here: http://tech.unige.ch/cvmlcpp/source/testing/testBlitzArray.cc Of course I hope you find the CVMLCPP library useful, and if not, please do excuse the spam. Comments, suggestion, critique and patches are welcome, but please do understand that my time is somewhat limited. As usual, the use of this code is entirely on your own risk. Best regards, F. Beekhof P.S. Due to trouble with my email-client, this message may appear twice. Sorry. |