Boost logo

Ublas :

Subject: [ublas] Want to allocate my own C arrays
From: Paul Dugas (paul_at_[hidden])
Date: 2010-04-08 15:29:04


I'm poking around to see if I can find a way to marry uBLAS vector and
matrix data with the DFT implementation provided by the FFTW library.
FFTW operates on 1, 2 and 3 dimensional C-style arrays of real and
complex values.  There's also support for multi- operations that can
perform DFTs on multiple arrays at the same time; i.e. arrays and
arrays and arrays of matrices.  There is a C++ wrapper for FFTW but
it's still using the C-style arrays for the data.  The algorithms I
need to implement would ideally utilize uBLAS for much of the math and
call wrapped FFTW routines to perform DFTs.

I started looking at the c_vector<> and c_matrix<> templates.  The way
they expose the underlying C-array with the data() method seemed
promising.  Then I noticed it's not new'ing the array.  Turns out FFTW
operates better if the values are aligned just so in memory.  Is there
something along the lines of c_vector<> that takes an allocator
template parameter?

Paul
________________________________

Paul Dugas • Computer Engineer • paul_at_[hidden] • +1.404.932.1355