caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Fw: [Caml-list] Complex numbers in OCaml
@ 2001-03-29 21:35 David McClain
  0 siblings, 0 replies; only message in thread
From: David McClain @ 2001-03-29 21:35 UTC (permalink / raw)
  To: caml-list


----- Original Message -----
From: "David McClain" <dmcclain1@mindspring.com>
To: "Xavier Leroy" <Xavier.Leroy@inria.fr>
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-29 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-29 21:35 Fw: [Caml-list] Complex numbers in OCaml David McClain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).