* nnc: plugin common lib (Plugin type)
This commit creates common plugin library.
This library will be used by plugins and nnc for communication.
Implemented:
- Plugin type. Will be used to determinate plugin type and
for debug also.
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* nnc: plugin common lib (Plugin type)
rename typeWrong to typeInvalid
using switch case
add to make file
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* nnc: plugin common lib (Plugin type)
make code readable
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* remove HLO and LLO from plugin types
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* nnc: plugin common lib (Plugin type)
fix build
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
add_subdirectory(frontend)
+add_subdirectory(plugin)
--- /dev/null
+file(GLOB_RECURSE HEADERS "include/*.h")
+file(GLOB_RECURSE SOURCES "src/*.cpp")
+
+add_nncc_library(nnc_plugin_core SHARED ${HEADERS} ${SOURCES})
+set_target_properties(nnc_plugin_core PROPERTIES LINKER_LANGUAGE CXX)
+target_link_libraries(nnc_plugin_core PRIVATE nncc_foundation)
+target_include_directories(nnc_plugin_core PUBLIC include)
--- /dev/null
+//
+// Created by v.cherepanov@samsung.com on 02.04.18.
+//
+
+#ifndef __PLUGIN_TYPE_H__
+#define __PLUGIN_TYPE_H__
+
+#include <string>
+
+namespace nncc
+{
+namespace contrib
+{
+namespace plugin
+{
+
+enum PluginType
+{
+ typeInvalid = 0,
+ typeFrontEnd,
+ typeBackEnd
+};
+
+std::string pluginTypeToStr(PluginType type);
+
+} // namespace plugin
+} // namespace contrib
+} // namespace nncc
+
+#endif // __PLUGIN_TYPE_H__
--- /dev/null
+//
+// Created by v.cherepanov@samsung.com on 02.04.18.
+//
+
+#include <string>
+
+#include "PluginType.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace plugin
+{
+
+std::string pluginTypeToStr(PluginType type)
+{
+ switch (type)
+ {
+ case typeFrontEnd:
+ return "FrontEnd";
+ case typeBackEnd:
+ return "BackEnd";
+ default:
+ return "Invalid";
+ }
+}
+
+} // namespace plugin
+} // namespace contrib
+} // namespace nncc