Remove default constructors (#4694)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 12 Mar 2019 23:18:17 +0000 (08:18 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Tue, 12 Mar 2019 23:18:17 +0000 (08:18 +0900)
Remove default consturctor for TypeInfo and TensorInfo
Block implicit using of default constructor

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/src/backend/cpu/TensorBuilder.cc
runtimes/neurun/src/compiler/TensorInfo.h
runtimes/neurun/src/model/operand/TypeInfo.h

index 3f3972a..b709b1e 100644 (file)
@@ -75,7 +75,7 @@ void TensorBuilder::prepare(void)
   {
     auto ind = mem_plan.first;
     auto mem_blk = mem_plan.second;
-    const auto &info = _tensor_info_map[ind];
+    const auto &info = _tensor_info_map.at(ind);
 
     uint8_t *buffer = _mem_alloc->base() + mem_blk.offset;
     auto tensor = std::make_shared<operand::Tensor>(info);
index 3decb1f..a960611 100644 (file)
@@ -30,7 +30,7 @@ namespace compiler
 class TensorInfo
 {
 public:
-  TensorInfo() = default;
+  TensorInfo() = delete;
 
 public:
   TensorInfo(const ::neurun::model::operand::Shape &shape,
index 93e8d1a..5cbe213 100644 (file)
@@ -31,7 +31,7 @@ namespace operand
 class TypeInfo
 {
 public:
-  TypeInfo() = default;
+  TypeInfo() = delete;
 
   TypeInfo(DataType type, float scale, int32_t offset) : _type(type), _scale(scale), _offset(offset)
   {