~ubuntu-branches/ubuntu/trusty/ocamlnet/trusty

« back to all changes in this revision

Viewing changes to src/netmulticore/netmcore_bigarray.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-09-02 14:12:33 UTC
  • mfrom: (18.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110902141233-zbj0ygxb92u6gy4z
Tags: 3.4-1
* New upstream release
  - add a new NetcgiRequire directive to ease dependency management
    (Closes: #637147)
  - remove patches that were applied upstream:
    + Added-missing-shebang-lines-in-example-shell-scripts
    + Try-also-ocamlc-for-POSIX-threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(* $Id: netmcore_bigarray.mli 1580 2011-04-14 16:06:32Z gerd $ *)
 
2
 
 
3
(** Shared bigarrays
 
4
 
 
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}).
 
10
 
 
11
    Note that bigarrays do not exist as part of a memory pool, but are
 
12
    always indepdendent shared objects.
 
13
 *)
 
14
 
 
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
 
21
      ID.
 
22
      
 
23
      The caller of these functions counts as user of the bigarray, and
 
24
      needs to release the resource when it is done.
 
25
   *)
 
26
 
 
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.
 
37
      
 
38
      The caller of these functions counts as user of the bigarray, and
 
39
      needs to release the resource when it is done.
 
40
   *)