Boost logo

Ublas :

Subject: Re: [ublas] [bindings] Lapack generator
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-01-11 10:40:54

> All your bugreports (incorrectly generated code/asserts/etc.), comments,
> questions, ideas, etc. are very welcome! I will start a discussion around
> the proposal for a more abstract lapack interface in a new thread.

    static void operator()( $LEVEL1, workspace$WORKSPACE_SIZE< $WORKSPACE_TYPES >& work ) {
should be
    static void operator()( $LEVEL1, workspace$WORKSPACE_SIZE< $WORKSPACE_TYPES > work ) {

    static void operator()( $LEVEL1, minimal_workspace& work ) {
should be
    static void operator()( $LEVEL1, minimal_workspace work ) {

    static void operator()( $LEVEL1, optimal_workspace &work ) {
should be
    static void operator()( $LEVEL1, optimal_workspace work ) {

int $groupname( $LEVEL2, Workspace &work = optimal_workspace() ) {
should be
int $groupname( $LEVEL2, Workspace work = optimal_workspace() ) {

Reason: The workspace-object itself just forwards references, or tags the intended behavior. The code in templates.hpp:88 will not compile in its current form, because non-const references to temporary objects are not allowed.
templates = read_templates( 'templates.hpp' )
might be changed to
templates = read_templates( 'templates.hpp' )
PyDict_Update( templates, read_templates( 'singleton_templates.h' )

Reason: Placing the templates for "lapack.h", "lapack_names.h" and "lapack.hpp" into singleton_templates.h has two advantages. The first advantage is that the name "singleton" indicates that only one instance of these files will be generated. The second advantage is, that the complete current content of "lapack.h", "lapack_names.h" and "lapack.hpp" can be pasted into singleton_templates.h, and $CONTENT would indicate where to place the automatic generated code between the old code. Together with some explicit control about which bindings get generated, this would allow a smooth transition from the existing bindings to automatically generated bindings as they become available (so the lines corresponding to a specific old binding would be deleted from singleton_templates.h, as the old binding is replaced by an automatically generated binding).