package kcas_data

  1. Overview
  2. Docs

Explicit transaction log passing on accumulators.

val add : xt:'x Kcas.Xt.t -> t -> int -> unit

add a n increments the value of the accumulator a by n. add operations can be performed scalably in parallel.

val incr : xt:'x Kcas.Xt.t -> t -> unit

incr a is equivalent to add a 1.

val decr : xt:'x Kcas.Xt.t -> t -> unit

decr a is equivalent to add a (-1).

val get : xt:'x Kcas.Xt.t -> t -> int

get a returns the current value of the accumulator.

CAUTION: Performing a get is expensive and can limit scalability.

val set : xt:'x Kcas.Xt.t -> t -> int -> unit

set a n sets the current value of the accumulator a to n.

OCaml

Innovation. Community. Security.