Version française
Home     About     Download     Resources     Contact us    
Browse thread
Platforms and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Benedikt Rosenau <Benedikt.Rosenau@d...>
Subject: Platforms and OCaml

Hello,

I am new to this list and fairly new to OCaml as well. To
my other shortcomings belongs that I do not speak French
except for a few phrases. 

Nonetheless, I have some questions regarding the possible
use of OCaml on vector computers. Vector computers work by
putting iterated pieces of code on an "assembly line", so
that each part of the assembly line does one specified
operation on its operands and feeds its output into the next
station on the assembly line.

The trouble with vector computers is that this induces a
fixed order of evaluation for the iterated code. Or the
other way around: given a certain loop, the compiler has to
find out whether this loop is vectorizable, and that task
is non-trivial. Further, there are only so many operations,
mostly numeric operations, provided by the vector units.

Now, I think that a vectorizing compiler for OCaml is a
nice vision, almost as nice as world peace, yet I wonder
if OCaml cannot be put to a different use. I may be off
track here, but it seems that abstract datatypes together
with an interface to an existing and vectorizing C compiler
might do the trick.

One way to convince the compiler that a certain piece of
code may be vectorized would be to provide the "assembly
line" as a datatype and to ensure that only functions based
on the operations in the vector unit get applied to data
of this type. From my naive point of view, Bigarrays seem
promising, but maybe streams would fare better.

Comments, critique? Do I make sense at all?
   Benedikt