Boost logo

Ublas :

Subject: Re: [ublas] Want to allocate my own C arrays
From: Alfredo Correa (correaa_at_[hidden])
Date: 2010-04-09 10:28:40


>> 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?

I once implemented a FFTW wrapper for boost.multiarray. To keep the
FFTW recommended alignment you have to code a custom allocator that
calls fftw_malloc.

I don't know if ublas supports custom allocators. Boost.Multiarray does.

Alfredo