Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Fw: [Caml-list] Complex numbers in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David McClain <dmcclain1@m...>
Subject: Fw: [Caml-list] Complex numbers in OCaml

----- 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
> to find that a data structure as fundamental as an array of numbers can
> so many different implementations.
> - DM

To unsubscribe, mail  Archives: