Printout statistics about cache occupation.
[tatoo.git] / src / utils / cache.mli
index dba9917..5827f6c 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-13 16:01:55 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-18 22:25:30 CET by Kim Nguyen>
 *)
 
 (** N-dimentional caches *)
@@ -23,49 +23,65 @@ module N1 :
 sig
 
   type 'a t
-  val create : int -> 'a -> 'a t
+  val create : 'a -> 'a t
   val find : 'a t -> int -> 'a
   val add : 'a t -> int -> 'a -> unit
   val dummy : 'a t -> 'a
   val iteri : (int -> 'a -> bool -> unit) -> 'a t -> unit
+  val stats : 'a t -> int*int
 end
 
 module N2:
 sig
     type 'a t
-    val create : int -> 'a -> 'a t
+    val create : 'a -> 'a t
     val find : 'a t -> int -> int -> 'a
     val add : 'a t -> int -> int -> 'a -> unit
     val dummy : 'a t -> 'a
     val iteri : (int -> int -> 'a -> bool -> unit) -> 'a t -> unit
+    val stats : 'a t -> int*int
 end
 
 module N3 :
   sig
     type 'a t
-    val create : int -> 'a -> 'a t
+    val create : 'a -> 'a t
     val find : 'a t -> int -> int -> int -> 'a
     val add : 'a t -> int -> int -> int -> 'a -> unit
     val dummy : 'a t -> 'a
     val iteri : (int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
+    val stats : 'a t -> int*int
   end
 
 module N4 :
   sig
     type 'a t
-    val create : int -> 'a -> 'a t
+    val create : 'a -> 'a t
     val find : 'a t -> int -> int -> int -> int -> 'a
     val add : 'a t -> int -> int -> int -> int -> 'a -> unit
     val dummy : 'a t -> 'a
     val iteri : (int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
+    val stats : 'a t -> int*int
   end
 
 module N5 :
   sig
     type 'a t
-    val create : int -> 'a -> 'a t
+    val create : 'a -> 'a t
     val find : 'a t -> int -> int -> int -> int -> int -> 'a
     val add : 'a t -> int -> int -> int -> int -> int -> 'a -> unit
     val dummy : 'a t -> 'a
     val iteri : (int -> int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
+    val stats : 'a t -> int*int
+  end
+
+module N6 :
+  sig
+    type 'a t
+    val create : 'a -> 'a t
+    val find : 'a t -> int -> int -> int -> int -> int -> int -> 'a
+    val add : 'a t -> int -> int -> int -> int -> int -> int -> 'a -> unit
+    val dummy : 'a t -> 'a
+    val iteri : (int -> int -> int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
+    val stats : 'a t -> int*int
   end