namespace compiler
{
+enum class State
+{
+ NONE, // Initial state
+ FAILED, // Failed
+ PLANNED, // Success planned
+ NO_PLAN // Not planned by environment or graph status
+};
+
class Plan
{
public:
- Plan(const std::shared_ptr<neurun::graph::Graph> &model) : _model(model)
+ Plan(const std::shared_ptr<neurun::graph::Graph> &model) : _model(model), _state(State::NONE)
{
// DO NOTHING
}
neurun::graph::Graph &model(void) { return *_model; }
const neurun::graph::Graph &model(void) const { return *_model; }
+ void state(State state) { _state = state; }
+ State state(void) const { return _state; }
+
public:
operand::Context &operands(void) { return _operands; }
const operand::Context &operands(void) const { return _operands; }
std::shared_ptr<neurun::graph::Graph> _model;
operand::Context _operands;
operation::Sequence _ops;
+ State _state;
};
} // namespace compiler