MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Generating C++BLAS wrapers with Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14707] Generating C++BLAS wrapers with Mathematica
  • From: Anton Antonov <anton at unidhp1.uni-c.dk>
  • Date: Tue, 10 Nov 1998 01:21:00 -0500
  • Organization: UNI-C, Denmark
  • Sender: owner-wri-mathgroup at wolfram.com

    Hi,
    I made some Mathematica program for generating the C++ wrappers for
the BLAS subroutines.  We wanted to use the overloading facilities of
C++ in order to get some of the arguments by default. Than the possible
calls become too many because if we take for example the _GEMM routine
it has 13 arguments:

_GEMM(MajorOrder,TransposeA,TransposeB,M,N,K,alpha,A,LDA,B,LDB,beta,C,LDC)

If each argument could be or could be not in a particular call this
means 2^13 possible argument lists for a call of the routine. Of course
we impose some restrictions some of the arguments to be always in the
argument list. After these restrictions the possible calls for _GEMM
are 754. Still too many. The total amount of the BLAS routines is about
40. So some automatic generation for the wrappers is needed. This could
be done by some of the script languages but I choose Mathematica
because the functions written by it could serve as (or easily
transferred to) a mathematical proof that the code generated is correct
according to the C++ overloading resolution mechanism.
    Now my questions are: Do you think it is something valuable to be
documented? (I mean the Mathematica programs and their use as a proof.)
I think "Yes" but may be I am wrong. And how valuable will be this
documentation? To write it like a technical report or to post it
somewhere? If it have to be posted where?

    I would like hear more opinions for that because I consider the
possibility these endeavors to be trivial.

    Thank you very much

    Anton


  • Prev by Date: Re: Vector Fields
  • Next by Date: Re: Simple MathLink question
  • Previous by thread: Re: ODEs and phase portraits
  • Next by thread: Bivariate Normal Distributions -- can they be estimated in my lifetime?