From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA21986 for caml-red; Thu, 19 Oct 2000 17:13:26 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA16951 for ; Thu, 19 Oct 2000 13:37:11 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id e9JBb8L07024; Thu, 19 Oct 2000 13:37:08 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA17371; Thu, 19 Oct 2000 13:37:07 +0200 (MET DST) Message-ID: <20001019133707.42818@pauillac.inria.fr> Date: Thu, 19 Oct 2000 13:37:07 +0200 From: Xavier Leroy To: Chris Hecker Cc: caml-list@inria.fr Subject: Re: single-precision floats, etc. References: <4.3.2.7.2.20001018081700.033cdef0@walt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <4.3.2.7.2.20001018081700.033cdef0@walt>; from Chris Hecker on Wed, Oct 18, 2000 at 08:20:43AM -0700 Sender: weis@pauillac.inria.fr > >I think that maybe what you are looking for is the bigarray library > >that appeared with ocaml 3.00. > > I looked at that, but I really wanted to do the actual operations in > caml code, not in a library (if possible). So, I'd like to write an > LU decomposition routine in caml that's as fast as C code (or close > enough), for example. Going out to another language is inconvenient > at best, compared to just writing down the code you want (like you > would in C). I don't understand your point. The bigarray library provides support for large numerical arrays with the associated operations, but you still write the code that use these arrays in Caml. Indeed, the code is almost the same as if you'd used the standard array type; you just write b.{x} and b.{x,y} instead of a.(x) and a.(x).(y). *You* are not "going out to another language"; the system might, in order to implement some of the bigarray operations (and some of the regular array operations as well!), but why should you care? Now, it is true that one of the goals of the Bigarray library is to facilitate interoperability with C and Fortran code: by having the same array layout as these languages, arrays can be passed back and forth without copying. But you may ignore this aspect of the library for now, and just use it in Caml for working with large, compact arrays of numbers. - Xavier Leroy