[vsipl++] Matlab IO

Assem Salama assem at codesourcery.com
Mon May 22 17:57:30 UTC 2006


Mark,
  Yes, I have tested the formatter with octave and it works. I don't 
have Matlab but it seams like octave is compatible in the file loading 
and saving.

Assem Salama

Mark Mitchell wrote:
> Assem Salama wrote:
>   
>> Everyone,
>>  This patch allows a user to output a matrix using the Matlab binary
>> format or the Matlab m file format.
>>     
>
> Good!
>
> I think Stefan should review this formally for check-in.
>
>   
>> +  // some structures to helps determine if a type is single precision
>> +  template <typename T>
>> +  struct Is_single
>> +  { static bool const value = false; };
>> +
>> +  template <>
>> +  struct Is_single<float>
>> +  { static bool const value = true; };
>> +
>> +  template <>
>> +  struct Is_single<std::complex<float> >
>> +  { static bool const value = true; };
>>     
>
> Depending on what you mean by "single-precision" this may not be the
> right test.  For example, you might mean "32-bit IEEE", which is not
> necessarily the same as "float"; on some systems "double" is 32-bits as
> well, and on other systems "float" can be 16 bits, or not IEEE format.
>
> Were you able to test that the format is correct by loading it into
> Matlab (or Octave)?
>
> Thanks,
>
>   




More information about the vsipl++ mailing list