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
[Caml-list] Re: OCaml speed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-11-08 (17:56)
From: Thorsten Ohl <ohl@h...>
Subject: Re: [Caml-list] Re: complex bigarrays writes:

> But most of the LAPACK complex routines do expect to see regular

You're right.  I was incorrectly generalizing from DGEEV etc. that
take real arrays as input return (among others) complex vectors.  The
latter are represented as two real array.  Routines that take complex
inputs represent them as COMPLEX arrays.

> So I would vote to represent complex bigarrays using a single array 
> with real and imaginary parts of each element adjacent to each other in 
> that order.

I fully agree.  Even if my generalization had been correct, I would
still have voted for this, because it conforms to the Fortran language

> I have read (some where) that this might cause problems with some C
> compilers on some machines. That is, if we define struct {float re;
> float im} A[10]; Then the entries in A may not be packed together as
> we might expect.

AFAIK, the C compiler is free to pad structures for better alignment,
resulting in better performance.  Isn't it even free to reorder
Thorsten Ohl, Physics Department, TU Darmstadt -- [<=== PGP public key here]
Bug reports:  FAQ:
To unsubscribe, mail  Archives: