Re: Fortran 90 MAT FIle I/O module



Duane Bozarth wrote:
> Christopher Hulbert wrote:
>
> ....
>
>>FMat_VarReadInfo is my api, it returns 0 on success, non-zero on error. None of my code relies on
>>matlab functions, so you can disregard any thought of Matlab's API.
>
>
> OK, no wonder I didn't recollect the name. :)
> Thought maybe TMW had changed the API since I last looked at it (which
> has been the proverbial long time now)... :)
>
>
>>...Yes, the intent was to
>>sequentially try to read variables from a file. And just because FMat_VarReadInfo fails on
>>int32name (let's say because the variable didn't exist) doesn't mean it won't succeed for int16name.
>
>
> Hmmm....that would seem to depend on how the Fortran READ and other file
> positioning was/is done. It would take some sort of machination to read
> the same data stream again so w/o those one can only assume...

Well, the underlying functions are in C. First of all it's much easier to deal with zlib that way
since it's in C. Plus good old void * for masking the data type in function calls (still getting
used to having to write a fortran function for each possible type and rank (ugh)). If you're
interested, my library is on the FEX. with fseek/etc, I can move all around the file (at the cost
performance depending on how wild you do stuff). Generally though it seems to be quick. It even
has partial I/O (hyperslabs in HDF) so I can read all/part/some/stride through datasets. So if you
have an enourmous matrix, you could read in part of that at a time. I have not optimized the
partial I/O by any means though. The C library although not done, is fairly complete. I'm trying
to write a fortran wrapper to that library.
.



Relevant Pages

  • Re: Why C?
    ... The API results in C code that is not easy to follow. ... automatic conversion and negligible help in the Visual C++ 6.0 compiler. ... So, for code longevity, simple charactre prompts, using Fortran, seems to be ... C++, then Java (less so, for direct hardware access), then C# (again, less ...
    (comp.compilers.lcc)
  • OO Definitions
    ... By this definition, Fortran 95 is an Object Oriented language, however ... member functions and data may be), and classes are not objects, but are ... "API" user. ...
    (comp.lang.fortran)
  • Re: Can Fortran be used with DirectX to make games for Windows?
    ... live action capabilities. ... Fortran is  not the Tool for the type of job can you have in your ... Rather than calling a specific or proprietary API, ... It has minimal impact on performance with todays graphics boards. ...
    (comp.lang.fortran)
  • Re: I/O in PURE and ELEMENTAL procedures in Fortran 2008
    ... many other purposes such as system programming, interfacing with OS ... I do not advocate a Fortran language which forces me to write ... many of them are written in C (or the API is written for C) which has ...
    (comp.lang.fortran)
  • Re: I/O in PURE and ELEMENTAL procedures in Fortran 2008
    ... many other purposes such as system programming, interfacing with OS ... I do not advocate a Fortran language which forces me to write ... many of them are written in C (or the API is written for C) which has ...
    (comp.lang.fortran)