Large Foreign Arrays for OCAML -- Code Released

From: David McClain (
Date: Fri Mar 05 1999 - 06:30:24 MET

From: "David McClain" <>
To: "Liste CAML" <>
Subject: Large Foreign Arrays for OCAML -- Code Released
Date: Thu, 4 Mar 1999 22:30:24 -0700

I apologize for the double posting... This one should be in plain text!

The code implementing Large Foreign Numeric Arrays for OCAML is now released
and available at my Web site. You can download the sources from my homepage.
This code has been used extensively for the past month for heavy-duty image
processing of large image stacks, so it appears to be quite robust. But, of
course, should it fail on you, please let me know about it.

There is an "arena" type declared as equivalent to a "float array", but in
fact, this subverts the type checking system and the object may or may not
be a float array. As a result, be careful and do not attempt any array
operations on such objects, except for Array.unsafe_get and
Array.unsafe_set, typically within tight "" loops.

The zip file named "" contains two OCAML sources and two C++
sources implementing the foreign arrays. Array size is limited by your
address space now, and can be as large as 2^29 elements (of doubles, or 2^31
elements of bytes) on a 32-bit architecture.

David McClain
Sr. Scientist
Raytheon Missile Systems Co.
Tucson, AZ

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:20 MET