ltfat / libltfat

Backend library for LTFAT
http://ltfat.github.io/libltfat
GNU General Public License v3.0
12 stars 2 forks source link

Multi-dimensional data handling in the backend #13

Open susnak opened 6 years ago

susnak commented 6 years ago

Add "leading dimension"-parameters to all input and output signals specification in the C library. The "leading dimension" is a LAPACK terminology counting the number of element in memory between the start of a vector and the start of the next vector, in cases where multiple vectors are processed. Adding leading dimensions makes it possible to work with submatrices or subimages without copying.

FFTW has a similar, but more powerful concept, working in more dimensions than two. This is the "dist" parameter:

http://www.fftw.org/doc/Advanced-Complex-DFTs.html#Advanced-Complex-DFTs

Evaluate the need/effectiveness of this and implement a solution (retrofit it to all the existing routines).

susnak commented 6 years ago

We should aim at being compatible with the internal memory organization of the N-dimensional array from Numpy. Essentially, it boils down to adding support for non-contiguous indexing of a 1d array using strides.