[Compiler] Add concept of the compiler
authorJihoon Lee <jhoon.it.lee@samsung.com>
Thu, 1 Apr 2021 10:31:21 +0000 (19:31 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Wed, 7 Apr 2021 01:34:17 +0000 (10:34 +0900)
This patch adds a concept of the compiler and class declaration.

**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>
nntrainer/compiler/compiler.h

index c4eb04f..73b6f90 100644 (file)
@@ -4,7 +4,34 @@
  *
  * @file compiler.h
  * @date 01 April 2021
- * @brief NNTrainer compiler that reads and generates excutable graph
+ * @brief NNTrainer compiler that reads and generates executable graph
+ * @details
+ * Graph is convertible either to iostream, representation, executable by
+ * appropriate compiler and interpreter
+ *         +--------+
+ *         |iostream|
+ *         +--+-----+
+ *            |  ^
+ * operator<< |  |
+ *            |  |
+ *        (Interpreter)
+ *            |  |
+ *            |  | operator>>
+ *            |  |
+ *    +-------+--+--------+
+ *    |GraphRepresentation|
+ *    +-------+-----------+
+ *            |  ^
+ *  compile() |  |
+ *            |  |
+ *         (Compiler)
+ *            |  |
+ *            |  | decompile()
+ *            v  |
+ *      +--------+------+
+ *      |ExecutableGraph|
+ *      +---------------+
+ *
  * @see        https://github.com/nnstreamer/nntrainer
  * @author Jihoon Lee <jhoon.it.lee@samsung.com>
  * @bug No known bugs except for NYI items
 
 namespace nntrainer {
 
+class ExecutableGraph;
+
+class GraphRepresentation;
+
+class GraphCompiler;
+
+class GraphInterpreter;
+
 /**
  * @brief a simple scaffoliding function
  *