Use Intel TBB library and Parallel STL in Autoware
Description
Show how parallel STL can be used within Autoware.Auto using C++17 and IntelTBB.
Purpose
To make algorithms work parallel easier using parallel STL.
The main target of this issue is #878 (closed) to rewrite its parallel parts using this method. And help developers utilize it with a simple demo node and documentation.
Desired Behavior
After modifying the CMakeLists.txt
of the target node, it should be possible to have some code like following compiled:
#include <algorithm>
#include <execution>
//...
std::vector<int> numbers{1, 2, 3, 4, 5};
int sum_of_numbers = std::reduce(
std::execution::par_unseq,
nums.begin(),
nums.end(),
0,
[](int a, int b) {
return a + b;
});
Definition of Done
-
Add tbb_demo_node
to src/tools with basic functionality -
Beautify tbb_demo_node
-
Add documentation for how to use it in existing nodes
Edited by M. Fatih Cırıt