[PYTHON MATRIX-SIG] LAPACK module questions
Doug Heisterkamp
drh@oasis.unl.edu
Tue, 13 Feb 1996 16:13:07 -0600 (CST)
''
>
> We'd be interested in hearing about your parser. We face many tasks like
> this.
Actually, parser may be a little to generous to describe it. I wrote it
as a throwaway program target at f2c version of the Lapack source code.
It scans for the first function definition in a file and grabs it. The
parameter list is parsed and depending on the parameter type, different
information is added to the end of a number of different lists. These
lists are then used to generate the C function to access the original
function. The first comment after the function definition is placed as
the __doc__ attribute of the access function. Of course this is written
in python.
I made a number of assumption about the parameter list. The main one
is that I assume that all parameters which are double or complex are
actually pointers to arrays. This was needed since in the C version,
both a double and an array of doubles is referred to as double *a, in
the function definition. I will have to change the cases where this is
the wrong assumption by hand. Until I make the change, the function could
still be used, but it would be necessary to place the double in a python
array object of a single element and then use this array object in the
function call.
Similarly, I made the assumption that all integer parameters are not
arrays. My goal was to get close and then make changes as needed.
Doug
> --
> Paul F. Dubois, L-472 (510)-422-5426
> Lawrence Livermore National Laboratory FAX (510)-423-9969
> Livermore, CA 94550 dubois1@llnl.gov
> Consulting: PaulDubois@aol.com
>
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================