Re: Octave Code Manual?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Octave Code Manual?

JD Cole
Clinton,
    As far as I know, there isn't a "code doc" for Octave, but it's very
well designed c++. You might try using doxygen on the src tree to
produce some documentation to help you find your way.

In the short term, there are two types of functions that you may be
interested in finding: built-in and dynamic. In the source the builtins
are defined like the following:

DEFUN (eye, args, ,
  ".....endless function doc string here...")

eye, as you can see by typing "help eye" in the Octave interpreter, is a
builtin function, all builtin functions are aggregated into a single
file, builtins.cc, at compile time. Since many, if not all, builtin
functions are defined in groups, and consequently, single files, you may
try using grep in the Octave "src" directory like this:

grep -lr "DEFUN (eye" *

where eye can be replaced with any of the builtin functions.

Dynamically loaded function may emanate from more than source tree, if
you have installed octave-forge. Generally, dynamically loadable files
are found in a .cc file of the same name, for example lsode is found in
lsode.cc. Those included with Octave can be found in src/DLD-FUNCTIONS/
or you could use the grep "cheat" above.


On the subject of parallizing Octave things, I've done a bit of work,
some of it loosely based on OpenMP. I be interested in hearing about
your angle, if you're so inclined.


-JD

FYI, you may get better responses to questions about Octave code if you
post to [hidden email].

Clinton Chee wrote:

> Dear John Eaton and Octave Minders,
>
> I am starting the task to parallelize Octave using OpenMP on SMP
> machines (64bit). Is there documentation (Not Users Manual) on the
> layout and structure of the code?
>
> For example, say I want to optimize the Matlab function "eye". Is
> there documentation that leads me into the appropriate source file
> where the "eye" code is found?
>
> Thanks for your help.
>
>
> Cheers,
> clinton
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Octave Code Manual with Doxygen?

Clinton Chee-2
Hi JD and Doxygen users,

Have anyone successfully used doxygen on the octave code? I tried it and
receive the error below.
I ran doxygen from the root of the code base, in my case, it is:
/nfs/users01/unsw/chee/programs/octave-2_1_50

Is the octave code too large for doxygen?

The error is:
///
...
...
Preprocessing
/nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.cc...
Preprocessing
/nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.d...
Preprocessing
/nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.h...
Preprocessing
/nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.list...
Preprocessing
/nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.o...
input buffer overflow, can't enlarge buffer because scanner uses REJECT

JD Cole wrote:

> Clinton,
>    As far as I know, there isn't a "code doc" for Octave, but it's
> very well designed c++. You might try using doxygen on the src tree to
> produce some documentation to help you find your way.

Cheers,
Clinton


Reply | Threaded
Open this post in threaded view
|

Re: Octave Code Manual with Doxygen?

JD Cole
Clinton,
    I built the  doxygen docs no problem, I have attached the Doxygen
(config) file. I think your problem is that within that file you have to
specify which files you want doxygen to parse. If you didn't do that it
may try to parse all of them. If you look at the output you gave, it's
trying to parse an object file which is a) won't produce any relevant
results, and b) object files are huge, that's probably why you got the
buffer overflow. Compare the attached doxygen file to the defaut file
generated by doxygen -g, and you'll see the difference. (By the way it's
a big file, so use diff or something like that.)

JD

Clinton Chee wrote:

> Hi JD and Doxygen users,
>
> Have anyone successfully used doxygen on the octave code? I tried it
> and receive the error below.
> I ran doxygen from the root of the code base, in my case, it is:
> /nfs/users01/unsw/chee/programs/octave-2_1_50
>
> Is the octave code too large for doxygen?
>
> The error is:
> ///
> ...
> ...
> Preprocessing
> /nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.cc...
> Preprocessing
> /nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.d...
> Preprocessing
> /nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.h...
> Preprocessing
> /nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.list...
>
> Preprocessing
> /nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.o...
> input buffer overflow, can't enlarge buffer because scanner uses REJECT
>
> JD Cole wrote:
>
>> Clinton,
>>    As far as I know, there isn't a "code doc" for Octave, but it's
>> very well designed c++. You might try using doxygen on the src tree
>> to produce some documentation to help you find your way.
>
>
> Cheers,
> Clinton
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
>



Reply | Threaded
Open this post in threaded view
|

Re: Octave Code Manual with Doxygen?

JD Cole
In reply to this post by Clinton Chee-2
Miquel,
    The problem is indeed the inclusion of object files. Doxygen let's you
specify which files, via regular expression, it should parse. Generally, *.cc
*.h  and the lex and parse suffixes *.l and *.y should get you most of the way.

JD

Quoting Miquel Cabanas <[hidden email]>:

> hi,
>
> i'm not a doxygen user, but...
>
>
> On Fri, Feb 27, 2004 at 11:44:40AM +1100, Clinton Chee wrote:
> >
> > Have anyone successfully used doxygen on the octave code? I tried it and
> > receive the error below.
> >
> > /nfs/users01/unsw/chee/programs/octave-2_1_50/liboctave/Array-flags.o...
> > input buffer overflow, can't enlarge buffer because scanner uses REJECT
> >
>
> this seems to be an object file (already compiled), are you sure
> doxygen handles this type of files? i would expect it to only handle
> code files...
>
> fwiw,
>
> Miquel
>
> --
> Miquel E Cabanas ------------------------------------------------------
> SeRMN, Universitat Autonoma de Barcelona ([hidden email])
> ------------------------------------------o-oo--ooo---ooo--oo-o--------
>