Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- createPartitions :: StreamGraph -> PartitionMap -> PartitionedGraph
- generateCode :: GenerateOpts -> StreamGraph -> PartitionMap -> [String]
- data GenerateOpts = GenerateOpts {
- imports :: [String]
- packages :: [String]
- preSource :: Maybe String
- rules :: [RewriteRule]
- maxNodeUtil :: Double
- bandwidthLimit :: Double
- defaultOpts :: GenerateOpts
- type Partition = Int
- type PartitionMap = [[Int]]
- partitionGraph :: StreamGraph -> PartitionMap -> GenerateOpts -> IO ()
Documentation
createPartitions :: StreamGraph -> PartitionMap -> PartitionedGraph Source #
createPartitions
returns ([partitions], [inter-graph links])
where inter-graph links are the cut edges due to partitioning
generateCode :: GenerateOpts -> StreamGraph -> PartitionMap -> [String] Source #
Partitions the supplied StreamGraph
according to the supplied PartitionMap
and options specified within the supplied GenerateOpts
and returns a list of
the sub-graphs converted into source code and encoded as String
s.
data GenerateOpts Source #
Options for source code generation are captured in instances of the
GenerateOpts
data-type.
GenerateOpts | |
|
defaultOpts :: GenerateOpts Source #
Sensible default values for GenerateOpts
. Users who wish to customise
options in GenerateOpts
are encouraged to derive from defaultOpts
.
A Partition
, a.k.a. *Node*, in a deployment.
Eventually we may define properties about Partitions in these types. For
now they are considered to be homogeneous. The chosen type just needs to
be enumerable.
type PartitionMap = [[Int]] Source #
The user's desired partitioning of the input Graph. Each element in the outer-most list corresponds to a distinct partition. The inner-lists are the IDs of Operators to include in that partition.
partitionGraph :: StreamGraph -> PartitionMap -> GenerateOpts -> IO () Source #
Partitions the supplied StreamGraph
according to the supplied PartitionMap
;
invokes generateCode
for each derived sub-graph; writes out the resulting
source code to individual source code files, one per node.
- TODO*: move GenerateOpts to first parameter?