Update dummy runner to use libruntime
authorHanjoung Lee <hanjoung.lee@samsung.com>
Wed, 21 Mar 2018 07:20:50 +0000 (16:20 +0900)
committer최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 <hk0110.choi@samsung.com>
Wed, 21 Mar 2018 07:55:43 +0000 (16:55 +0900)
The dummy executable calls model creation/freeing API.

src/runtime/ref/nn/runtime/CMakeLists.txt
src/runtime/ref/nn/runtime/main.cc
src/runtime/ref/nn/runtime/main.h [deleted file]

index 6e1a438..6ae0587 100644 (file)
@@ -2,12 +2,11 @@
 SET (RUNTIME_SRCS NeuralNetworks.cpp)
 
 add_library(runtime SHARED ${RUNTIME_SRCS})
-target_include_directories(runtime PRIVATE . include)
+include_directories(runtime PRIVATE . include)
 
 # Executable `runtime_run` (Dummy runner executable for simple testing bring-up stage)
 # TODO remove the executable later
 file(GLOB SRCS *.cc)
-file(GLOB HDRS *.h)
 
-add_executable(runtime_run ${SRCS} ${HDRS})
-target_include_directories(runtime_run PRIVATE .)
+add_executable(runtime_run ${SRCS})
+target_link_libraries(runtime_run runtime)
index b73039c..d3ed406 100644 (file)
@@ -1,8 +1,16 @@
-#include <iostream>
-#include "main.h"
+#include "NeuralNetworks.h"
 
 int main()
 {
-  std::cout << HELLO_RUNTIME << std::endl;
+  // This is a simple test for bring-up stage
+  // TODO Remove this file when we have unit tests ready.
+
+  // Create model
+  ANeuralNetworksModel* model = NULL;
+  ANeuralNetworksModel_create(&model);
+
+  // Delete model
+  ANeuralNetworksModel_free(model);
+
   return 0;
 }
diff --git a/src/runtime/ref/nn/runtime/main.h b/src/runtime/ref/nn/runtime/main.h
deleted file mode 100644 (file)
index 58020d8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __RUNTIME_MAIN_H__
-#define __RUNTIME_MAIN_H__
-
-const char *HELLO_RUNTIME = "Hello Runtime!";
-
-#endif // __RUNTIME_MAIN_H__