[Pkg-octave-devel] indexing expression performance

Jaroslav Hajek highegg at gmail.com
Sat Jan 17 18:21:28 UTC 2009


On Sat, Jan 17, 2009 at 6:20 PM, Jordi Gutiérrez Hermoso
<jordigh at gmail.com> wrote:
> Okay, so I worked on the library a little. It looks like it's very
> easy, since it's a very small library, and it's kinda nice how fast
> Fortran compiles compared to C or C++ code.
>

Yes, this is always something I liked when compiling Octave - libcruft
is compiled in a flash. Using more advanced F95 or F2003 features
slows it down, but still not anywhere near C++.

> However, my Fortran ignorance begins to show. How are you supposed to
> use Fortran libraries? You don't use header files as with C and C++,
> right?

For using them from Fortran, no, you can use the implicit interface
generated for every call. For using them from C, a header file can be
written. So far I didn't do it, because it appears that providing it
is actually inconvenient for C++; in C++, it's more convenient to use
references than pointers (as in Octave's sources).

> All that a -dev package needs to ship is the .so binary,
> correct?

Yes. Same as is done, for instance, by lapack.  Maybe you may also
ship the static library (depends probably on a distro's culture).

> The EXPORTS file is presumably documentation that should go
> in a -doc package (doing that is my job, not yours, just thinking out
> loud).

The EXPORTS file just lists all the functions (C names) that need to
be exported from the dynamic library. It appears that it's not needed,
though, at least on Linux, the linker does export the symbols
automatically.

>
> I also don't think it's necessary name your package -src. It's on
> Sourceforge, of course it's source. :-)
>

OK. I thought it's standard, but after a little inspection, apparently
it's not really common. I'll rename the tarball back (last time,
hopefully).

> Documentation seems to be all in the source files... does Fortran have
> something like Doxygen that can extract documentation from source? If
> not, maybe I should write a Perlism to do so. That should be easy,
> since all the documentation is in the source files right after the
> copyright notice, correct?
>

Yes, including the subroutine statement (that should probably be
included). It should be fairly easy to extract with AWK, Perl, Python
or whatever (maybe even sed).


> - Jordi G. H.
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



More information about the Pkg-octave-devel mailing list