[neurun] Move acl_cl operand Object to backend (#2285)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Tue, 14 Aug 2018 01:42:49 +0000 (10:42 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 14 Aug 2018 01:42:49 +0000 (10:42 +0900)
Move `internal::arm_compute::operand::Object` to
`neurun::backend::acl_cl::operand::Object`.

Part of #2286

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtimes/neurun/src/backend/acl_cl/CMakeLists.txt
runtimes/neurun/src/backend/acl_cl/TensorBuilder.cc
runtimes/neurun/src/backend/acl_cl/operand/Object.cc [moved from runtimes/neurun/src/internal/arm_compute.cc with 68% similarity]
runtimes/neurun/src/backend/acl_cl/operand/Object.h [moved from runtimes/neurun/src/internal/arm_compute.h with 66% similarity]
runtimes/neurun/src/backend/cpu/TensorBuilder.cc

index 4cc5d18..2a9fd66 100644 (file)
@@ -1,4 +1,4 @@
-file(GLOB SOURCES "*.cc")
+file(GLOB_RECURSE SOURCES "*.cc")
 
 add_library(${LIB_NEURUN_BACKEND_ACL_CL} STATIC ${SOURCES})
 
index 092835d..dd9e8d4 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <cassert>
 
-#include "internal/arm_compute.h"
+#include "operand/Object.h"
 
 namespace neurun
 {
@@ -68,7 +68,7 @@ void TensorBuilder::prepare(const std::map<int, ::arm_compute::TensorInfo> &tens
     ::internal::tflite::operand::Index ind{ind_int};
     auto tensor = std::make_shared<::arm_compute::CLTensor>();
     tensor->allocator()->init(tensor_info_ctx.at(ind.asInt()));
-    _plan.operands().set(ind, std::make_shared<::internal::arm_compute::operand::Object>(tensor));
+    _plan.operands().set(ind, std::make_shared<operand::Object>(tensor));
     _tensors[ind.asInt()] = tensor;
   }
 }
@@ -1,12 +1,12 @@
-#include "internal/arm_compute.h"
+#include "Object.h"
 
 #include <arm_compute/runtime/CL/CLScheduler.h>
 
-#include <cassert>
-
-namespace internal
+namespace neurun
+{
+namespace backend
 {
-namespace arm_compute
+namespace acl_cl
 {
 namespace operand
 {
@@ -21,5 +21,6 @@ void Object::access(const std::function<void(::arm_compute::ITensor &tensor)> &f
 }
 
 } // namespace operand
-} // namepsace arm_compute
-} // namespace internal
+} // namespace acl_cl
+} // namespace backend
+} // namespace neurun
@@ -1,13 +1,16 @@
-#ifndef __INTERNAL_ARM_COMPUTE_H__
-#define __INTERNAL_ARM_COMPUTE_H__
+#ifndef __NEURUN_BACKEND_ACL_CL_OPERAND_OBJECT_H__
+#define __NEURUN_BACKEND_ACL_CL_OPERAND_OBJECT_H__
 
+#include <memory>
 #include <arm_compute/core/CL/ICLTensor.h>
 
 #include "internal/IObject.h"
 
-namespace internal
+namespace neurun
 {
-namespace arm_compute
+namespace backend
+{
+namespace acl_cl
 {
 namespace operand
 {
@@ -34,7 +37,8 @@ public:
 };
 
 } // namespace operand
-} // namepsace arm_compute
-} // namespace internal
+} // namespace acl_cl
+} // namespace backend
+} // namespace neurun
 
-#endif // __INTERNAL_ARM_COMPUTE_H__
+#endif // __NEURUN_BACKEND_ACL_CL_OPERAND_OBJECT_H__
index d0a4664..fc4c5dd 100644 (file)
@@ -2,8 +2,6 @@
 
 #include <cassert>
 
-#include "internal/arm_compute.h"
-
 namespace neurun
 {
 namespace backend