FastFlow Building Blocks
High-level Parallel Patterns
Notable Parallel Patterns
Are they enough? Do we have all we need?
Do it yourself!
By combining and customizing core patterns and basic mechanisms
By using the structured parallel programming methodology even for building high-level parallel patterns as well as Run-Time Systems (RTSs)
FastFlow 3.0 stack
M. Torquati. “Harnessing Parallelism in Multi/Many-Cores with Streams and Parallel Patterns.” Ph.D. Thesis in Computer Science, 2019
FastFlow Builing Block layer
FastFlow Building Blocks
sequential
nodes
channels
Pipeline composition
Parallel nodes
Why Building Blocks?
Aldinucci, S. Campa, M. Danelutto, P. Kilpatrick, and M. Torquati. “Design patterns percolating to parallel programming framework implementation.” International Journal of Parallel Programming, 2014.
FastFlow Building Blocks
FastFlow Building Blocks
r=svc3(svc2(svc1(x)))
svc1
svc2
svc3
FastFlow Building Blocks
FastFlow Building Blocks
FastFlow Building Blocks
Sequential BBs recap
Parallel BBs recap
Composition Rules
Rule1
Rule2
Rule3
Composition Rules
Rule1
Rule2
Rule3
Input/Output cardinality
Graphs that cannot be built with Building Blocks
… all the interesting ones (structured approach)
Only a subset of all possible concurrency graphs can be built ….
Building Blocks composition example
Building Blocks composition examples
Simple usage examples
Concurrency Graph Transformer
Basic idea
Example
Example
How to help the programmer to introduce such transformations
in the FF’s high-level layer? Specialized nodes?
Nodes reduction
Nodes reduction
Farm fusion
Farm combine
Case1
Case2
Case3
Farm combine
All-to-all introduction
Example
All-to-all introduction
Ferret Example
Ferret FastFlow code
35
Ferret transformations
All-to-all introduction example
All-to-all introduction example
Further research on BBs (some options)