From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA22518; Tue, 23 Jul 2002 22:19:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA22551 for caml-list@pauillac.inria.fr; Tue, 23 Jul 2002 22:19:21 +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 PAA14527 for ; Mon, 22 Jul 2002 15:00:34 +0200 (MET DST) Received: from abel (nat.umh.ac.be [193.190.193.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6MD0X110092; Mon, 22 Jul 2002 15:00:33 +0200 (MET DST) Received: from abel ([127.0.0.1] helo=localhost ident=trch) by abel with esmtp (Exim 3.35 #1 (Debian)) id 17Wcqh-0008Dp-00; Mon, 22 Jul 2002 15:03:39 +0200 Date: Mon, 22 Jul 2002 15:03:38 +0200 (CEST) Message-Id: <20020722.150338.41185299.Christophe.Troestler@umh.ac.be> To: xavier.leroy@inria.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Bigarray map & set/get From: Christophe TROESTLER In-Reply-To: <20020722113136.A10720@pauillac.inria.fr> References: <20020719.155940.19123621.Christophe.Troestler@umh.ac.be> <20020722113136.A10720@pauillac.inria.fr> Organization: Universite de Mons-Hainaut X-URL: http://www.umh.ac.be/math/an/ X-PGP-Fingerprint: CD33 D53D ED2B 6BE5 9018 6867 AD21 AA3F 9028 12D0 X-Spook: TWA cypherpunk David John Oates MD5 M-14 smuggle Blowpipe SAFE Compsec quiche X-Mailer-URL: http://www.mew.org/ X-Operating-System: GNU/Linux (http://www.linux.org/) X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 22 Jul 2002, Xavier Leroy wrote: > > > [...] one thing that will always be necessary is to make CAML > > functions act on arrays. > > [...] the time-critical computations are done by external libraries > such as BLAS, Lapack, etc. [...] Ok, that's reasonable for arithmetic operations or standard routines like linear equation solving --- and that's what I am moving towards. Now, the code uses all along some arbitrary functions f: float -> float, g : float -> float -> float,... that allow to run the program for a large class of equations. Of course, sooner or later I need to perform some operations on the bigarrays that involve these functions, the simplest form of which is map : ?out:('a, 'b, 'c) Bigarray.Array1.t -> ('a -> 'd) -> ('a, 'b, 'c) Array1.t -> ('d, 'b, 'c) Array1.t (the same as in Array except one can specify the output matrix). My questions are: * Wouldn't these kind of functions be great to have in the standard Bigarray module? (They would also make it closer to the Array one, hence easing the transition when needed.) * If I want to implement them myself, are there any hints to reach maximal efficiency? (Especially w.r.t. callbacks.) Regards, ChriS P.S. Since my code is experimental, efficiency it not the primary concern. It just doesn't have to be too slow... (we still need to make a great deal of runs to have an insight...) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners