Module type Vec.S

type t
type data
type op = {
slot : Hardcaml.Signal.t;(*

Slot to perform operation at

*)
op : Hardcaml.Signal.t;(*

Operation type (insert, remove or nothing)

*)
insert_data : data;(*

Data to insert into the vec

*)
delete_data : data;(*

Data written to the emptied slot in the vec

*)
}

Operation performed on the vec circuit.

val create : Hardcaml.Reg_spec.t -> vec_size:Base.int -> next:( index:Base.int -> data -> data ) -> op -> t

Create the vec with the given size.

next defines a function which can set the register when not performing an insert or delete operation.

val get : t -> index:Base.int -> data

Get the value at the given index.

val read_mux : t -> index:Hardcaml.Signal.t -> data

Create a read multiplexer

val vec_size : t -> Base.int

Size of vec