From: 박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 Date: Fri, 18 May 2018 00:08:45 +0000 (+0900) Subject: [core.ADT.tensor] Add 'Accessor' interface (#231) X-Git-Tag: nncc_backup~2685 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b30873ff0c6919e5a59b210eeac754031d9d1644;p=platform%2Fcore%2Fml%2Fnnfw.git [core.ADT.tensor] Add 'Accessor' interface (#231) This commit introduces 'Accessor' interface over tensor values. Signed-off-by: Jonghyun Park --- diff --git a/libs/core/include/nncc/core/ADT/tensor/Accessor.h b/libs/core/include/nncc/core/ADT/tensor/Accessor.h new file mode 100644 index 0000000..2f76a9d --- /dev/null +++ b/libs/core/include/nncc/core/ADT/tensor/Accessor.h @@ -0,0 +1,27 @@ +#ifndef __NNCC_CORE_ADT_TENSOR_ACCESSOR_H__ +#define __NNCC_CORE_ADT_TENSOR_ACCESSOR_H__ + +#include "nncc/core/ADT/tensor/Index.h" + +namespace nncc +{ +namespace core +{ +namespace ADT +{ +namespace tensor +{ + +template struct Accessor +{ + virtual ~Accessor() = default; + + virtual T &at(const Index &) = 0; +}; + +} // namespace tensor +} // namespace ADT +} // namespace core +} // namespace nncc + +#endif // __NNCC_CORE_ADT_TENSOR_ACCESSOR_H__