From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 20643BBC1 for ; Mon, 3 Mar 2008 00:21:34 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CACrFykfRVcirhmdsb2JhbACDIY1PAQEBBwUECQoYkSeINg X-IronPort-AV: E=Sophos;i="4.25,435,1199660400"; d="scan'208";a="23273237" Received: from wf-out-1314.google.com ([209.85.200.171]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Mar 2008 00:21:33 +0100 Received: by wf-out-1314.google.com with SMTP id 25so5468532wfa.15 for ; Sun, 02 Mar 2008 15:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=nTowDPGWREvmTK0bR547yrSc1Rg72UPQ5/DHYwDIWFc=; b=donLG1aLZZOmzezZnjLA0O0pCAdQ1mN3b+e4/C32C4hyS4dJkQ3O06nIBVPXaALC/0FF+1eIFLPPRSd59LfpuPbwoYecrEwtyZt0xCmtu2OVH21e2DOwNtT2otdUDGHBzd9RneRuPvtrnjCcu1sFkLmqgrjqnmF5MIHfKoenbJo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gICiFO9bLjaE7iFeaiKBr9JQq+bKTXUcKjY3EED3CbEGCfZRwpwh7vr8+cBNa5sayME5YkRBesObQeo9+xauA/mTjbQp6zt2x8MtYWIKp1XKVe/ehfPFzRLibqVpNwshFCtUa+0KdhHkrP/XoRWEy0RYUBUwBTtYIuA3p5F/Mg0= Received: by 10.142.201.3 with SMTP id y3mr8596846wff.120.1204500092312; Sun, 02 Mar 2008 15:21:32 -0800 (PST) Received: by 10.142.102.3 with HTTP; Sun, 2 Mar 2008 15:21:32 -0800 (PST) Message-ID: Date: Sun, 2 Mar 2008 18:21:32 -0500 From: "Markus Mottl" To: "Jon Harrop" Subject: Re: [Caml-list] Not Rocket Science Cc: caml-list@yquem.inria.fr In-Reply-To: <200803021041.55208.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200803021041.55208.jon@ffconsultancy.com> X-Spam: no; 0.00; markus:01 mottl:01 markus:01 mottl:01 trivial:01 lacaml:01 lacaml:01 impl:01 impl:01 lapack:01 blas:01 ocaml:01 wrote:01 caml-list:01 functions:01 On Sun, Mar 2, 2008 at 5:41 AM, Jon Harrop 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