caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Markus Mottl" <markus.mottl@gmail.com>
To: "Jon Harrop" <jon@ffconsultancy.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Not Rocket Science
Date: Sun, 2 Mar 2008 18:21:32 -0500	[thread overview]
Message-ID: <f8560b80803021521g1a2c3c93oc2d3db371bdbd5ac@mail.gmail.com> (raw)
In-Reply-To: <200803021041.55208.jon@ffconsultancy.com>

On Sun, Mar 2, 2008 at 5:41 AM, Jon Harrop <jon@ffconsultancy.com> wrote:
>  However, I would like to stress that these are trivial changes. For
>  example, my random matrix eigenvalue demo required only three tiny changes
>  to bring it up to date with respect to the latest Lacaml library.
>  Specifically, this:
>
>   open Lacaml.S
>   ...
>   let m = Mat.of_array m in
>   ignore (geev m);
>
>  becomes:
>
>   let m = Lacaml.Mat4_S.of_array m in
>   ignore (Lacaml.Impl.S.geev m);

The idiomatic way of implementing this now would be to open the
library as follows:

  open Lacaml.Impl.S

Then you can refer to the matrix module as "Mat" as usual, and you can
call all Lapack/Blas functions directly (also as usual).  The reason
for this change was the need to pack all Lacaml modules into their own
namespace.  At the time when Lacaml started out there was no packing
feature for libraries.  This change was reflected in the README.

Note that just by changing "S" to "D" when opening the library, you
can automatically switch your code from single to double precision
without having to change anything else.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


      parent reply	other threads:[~2008-03-02 23:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02 10:41 Jon Harrop
2008-03-02 11:46 ` Re : [Caml-list] " Adrien
2008-03-02 12:54   ` documentation (Re: Re : [Caml-list] Not Rocket Science) Oliver Bandel
2008-03-03  9:03     ` Oliver Bandel
2008-03-02 14:55   ` [Caml-list] Not Rocket Science Jon Harrop
2008-03-02 13:14 ` Richard Jones
2008-03-02 23:21 ` Markus Mottl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8560b80803021521g1a2c3c93oc2d3db371bdbd5ac@mail.gmail.com \
    --to=markus.mottl@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).