aaragon
10/20/2008 3:53:00 AM
On Oct 19, 7:49 pm, Peng Yu <PengYu...@gmail.com> wrote:
> Hi,
>
> Expression template can be used for the implementation of simple
> operators without using temporaries (e.g. the ones in the book C++
> Template).
>
> I'm wondering whether expression template is useful for the
> convolution operation.
>
> For example, I have two arrays a1 and a2. To compute the convolution
> between them I need to compute the FFT of both of them, which shall be
> stored in two temporary arrays. These arrays then shall be multiplied
> and FFT back, which also need a temporary arrays. There are totally
> three temporary arrays.
>
> It seems that expression template would not reduce the number of
> temporary arrays. Are there any better way to reduce the temporaries?
>
> Thanks,
> Peng
If you want to reduce temporaries, try to read Alexandrescu's mojo
code. Expression templates are too advanced for what you need to do,
so it may not pay the time in coding it. Hope it helps,
aa