daphne-eu / daphne

DAPHNE: An Open and Extensible System Infrastructure for Integrated Data Analysis Pipelines
Apache License 2.0
67 stars 62 forks source link

Hardcoded numbers in vectorized pipeline #731

Closed philipportner closed 3 weeks ago

philipportner commented 6 months ago

Looking at the code of our vectorized pipeline one finds a lot of hardcoded int values used for certain things, e.g., if ( _stealLogic == 3) and if (_queueMode == 2).

Using stronger types and replacing the int with meaningful scoped enumeration such as enum class would make things a lot more understandable, maintainable, and less error prone. This issue is specifically for the code related to the vectorized pipeline (MTWrapper.h, MTWrapper_*.cpp, WorkerCPU.h, Task.*, and more + related test cases). The issue includes making sure things still work with the DaphneUserConfig.

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-enum https://en.cppreference.com/w/cpp/language/enum