Module Core_extended.Packed_array

module type Basic : sig ... end

Basic is the minimal interface you need to provide to make a packed array for a new type.

module type S : sig ... end

S is the packed array interface.

module Make : functor (B : Basic) -> S with type elt := B.elt and type t := B.t

This is pretty pointless -- the GC will traverse a Make(B).t if and only if it would traverse the corresponding B.t. There is no sense in which the returned module implements a "packed" array.

module Of_binable : functor (B : sig ... end) -> S with type elt := B.t

The representation of a packed array type created using Of_binable is a Bin_prot buffer and a packed array of indices pointing to the beginning of each serialized element in the buffer.

module Tuple2 : functor (A : Basic) -> functor (B : Basic) -> sig ... end

the representation of a packed array of tuples is a tuple of packed arrays. This makes the zip_exn and unzip functions constant time.

module Of_packed_array : functor (P : S) -> sig ... end

Of_packed_array(P) creates a packed array of packed arrays. The representation is a P.t and packed array of indices into it which point to the beginning of each inner array.

module Bool : S with type elt := bool

These primitive packed arrays are represented by their respective Bigarray types.

module Char : S with type elt := char
module Int : S with type elt := int
module Int8_unsigned : S with type elt := int
module Int8 : S with type elt := int
module Int16_unsigned : S with type elt := int
module Int16 : S with type elt := int
module Int32 : S with type elt := int32
module Int64 : S with type elt := int64
module Float32 : S with type elt := float
module Float : S with type elt := float
module String : S with type elt := string