1
(* $Id: netmcore_bigarray.mli 1580 2011-04-14 16:06:32Z gerd $ *)
5
This modules allows to easily create bigarrays that are shared between
6
worker processes. The access to the bigarrays is managed via
7
{!Netmcore.res_id} resource IDs. The lifetime of the bigarray can be
8
controlled by releasing the resource ID - if all workers release the
9
ID, the bigarray is deleted (see {!Netmcore.release}).
11
Note that bigarrays do not exist as part of a memory pool, but are
12
always indepdendent shared objects.
15
val create_bigarray : ('a, 'b) kind -> 'c layout -> int array -> res_id
16
val create_bigarray1 : ('a, 'b) kind -> 'c layout -> int -> res_id
17
val create_bigarray2 : ('a, 'b) kind -> 'c layout -> int -> int -> res_id
18
val create_bigarray3 : ('a, 'b) kind -> 'c layout -> int -> int -> int -> res_id
19
(** Create bigarrays like [Bigarray.Genarray.create] and
20
[Bigarray.ArrayX.create] in a shared resource and return the resource
23
The caller of these functions counts as user of the bigarray, and
24
needs to release the resource when it is done.
27
val map_bigarray : res_id -> ('a, 'b) kind -> 'c layout -> int array ->
28
('a,'b,'c) Bigarray.Genarray.t
29
val map_bigarray1 : res_id -> ('a, 'b) kind -> 'c layout -> int ->
30
('a,'b,'c) Bigarray.Array1.t
31
val map_bigarray2 : res_id -> ('a, 'b) kind -> 'c layout -> int -> int ->
32
('a,'b,'c) Bigarray.Array2.t
33
val map_bigarray3 : res_id -> ('a, 'b) kind -> 'c layout -> int -> int -> int ->
34
('a,'b,'c) Bigarray.Array3.t
35
(** Maps bigarrays to this worker process. The arguments describing the
36
bigarray must be the same as at the time the bigarray was created.
38
The caller of these functions counts as user of the bigarray, and
39
needs to release the resource when it is done.