- Throw exception when optional input is set because we cannot support this yet
- Return with do nothing for optional output
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
return ANEURALNETWORKS_UNEXPECTED_NULL;
}
+ // TODO Handle optional input
+ if (buffer == nullptr)
+ {
+ throw std::runtime_error("Not supported optional input, yet");
+ }
+
const auto &operands = execution->plan().model().operands();
// TODO Check type conflicts
return ANEURALNETWORKS_UNEXPECTED_NULL;
}
+ // Handle optional output
+ if (buffer == nullptr)
+ {
+ return ANEURALNETWORKS_NO_ERROR;
+ }
+
const auto &operands = execution->plan().model().operands();
// TODO Check type conflicts