Skip to content

Nikola Sequential Extension Notes

dybber edited this page Feb 5, 2013 · 4 revisions

This wiki page is a note scratch space for extending Nikola with a sequential construct.

See Common Qualifiers for explanation of implicit name qualification, and Nikola Architecture for more thorough dissection of Nikola.

Description

Nikola programs (E.Exp t a values ) should be compiled to programs that are executed in a par-seq style. By this we mean that a program is executed as a sequence of parallel actions, where each parallel action only contains sequential sub-computations.

To alleviate the pains from apparently nested programs, parallelism flows inward, as illustrated by:

  • map map f: The maps are executed sequentially, while f is par-seq

  • map map (sequential f): The outer map is executed sequentially, while the inner map is executed in parallel.

  • map (sequential $ map f): The outer map is executed in parallel, while the inner map and f are sequential.

Implications

  • S.Exp extended with a SequentialExecE Exp constructor (trivial extension)

  • CC.compileExp is extended to generate different code for each of the par-seq, par and seq modes of execution.

  • R.Reifiable instances should remain untouched

Survey "VectorMARK" in progress

Clone this wiki locally