|
Ublas : |
Subject: Re: [ublas] Snapshot 20081116
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2008-11-25 08:25:44
Thomas Klimpel wrote:
> [snip]
>
> My plan with the script was to first get it working with "python
> lapack_extractor.py c*.f" and "python lapack_extractor.py s*.f" called
> inside the lapack-3.1.1/SRC directory, and then think about how to
> "refactor" the script.
>
> Regards,
> Thomas
I've spent a couple of hours in rewriting the script. Life is much easier
with regular expressions :-). Right now, it
* parses all LAPACK source files correctly (s,d,c, and z)
* correctly creates a full lapack_names.h and lapack.h
* creates a function_name.hpp for each type-overloaded function, needs some
more work in passing by reference etc., but that's kind of trivial
Please find attached examples of the generated includes, an example of a
generated function body, as well as the rewritten lapack_parser script.
We could add some logic and python-template-C++-template code to have nearly
full automated generation of all of LAPACK in the bindings. Eventually, if
really needed, custom pieces for each function could be merged by the
script as well.
I'm curious to hear what you guys think!
Kind regards,
Rutger