Advanced.Pool
Memory pool for efficient allocation/deallocation
type t = {
device : Device.t;
mutable total_allocated : int64;
mutable allocations : int;
}
val create : Device.t -> _initial_size:int -> t
Create a new memory pool on device
val alloc : t -> ('a, 'b) Vector.kind -> int -> ('a, 'b) Vector.t
Allocate from pool
val reset : t -> unit
Reset pool - free all allocations
val destroy : t -> unit
Destroy pool
val stats : t -> int * int64
Get pool statistics