From 51e7696d3e78d6d26dafa5802eb444457b31c145 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 13 Mar 2019 08:18:17 +0900 Subject: [PATCH] Remove default constructors (#4694) Remove default consturctor for TypeInfo and TensorInfo Block implicit using of default constructor Signed-off-by: Hyeongseok Oh --- runtimes/neurun/src/backend/cpu/TensorBuilder.cc | 2 +- runtimes/neurun/src/compiler/TensorInfo.h | 2 +- runtimes/neurun/src/model/operand/TypeInfo.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtimes/neurun/src/backend/cpu/TensorBuilder.cc b/runtimes/neurun/src/backend/cpu/TensorBuilder.cc index 3f3972a..b709b1e 100644 --- a/runtimes/neurun/src/backend/cpu/TensorBuilder.cc +++ b/runtimes/neurun/src/backend/cpu/TensorBuilder.cc @@ -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(info); diff --git a/runtimes/neurun/src/compiler/TensorInfo.h b/runtimes/neurun/src/compiler/TensorInfo.h index 3decb1f..a960611 100644 --- a/runtimes/neurun/src/compiler/TensorInfo.h +++ b/runtimes/neurun/src/compiler/TensorInfo.h @@ -30,7 +30,7 @@ namespace compiler class TensorInfo { public: - TensorInfo() = default; + TensorInfo() = delete; public: TensorInfo(const ::neurun::model::operand::Shape &shape, diff --git a/runtimes/neurun/src/model/operand/TypeInfo.h b/runtimes/neurun/src/model/operand/TypeInfo.h index 93e8d1a..5cbe213 100644 --- a/runtimes/neurun/src/model/operand/TypeInfo.h +++ b/runtimes/neurun/src/model/operand/TypeInfo.h @@ -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) { -- 2.7.4