Chapter 31 The bigarray library

The bigarray library has now been integrated into OCaml’s standardlibrary.

The bigarray functionality may now be found in the standard libraryBigarray module,except for the map_file function which is nowpart of the Unix library. The documentation hasbeen integrated into the documentation for the standard library.

The legacy bigarray library bundled with the compiler is acompatibility library with exactly the same interface as before,i.e. with map_file included.

We strongly recommend that you port your code to use the standardlibrary version instead, as the changes required are minimal.

If you choose to use the compatibility library, you must link yourprograms as follows:

  1. ocamlc other options bigarray.cma other files
  2. ocamlopt other options bigarray.cmxa other files

For interactive use of the bigarray compatibility library, do:

  1. ocamlmktop -o mytop bigarray.cma
  2. ./mytop

or (if dynamic linking of C libraries is supported on your platform),start ocaml and type #load "bigarray.cma";;.