This commit make assertion on input and output index to be less than
their size.
Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
#include "NodeExecution.h"
#include "NodeDomain.h"
+#include <cassert>
+
namespace locomotiv
{
void Session::set_input(uint32_t index, std::unique_ptr<NodeData> &&data)
{
+ assert(index < input_size());
+
// Check whether already annotated
auto pull = _graph->inputs()->at(index)->node();
if (annot_data(pull))
const NodeData *Session::get_output(uint32_t index)
{
+ assert(index < output_size());
+
auto output_node = _graph->outputs()->at(index)->node();
return annot_data(output_node);
}