[core.ADT] Simplify tensor view construction (#383)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 27 Jun 2018 02:43:46 +0000 (11:43 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 27 Jun 2018 02:43:46 +0000 (11:43 +0900)
commit97216bd5718b0307903eef1f033548da984c9786
treeb14509dd6070e8d835c1f0735de2ad2f0de77188
parent1b0841e3c118b66fbcb4b45902528f3cb5f364df
[core.ADT] Simplify tensor view construction (#383)

The current implementation of tensor::View<T> takes an owned pointer
of Layout (std::unique_ptr<Layout>) as its argument.

This design was enforced by the constraint that Layout is a pure
virtual class. Recently, this constraint is gone. Layout class is now
a simple class which is copyable and movable.

This commit revises tensor view constructor to take Layout instead of
std::unique_ptr<Layout> to make it easy to build tensor view.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
libs/core/include/nncc/core/ADT/tensor/View.h