From: 장지섭/On-Device Lab(SR)/Engineer/삼성전자 Date: Mon, 2 Dec 2019 05:11:57 +0000 (+0900) Subject: Add to initialize a member of Reader and View (#9318) X-Git-Tag: submit/tizen/20191205.083104~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5654f208e07e5cb23c66cf0ca58c114311f01221;p=platform%2Fcore%2Fml%2Fnnfw.git Add to initialize a member of Reader and View (#9318) This commit adds to initialize a member of Reader and View Signed-off-by: jiseob.jang --- diff --git a/runtime/neurun/core/include/util/feature/nhwc/Reader.h b/runtime/neurun/core/include/util/feature/nhwc/Reader.h index 9f0a037..0e9e076 100644 --- a/runtime/neurun/core/include/util/feature/nhwc/Reader.h +++ b/runtime/neurun/core/include/util/feature/nhwc/Reader.h @@ -39,7 +39,7 @@ template class Reader final : public nnfw::misc::feature::Reader public: // Construct for buffer of model inputs Reader(const ::nnfw::misc::feature::Shape &shape, const T *ptr, size_t len) - : _shape{shape}, _ptr{reinterpret_cast(ptr)} + : _shape{shape}, _ptr{reinterpret_cast(ptr)}, _len{len} { UNUSED_RELEASE(len); // Workaround for unused variable in release mode assert(shape.N * shape.C * shape.H * shape.W * sizeof(T) == len); diff --git a/runtime/neurun/core/include/util/feature/nhwc/View.h b/runtime/neurun/core/include/util/feature/nhwc/View.h index a8f32d2..924a441 100644 --- a/runtime/neurun/core/include/util/feature/nhwc/View.h +++ b/runtime/neurun/core/include/util/feature/nhwc/View.h @@ -40,7 +40,7 @@ template class View final : public nnfw::misc::feature::Reader public: // Construct for buffer of model inputs View(const ::nnfw::misc::feature::Shape &shape, T *ptr, size_t len) - : _shape{shape}, _ptr{reinterpret_cast(ptr)} + : _shape{shape}, _ptr{reinterpret_cast(ptr)}, _len{len} { UNUSED_RELEASE(len); // Workaround for unused variable in release mode assert(shape.N * shape.H * shape.W * shape.C * sizeof(T) == len);