octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementation of convn


From: Fredrik Lingvall
Subject: Re: Implementation of convn
Date: Thu, 27 Mar 2008 10:31:48 +0100
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

Søren Hauberg wrote:
tor, 27 03 2008 kl. 09:52 +0100, skrev Fredrik Lingvall:
I'm the maintainer (and co-author) of an acoustic simulation toolbox that contains two convolution functions which may be of interest. These functions (conv_p and fftconv_p) are aimed at large problems and have thread support. The (GPLed) toolbox can be found here: http://www.signal.uu.se/Toolbox/dream/

I had a quick look at the web page, but I couldn't find a more detailed
description of the functions you mention. Do they handle N-dimensional
data, or are they limited to 1D and 2D? The implementation I made of
'convn' isn't particular wonderful. It's quite simple, but it could be
faster (don't use increment_idx). If you have fast/robust
implementations of ND convolution, perhaps you could suggest a patch?

Søren

The functions are for 1D convolutions where the inputs can be (are) matrices. You can find more info at the user manual section of the webpage but here is also the help output from fftconv_p:

>> help fftconv_p
 fftconv_p(A,B,n_cpus,wisdom_str_in);

 FFTCONV_P - Computes the one dimensional convolution of the
 columns in matrix A and the matrix (or vector) B.

 Input parameters:

 `A'
      An M x N matrix.

 `B'
      A K x N matrix or a K-length vector. If B is a vector each
      column in A is convolved with the vector B.

 `n_cpus'
      Number of threads to use. n_cpus must be greater or equal to
      1.

 `wisdom_str_in'
      Optional parameter. If the wisdom_str_in parameter is not
      supplied then `fftconv_p' calls fftw wisdom plan functions
      before performing any frequency domain operations. This
      overhead can be avoided by supplying a pre-computed fftw
      wisdom string wisdom_str_in. For more information see the
      fftw user manunal available at `http://www.fftw.org'.

 Output parameters:

 `Y'
      The (M+K-1) x N output matrix.

 `wisdom_str_out'
      Optional parameter. If the wisdom_str_out output parameter is
      supplied then `fftconv_p' will call fftw wisdom plan
      functions and return the wisdom string which then can be used
      to speed up subsequent calls to `fftconv_p' by suppying the
      string as the input argument wisdom_str_in.

 NOTE: fftconv_p requires the FFTW library version 3
 `http://www.fftw.org'.

 fftconv_p is a part of the DREAM Toolbox available at
 `http://www.signal.uu.se/Toolbox/dream/'.

 Copyright (C) 2006-2008 Fredrik Lingvall.

 See also: conv_p, fftconv, conv, fftw_wisdom.

/Fredrik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]