[vsipl++] [patch] Matlab IO
Jules Bergmann
jules at codesourcery.com
Wed Oct 31 15:35:21 UTC 2007
>
>> - 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.
> 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 for the feedback. I like the suggestion (and implemented it :).
It avoids hard coding the directory path at configure.
Patch applied as attached.
-- Jules
--
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: matlab2.diff
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20071031/fc128804/attachment.ksh>
More information about the vsipl++
mailing list