Add const keyword for interpreter tensor accessor (#5218)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 20 May 2019 23:43:51 +0000 (08:43 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 20 May 2019 23:43:51 +0000 (08:43 +0900)
Add const keyword for interpreter tensor accessor in ExecEnv

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/core/src/exec/interp/ExecEnv.h

index 2ec6dd0..c2dba93 100644 (file)
@@ -73,7 +73,10 @@ public:
    * @param[in] index Tensor index
    * @return    Tensor pointer
    */
-  ITensor *tensorAt(const model::OperandIndex index) { return _tensors.at(index).get(); }
+  const ITensor *tensorAt(const model::OperandIndex index) const
+  {
+    return _tensors.at(index).get();
+  }
 
   /**
    * @brief     Check environment contains tensor