Merge branch 'master' of ssh://git.nguyen.vg/tatoo
[tatoo.git] / src / cache.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
9 (*  Recherche Scientifique. All rights reserved.  This file is         *)
10 (*  distributed under the terms of the GNU Lesser General Public       *)
11 (*  License, with the special exception on linking described in file   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 (*
17   Time-stamp: <Last modified on 2013-03-18 22:25:30 CET by Kim Nguyen>
18 *)
19
20 (** N-dimentional caches *)
21
22 module N1 :
23 sig
24
25   type 'a t
26   val create : 'a -> 'a t
27   val find : 'a t -> int -> 'a
28   val add : 'a t -> int -> 'a -> unit
29   val dummy : 'a t -> 'a
30   val iteri : (int -> 'a -> bool -> unit) -> 'a t -> unit
31   val stats : 'a t -> int*int
32 end
33
34 module N2:
35 sig
36     type 'a t
37     val create : 'a -> 'a t
38     val find : 'a t -> int -> int -> 'a
39     val add : 'a t -> int -> int -> 'a -> unit
40     val dummy : 'a t -> 'a
41     val iteri : (int -> int -> 'a -> bool -> unit) -> 'a t -> unit
42     val stats : 'a t -> int*int
43 end
44
45 module N3 :
46   sig
47     type 'a t
48     val create : 'a -> 'a t
49     val find : 'a t -> int -> int -> int -> 'a
50     val add : 'a t -> int -> int -> int -> 'a -> unit
51     val dummy : 'a t -> 'a
52     val iteri : (int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
53     val stats : 'a t -> int*int
54   end
55
56 module N4 :
57   sig
58     type 'a t
59     val create : 'a -> 'a t
60     val find : 'a t -> int -> int -> int -> int -> 'a
61     val add : 'a t -> int -> int -> int -> int -> 'a -> unit
62     val dummy : 'a t -> 'a
63     val iteri : (int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
64     val stats : 'a t -> int*int
65   end
66
67 module N5 :
68   sig
69     type 'a t
70     val create : 'a -> 'a t
71     val find : 'a t -> int -> int -> int -> int -> int -> 'a
72     val add : 'a t -> int -> int -> int -> int -> int -> 'a -> unit
73     val dummy : 'a t -> 'a
74     val iteri : (int -> int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
75     val stats : 'a t -> int*int
76   end
77
78 module N6 :
79   sig
80     type 'a t
81     val create : 'a -> 'a t
82     val find : 'a t -> int -> int -> int -> int -> int -> int -> 'a
83     val add : 'a t -> int -> int -> int -> int -> int -> int -> 'a -> unit
84     val dummy : 'a t -> 'a
85     val iteri : (int -> int -> int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
86     val stats : 'a t -> int*int
87   end