[SimpleShot] Add scaffolding for the application
authorJihoon Lee <jhoon.it.lee@samsung.com>
Fri, 8 Jan 2021 05:28:25 +0000 (14:28 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 2 Mar 2021 01:29:05 +0000 (10:29 +0900)
This patch adds simpleshot directory to application.
Nothing's present yet just a simple structures

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Applications/SimpleShot/README.md [new file with mode: 0644]
Applications/SimpleShot/meson.build [new file with mode: 0644]
Applications/SimpleShot/task_runner.cpp [new file with mode: 0644]
Applications/SimpleShot/test/meson.build [new file with mode: 0644]
Applications/SimpleShot/test/mock_test.cpp [new file with mode: 0644]
Applications/meson.build

diff --git a/Applications/SimpleShot/README.md b/Applications/SimpleShot/README.md
new file mode 100644 (file)
index 0000000..8260b17
--- /dev/null
@@ -0,0 +1,6 @@
+Pratical demonstration of SimpleShot few tasks including real examples
+
+Reference. [Wang, Yan, et al. 2019](https://arxiv.org/abs/1911.04623)
+
+# How to use
+TBA
diff --git a/Applications/SimpleShot/meson.build b/Applications/SimpleShot/meson.build
new file mode 100644 (file)
index 0000000..d92bdec
--- /dev/null
@@ -0,0 +1,16 @@
+simpleshot_sources = [
+  'task_runner.cpp'
+]
+
+simpleshot_inc = include_directories('.')
+
+e = executable('simpleshot_runner',
+  simpleshot_sources,
+  dependencies: [app_utils_dep, nntrainer_dep, tflite_dep],
+  install: get_option('install-app'),
+  install_dir: application_install_dir
+)
+
+if get_option('enable-test')
+  subdir('test')
+endif
diff --git a/Applications/SimpleShot/task_runner.cpp b/Applications/SimpleShot/task_runner.cpp
new file mode 100644 (file)
index 0000000..170ed49
--- /dev/null
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: Apache-2.0
+/**
+ * Copyright (C) 2020 Jihoon Lee <jhoon.it.lee@samsung.com>
+ *
+ * @file       task_runner.cpp
+ * @date       08 Jan 2021
+ * @brief      task runner for the simpleshot demonstration
+ * @see                https://github.com/nnstreamer/nntrainer
+ * @author     Jihoon Lee <jhoon.it.lee@samsung.com>
+ * @bug                No known bugs except for NYI items
+ */
+
+#include <iostream>
+
+/**
+ * @brief main runner
+ *
+ * @return int
+ */
+int main(int argc, char **argv) { std::cout << "hello world\n"; }
diff --git a/Applications/SimpleShot/test/meson.build b/Applications/SimpleShot/test/meson.build
new file mode 100644 (file)
index 0000000..322f63b
--- /dev/null
@@ -0,0 +1,17 @@
+gtest_dep_with_main = dependency('gtest', main : true, required : false)
+
+
+test_target = [
+  'mock_test',
+]
+
+foreach target: test_target
+  exe = executable(
+    target,
+    target + '.cpp',
+    dependencies: gtest_dep_with_main,
+    install: get_option('enable-test'),
+    install_dir: application_install_dir
+  )
+  test(target, exe)
+endforeach
diff --git a/Applications/SimpleShot/test/mock_test.cpp b/Applications/SimpleShot/test/mock_test.cpp
new file mode 100644 (file)
index 0000000..676828c
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: Apache-2.0
+/**
+ * Copyright (C) 2020 Jihoon Lee <jhoon.it.lee@samsung.com>
+ *
+ * @file       mock_test.cpp
+ * @date       08 Jan 2021
+ * @brief      mock test for simpleshot application
+ * @see                https://github.com/nnstreamer/nntrainer
+ * @author     Jihoon Lee <jhoon.it.lee@samsung.com>
+ * @note this will be deleted or moved as the application is building up
+ * @bug                No known bugs except for NYI items
+ */
+
+#include <gtest/gtest.h>
+
+TEST(sample_test, test_01_p) { EXPECT_TRUE(true); }
index 947db73..65a7e89 100644 (file)
@@ -9,3 +9,7 @@ subdir('ReinforcementLearning/DeepQ/jni')
 subdir('TransferLearning/CIFAR_Classification/jni')
 subdir('TransferLearning/Draw_Classification/jni')
 subdir('Custom/LayerClient/jni')
+
+if get_option('enable-tflite-backbone')
+  subdir('SimpleShot')
+endif