A pipeline is a chain of processing elements such as functions, threads etc., arranged so that the output of each element is the input of the next. We often encounter this pattern in practice. C++ also allows us to write in this way, e.g. using the std::ranges
library with its characteristic overloaded pipe operator |
. But modern C++ enables much more and this will be discussed in this talk. First, we’ll show how to implement a custom pipeline framework that employs std::expected
, available since C++23. Secondly, we will show pipelines in the serial version, where the functions communicate the results of their calculations, as well as in the parallel version, in which at least one thread operates on each link. In the last case we will need synchronized queues – and here we will also show how std::expected
can be used again to create a flexible interface. Everyone is welcome!
Boguslaw Cyganek is a researcher and lecturer at the Department of Electronics, AGH University of Krakow, Poland. He has worked as a software engineer for a number of companies such as Nisus Writer USA, Compression Techniques USA, Manta Corp. USA, Visual Atoms UK, Wroclaw University in Poland, and Diagnostyka Inc. Poland. His research interests include computer vision and ML/AI, as well as the development of embedded systems. His teaching interests include computer vision, ML/AI and software development in C++. His classes on C++ programming were attended by hundreds of students, some of them currently working as software engineers in various worldwide companies. He published approximately 200 scientific papers, and he was a presenter at many conferences. Prof. Boguslaw Cyganek is also the author of many books, including “Introduction to Programming with C++ for Engineers”, IEEE-Wiley, 2021.