The PRIMITIVES signature

« 210 Library Documentation

Overview

The PRIMITIVES signature provides a few “primitive” operations for parallel evalution.

Interface

val par : (unit → α) * (unit → β) → (α * β)
val par3 : (unit → α) * (unit → β) * (unit → γ) → (α * β * γ)
val parTab : int * (int → α) → (int → α)

Values

val par : (unit → α) * (unit → β) → (α * β)
(par (f, g)) evaluates $f$ and $g$ in parallel, and is logically equivalent to $(f(), g())$.
val par3 : (unit → α) * (unit → β) * (unit → γ) → (α * β * γ)
(par3 (f, g, h)) evaluates $f$, $g$, and $h$ in parallel and is logically equivalent to $(f(), g(), h())$.
val parTab : int * (int → α) → (int → α)
(parTab (n, f)) evaluates $f(i)$ for every $0 \leq i < n$ in parallel, and is logically equivalent to $f$.