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 XAA17592; Thu, 29 Mar 2001 23:34:41 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 XAA17551 for ; Thu, 29 Mar 2001 23:34:40 +0200 (MET DST) Received: from barry.mail.mindspring.net (barry.mail.mindspring.net [207.69.200.25]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2TLYc906786 for ; Thu, 29 Mar 2001 23:34:38 +0200 (MET DST) Received: from dylan (1Cust94.tnt3.tucson.az.da.uu.net [63.11.144.94]) by barry.mail.mindspring.net (8.9.3/8.8.5) with SMTP id QAA00998 for ; Thu, 29 Mar 2001 16:34:37 -0500 (EST) Message-ID: <001301c0b898$1d482120$210148bf@dylan> From: "David McClain" To: Subject: Fw: [Caml-list] Complex numbers in OCaml Date: Thu, 29 Mar 2001 14:35:01 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk ----- Original Message ----- From: "David McClain" To: "Xavier Leroy" Sent: Thursday, March 29, 2001 2:34 PM Subject: Re: [Caml-list] Complex numbers in OCaml > > As Markus mentioned, I'm considering extending the Bigarray module to > > handle complex numbers as well. This would help interfacing with > > Fortran, and provide essentially the same data representation than in > > C and Fortran. > > If you do this you need to be aware that: > > 1. Most C representations use arrays in which real and imaginary parts are > in adjacent memory addresses, interleaved throughout the entire array, and > > 2. Most Fortran representations use separate arrays for the real parts and > the imaginary parts. > > I say "most" based purely on my own personal experiences with all the glue > code I have had to write to interface to the IMSL, NAG, MatLab, BLAS, and > MKL code. > > My experiments here have shown me that there is a real speed penalty on > Pentium II and III architectures for the separate array versions of code, > contrasted with the interleaved structure versions. I can only assume that > this has to do with data locality and cache performance. > > I ultimately gave up trying to come up with a "standard" array > representation, except within my own little universe. I was quite surprised > to find that a data structure as fundamental as an array of numbers can have > so many different implementations. > > - DM > ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr