InputCategory as bitwise flag and Better handle inputs
Context
Often optional input are treated as required inputs and this contribution make the InputCategory as a bitwise filter to ease filtering of needed inputs without altering the api.
Modified files
include/aidge/graph/GraphView.hpp
src/graph/GraphView.cpp
include/aidge/graph/Node.hpp
src/graph/Node.cpp
include/aidge/operator/Operator.hpp
-
include/aidge/utils/BitwiseUtils.hpp
- Added
PyBind :
python_binding/graph/pybind_GraphView.cpp
python_binding/operator/pybind_Operator.cpp
python_binding/pybind_core.cpp
Detailed major modifications
- New optional (by default old behavior) filter parameter for
std::set<std::shared_ptr<Aidge::Node>> Aidge::GraphView::inputNodes(InputCategory filter)
-
enum class InputCategory
is now an unsigned int object class allowing bitwise operations -
getNbFreeDataInputs()
now return only Data and DataOptional inputs -
addChild
now add the first available free data instead of the first data
Edited by Maxence Naud