Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Announcement: LACAML
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-01-25 (08:07)
From: Markus Mottl <mottl@m...>
Subject: Announcement: LACAML

as recently proposed, there should be some interface to the BLAS and
LAPACK-libraries for efficiently doing linear algebra with bigarrays.
I have just put my first attempt ("lacaml") online: it only implements
a couple of functions that I wanted to try out, but I have tried to
design this interface as cleanly as possible. Installation should be
simple enough, too.

Adding further functionality to this library by following the
implementation of the other functions is not difficult either (thanks
to the bigarrays), but it still requires some work, because the
FORTRAN-function interfaces are usually very fat: they often take more
than 10 arguments. This means writing a lot of error checking code if
one wants to handle all errors in OCaml - the default error handling
of these libraries is probably not advisable, because it aborts program

Here is a part of the README explaining some features:

  * The BLAS- and LAPACK-libraries have evolved over about two decades
    of time and are therefore extremely mature both in terms of stability
    and efficiency.

  * The OCaml-interface was designed in a way to combine both the
    possibility of gaining optimum efficiency (e.g. by allowing the
    creation of work arrays outside of loops) with simplicity (thanks
    to labels and default arguments).

  * The code is precision-independent (precision of floats). There are
    two modules that implement exactly the same interface modulo the
    precision type. If you refer to elements in this interface only,
    your code becomes precision-independent, too: you can choose at
    anytime whether you want to use single-precision or double-precision
    simply by "open"ing the required module.

  * You can fully exploit the library within multithreaded programs: most
    numerical routines are likely to run for a long time, but they will
    never block other threads. This also means that you can execute
    several routines at the same time on several processors if you use
    native threads.

  * To make things easy for people used to the "real" implementation
    in FORTRAN but also for beginners who need detailed documentation,
    both function- and argument names have been kept compatible to the
    ones used in the BLAS- and LAPACK-documentation. Only exception: you
    need not prefix functions with "s" or "d" to indicate the precision
    of floats, because OCaml gives us more powerful means to choose it.

I have already registered the project at SourceForge so that other people
can contribute functions they need (I will only implement ones that are
directly relevant to my work, but I will help if there are problems):

Just tell me if you want to join!

Unfortunately, there are currently some technical problems with CVS at
SourceForge, which didn't allow me to check in my sources yet. In the
meanwhile you can get them from here:

Best regards,
Markus Mottl

Markus Mottl,,