FastFlow tutorial

Marco Aldinucci,Marco Danelutto,Massimo Torquati
DOI: https://doi.org/10.48550/arXiv.1204.5402
2012-04-24
Abstract:FastFlow is a structured parallel programming framework targeting shared memory multicores. Its layered design and the optimized implementation of the communication mechanisms used to implement the FastFlow streaming networks provided to the application programmer as algorithmic skeletons support the development of efficient fine grain parallel applications. FastFlow is available (open source) at SourceForge (<a class="link-external link-http" href="http://sourceforge.net/projects/mc-fastflow/" rel="external noopener nofollow">this http URL</a>). This work introduces FastFlow programming techniques and points out the different ways used to parallelize existing C/C++ code using FastFlow as a software accelerator. In short: this is a kind of tutorial on FastFlow.
Distributed, Parallel, and Cluster Computing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to provide an efficient method for developing and executing fine - grained parallel applications, especially for shared - memory multi - core architectures. FastFlow is a structured parallel programming framework, aiming to achieve this goal through its hierarchical design and optimized communication mechanisms. Specifically, the paper addresses the following key issues: 1. **High - order parallel programming**: FastFlow promotes the development of high - level parallel programming, especially pattern - based explicit parallel programming (i.e., skeleton programming). This enables developers to build parallel applications more easily without having to deeply understand the complexity of the underlying parallel mechanisms. 2. **Effective utilization of multi - core architectures**: FastFlow aims to facilitate effective programming of applications on multi - core architectures. By providing efficient parallel pattern support, developers can fully utilize the performance of multi - core processors. 3. **Support for fine - grained parallel applications**: FastFlow is particularly suitable for implementing fine - grained stream - parallel applications. By providing common stream - parallel patterns (such as pipeline and farm), FastFlow supports developers in building complex parallel applications. 4. **Software accelerator**: FastFlow can also be used as a software accelerator, that is, to use the unused cores in the multi - core architecture to accelerate the execution of sequential code. This allows developers to parallelize only part of the code to improve performance without rewriting the entire application. 5. **Simplifying parallel programming**: By providing an easy - to - use programming interface and abstractions, FastFlow simplifies the development process of parallel applications. Developers can quickly build parallel applications by inheriting the `ff_node` class and using predefined parallel patterns. In summary, by introducing the design principles, installation steps, basic usage methods, and specific programming examples of FastFlow, this paper aims to help developers understand and master how to use FastFlow to develop efficient parallel applications.