This commit introduces enco core library which will hosts Android NN API
backend implementation.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
add_subdirectory(intf)
+add_subdirectory(core)
add_subdirectory(cli)
--- /dev/null
+file(GLOB_RECURSE SOURCES "src/*.cpp")
+
+add_library(enco_core STATIC ${SOURCES})
+set_target_properties(enco_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
+target_include_directories(enco_core PRIVATE src)
+target_include_directories(enco_core PUBLIC include)
+target_link_libraries(enco_core coco_core)
+target_link_libraries(enco_core coco_generic)
--- /dev/null
+#ifndef __ENCO_BACKEND_H__
+#define __ENCO_BACKEND_H__
+
+#include "coco/IR/Module.h"
+#include "coco/IR/Data.h"
+
+#include <ostream>
+
+namespace enco
+{
+
+struct Backend
+{
+public:
+ Backend(std::ostream &os) : _os(os)
+ {
+ // DO NOTHING
+ }
+
+public:
+ void compile(coco::Module *m, coco::Data *d);
+
+private:
+ std::ostream &_os;
+};
+
+} // namespace enco
+
+#endif // __ENCO_BACKEND_H__
--- /dev/null
+#include "enco/Backend.h"
+
+#include <stdexcept>
+
+namespace enco
+{
+
+void Backend::compile(coco::Module *m, coco::Data *d)
+{
+ throw std::runtime_error{"NYI; Not implemented, yet"};
+}
+
+} // namespace enco