[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to combine several functions in a single oct-file?

From: Lukas Reichlin
Subject: Re: How to combine several functions in a single oct-file?
Date: Sun, 12 Feb 2012 23:36:35 +0100

On 12.02.2012, at 23:12, Michael Goffioul wrote:

> On Fri, Feb 10, 2012 at 8:50 AM, Carlo de Falco <address@hidden> wrote:
>> 2012/2/10 Lukas Reichlin <address@hidden>:
>>> Dear Octave community,
>>> I noticed that "which arrayfun" points to cellfun.oct (octave 3.6.0). This 
>>> means that both arrayfun and cellfun are stored in a single oct-file. Now I 
>>> wonder how octave knows that it finds arrayfun in cellfun.oct? Does octave 
>>> load all oct-files on startup? I thought that a function "foo" has to be 
>>> located in foo.m, foo.oct or in the same m-file as the calling function.
>>> Background: My control package has dozens of oct-files and I like to 
>>> combine them in just a few oct-files. They all use the SLICOT Fortran 
>>> library and I compiled the required parts of it into every single oct-file. 
>>> I think it would be better if the Fortran code would be stored in one big 
>>> oct-file that offers all the user functions. Like cellfun.oct.
>>> Thanks for any insights and best regards,
>>> Lukas
>> Have a look at the command "autoload", it should do what you ask,
>> you can also look at the PKG_ADD commands in packages combinatorics
>> and odepkg for inspiration.
>> If you use this approach, be aware that it has some side effects:
> There is (or used to be) the PKG_DEL counterpart to PKG_ADD. But
> what's missing is autounload (such feature request makes sense imo).
> The other possibility is to put all the common code into a single
> shared library, then link all oct-files to that library.
> Michael.

Hi Michael,

I like your idea of a single shared library very much. Is it possible to create 
such a library out of SLICOT upon package installation? It would be nice if I 
could link it the same way as the BLAS and LAPACK libraries.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]