[enco] Caffe frontend template (#1130)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 22 Aug 2018 07:16:50 +0000 (16:16 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 22 Aug 2018 07:16:50 +0000 (16:16 +0900)
This commit creates a workspace for Caffe frontend with basic template.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/CMakeLists.txt
contrib/enco/frontend/CMakeLists.txt [new file with mode: 0644]
contrib/enco/frontend/caffe/CMakeLists.txt [new file with mode: 0644]
contrib/enco/frontend/caffe/src/Entry.cpp [new file with mode: 0644]

index bbb0fe8..f333f18 100644 (file)
@@ -1,3 +1,4 @@
 add_subdirectory(intf)
 add_subdirectory(core)
+add_subdirectory(frontend)
 add_subdirectory(cli)
diff --git a/contrib/enco/frontend/CMakeLists.txt b/contrib/enco/frontend/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5ea6cda
--- /dev/null
@@ -0,0 +1 @@
+add_subdirectories()
diff --git a/contrib/enco/frontend/caffe/CMakeLists.txt b/contrib/enco/frontend/caffe/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b91c732
--- /dev/null
@@ -0,0 +1,6 @@
+file(GLOB_RECURSE SOURCES "src/*.cpp")
+
+add_library(enco_caffe_frontend SHARED ${SOURCES})
+target_include_directories(enco_caffe_frontend PRIVATE src)
+target_link_libraries(enco_caffe_frontend enco_intf_frontend)
+target_link_libraries(enco_caffe_frontend enco_intf_cmdline)
diff --git a/contrib/enco/frontend/caffe/src/Entry.cpp b/contrib/enco/frontend/caffe/src/Entry.cpp
new file mode 100644 (file)
index 0000000..1a4151a
--- /dev/null
@@ -0,0 +1,9 @@
+#include <enco/Frontend.h>
+#include <cmdline/View.h>
+
+#include <stdexcept>
+
+extern "C" std::unique_ptr<enco::Frontend> make_frontend(const cmdline::View &)
+{
+  throw std::runtime_error{"NYI; make_frontend"};
+}