diff --git a/runtime/onert/core/include/exec/Execution.h b/runtime/onert/core/include/exec/Execution.h index 6ff482019e3..1043005fbb1 100644 --- a/runtime/onert/core/include/exec/Execution.h +++ b/runtime/onert/core/include/exec/Execution.h @@ -176,6 +176,20 @@ class Execution size_t getInputTotalSize(ir::IOIndex ind) const; size_t getOutputTotalSize(ir::IOIndex ind) const; + /** + * @brief Get pointer of Input Buffer + * @param[in] index Input index + * @return Pointer of Input Buffer + */ + const void *getInputBuffer(ir::IOIndex ind) const; + + /** + * @brief Get pointer of Output Buffer + * @param[in] index Output index + * @return Pointer of Output Buffer + */ + void *getOutputBuffer(ir::IOIndex ind); + ExecutionOptions &executionOptions() { return _ctx.options; } private: diff --git a/runtime/onert/core/src/exec/Execution.cc b/runtime/onert/core/src/exec/Execution.cc index 895a82ff833..f2800e094a5 100644 --- a/runtime/onert/core/src/exec/Execution.cc +++ b/runtime/onert/core/src/exec/Execution.cc @@ -223,5 +223,15 @@ size_t Execution::getOutputTotalSize(ir::IOIndex ind) const return _ctx.desc.outputs.at(ind.value())->info.total_size(); } +const void *Execution::getInputBuffer(ir::IOIndex ind) const +{ + return _ctx.desc.inputs.at(ind.value())->buffer; +} + +void *Execution::getOutputBuffer(ir::IOIndex ind) +{ + return _ctx.desc.outputs.at(ind.value())->buffer; +} + } // namespace exec } // namespace onert