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] Bigarray map & set/get (long)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-23 (20:19)
From: Christophe TROESTLER <Christophe.Troestler@u...>
Subject: Re: [Caml-list] Bigarray map & set/get
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.)


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 Archives:
Bug reports: FAQ:
Beginner's list: