Browse thread
thousands of CPU cores
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-07-14 (17:16) |
From: | Richard Jones <rich@a...> |
Subject: | Re: [Caml-list] thousands of CPU cores |
On Mon, Jul 14, 2008 at 01:08:23PM +0100, Jon Harrop wrote: > I believe you are correct. Moreover, I suspect that adding support for OpenMP > to OCaml would be difficult because the current OCaml implementation is > thread unsafe. OpenMP isn't your typical library. It's a set of wierd preprocessor directives which are added directly into C/C++ code (and I believe FORTRAN too). Things like: #pragma omp parallel for for (i = 0; i < 100; i++) { a[i] = k * b[i]; } The, erm, feature here is that the code still gives the same result (just more slowly) if the #pragmas are simply ignored. I recently saw Ulrich Drepper giving a talk about OpenMP and it was interesting in a 'what are the C programmers smoking nowadays' kind of way. The barriers to porting OpenMP to OCaml go far beyond lack or otherwise of concurrent garbage collection. Rich. -- Richard Jones Red Hat