From: 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 12 Mar 2019 23:18:17 +0000 (+0900) Subject: Remove default constructors (#4694) X-Git-Tag: submit/tizen/20190325.013700~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51e7696d3e78d6d26dafa5802eb444457b31c145;p=platform%2Fcore%2Fml%2Fnnfw.git Remove default constructors (#4694) Remove default consturctor for TypeInfo and TensorInfo Block implicit using of default constructor Signed-off-by: Hyeongseok Oh --- 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) {