[vsipl++] [patch] Matlab IO

Stefan Seefeld stefan at codesourcery.com
Wed Oct 31 14:23:50 UTC 2007


Jules Bergmann wrote:
> This patch
> 
>  - Cleans up parts of the matlab IO interface.  In particular,
>     - fixes endian issues with the iterator interface,
>     - fixes confusion about writing version,
>     - adds informative exceptions on failures
>     - adds comments on file format
>     - minor renaming for coding standards compliance

This looks good.

>  - Extends the matlab_bin_file test to also read pre-canned .mat
>    files in little- and big-endian format.

Our QMTest database does have support for tests involving input. Some
FFT tests are doing this already: The test consists in running an
executable (which has been compiled by means of a 'resource'), passing
it a particular file as argument. I wonder whethere we could simply do
the same here, e.g. 'matlab/bin_file.cpp' would name a resource, while
'matlab/X.mat' and 'matlab/Y.mat' would name tests. (For QMTest to
detect this, we'd simply have to follow the same layout as the FFT
tests, i.e. have a 'matlab_bin_file' directory, containing a source
file, as well as a 'data' subdirectory with the input (.mat) files.
The source file automagically maps to a 'CompiledResource', while the
data/*.mat files map to 'ExecutableTests' that run the previously
compiled resource, passing the input file as argument...

(And, as with the FFT tests, we could encode into the input file names
how they are to be processed by the executable, e.g. 'le' and 'be' to
tell the applet about endianness.



>  - Adds a lsmat utility to list contents of a matlab file through
>    the iterator interface.

Wonderful !

> Ok to apply?

Please take the above merely as a suggestion. If you would rather keep
the current layout, I'd suggest to base the computation of the input
filenames on the __FILE__ macro, rather than generating the directory
name via configure.

Thanks,
		Stefan

-- 
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718



More information about the vsipl++ mailing list