ddc-core-flow-0.3.2.1: Disciplined Disciple Compiler data flow compiler.

Safe HaskellNone

DDC.Core.Flow.Process

Synopsis

Documentation

data Process Source

A process applies some series operators and produces some non-series result.

We get one of these for each top-level series function in the original program.

Constructors

Process 

Fields

processName :: Name

Name of whole process. This is taken from the function name in the original source code.

processParamTypes :: [BindF]

Type parameters to process. These are the type parameters of the original function.

processParamValues :: [BindF]

Value parameters to process. These are the value parameters of the original function.

processContexts :: [Context]

Flow contexts in this process. This contains a ContextRate entry for all the Rate variables in the parameters, along with an entry for all the nested contexts introduced by the process itself.

processOperators :: [Operator]

Flow operators in this process.

processStmts :: [LetsF]

Top-level statements that don't invoke stream operators. These are typically statements that combine reduction results, like the addition in (fold (+) 0 s1 + fold (*) 1 s1).

INVARIANT: The worker functions for stream operators do not mention any of the bound variables.

processResultType :: TypeF
 
processResult :: ExpF
 

Instances

data Operator Source

An abstract series operator.

Each of the constructors holds all the information we need to produce code for that operator.

Constructors

OpId

Connect a series from one place to another. These don't come from the source program, but are useful for during code generation.

Fields

opResultSeries :: BindF

Binder for result series.

Binder for result series.

opInputRate :: TypeF

Rate of input series.

Rate of input series.

Rate of all input series.

Rate of input series

opInputSeries :: BoundF

Bound of input series.

Bound of input series.

Bound of input series.

opElemType :: TypeF

Type of a series element.

Type of the elements.

OpCreate

Convert a series to a manifest vector.

Fields

opResultVector :: BindF

Binder for result vector

opInputRate :: TypeF

Rate of input series.

Rate of input series.

Rate of all input series.

Rate of input series

opInputSeries :: BoundF

Bound of input series.

Bound of input series.

Bound of input series.

opAllocRate :: Maybe TypeF

Rate that should be used when allocating the vector. This is filled in by patchAllocRates.

opElemType :: TypeF

Type of a series element.

Type of the elements.

OpMap

Apply a function to corresponding elements in several input series of the same rate, producing a new series. This subsumes the regular map operator as well as zipWith like operators where the input lengths are identical.

Fields

opArity :: Int

Arity of map, number of input streams.

opResultSeries :: BindF

Binder for result series.

Binder for result series.

opInputRate :: TypeF

Rate of input series.

Rate of input series.

Rate of all input series.

Rate of input series

opInputSeriess :: [BoundF]

Names for input series.

opWorkerParams :: [BindF]

Worker input parameters

opWorkerBody :: ExpF

Worker body.

Worker body

OpFold

Fold all the elements of a series.

Fields

opResultValue :: BindF

Binder for result value.

opInputRate :: TypeF

Rate of input series.

Rate of input series.

Rate of all input series.

Rate of input series

opInputSeries :: BoundF

Bound of input series.

Bound of input series.

Bound of input series.

opZero :: ExpF

Starting accumulator value.

opWorkerParamIndex :: BindF

Worker parameter for index input. Should be BNone for OpFlowFold, but something for OpFlowFoldIndex

opWorkerParamAcc :: BindF

Worker parameter for accumulator input.

opWorkerParamElem :: BindF

Worker parameter for element input.

opWorkerBody :: ExpF

Worker body.

Worker body

OpPack

Pack a series according to a selector.

Fields

opResultSeries :: BindF

Binder for result series.

Binder for result series.

opInputRate :: TypeF

Rate of input series.

Rate of input series.

Rate of all input series.

Rate of input series

opInputSeries :: BoundF

Bound of input series.

Bound of input series.

Bound of input series.

opOutputRate :: TypeF

Rate of output series.

opElemType :: TypeF

Type of a series element.

Type of the elements.