Initial checkin of TOSA reference_model and tests

Change-Id: I2f8e7fa63e2ae40203e57d2cc8814bde3b312cb6
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
diff --git a/reference_model/CMakeLists.txt b/reference_model/CMakeLists.txt
new file mode 100644
index 0000000..0ba8afb
--- /dev/null
+++ b/reference_model/CMakeLists.txt
@@ -0,0 +1,76 @@
+cmake_minimum_required (VERSION 3.4)
+
+# Copyright (c) 2020, ARM Limited.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+
+
+project(tosa_reference_model LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+  set(CMAKE_CXX_FLAGS "-Wall -Wno-ignored-attributes -Wno-format-truncation")
+else()
+  set(CMAKE_CXX_FLAGS "-Wall -Wno-ignored-attributes")
+endif()
+
+set(FLATBUFFERS_DIR "../thirdparty/flatbuffers/")
+set(SERIALIZATION_DIR "../serialization")
+
+set (CXX_SOURCE
+     src/main.cpp
+     src/tensor.cc
+     src/graph_node.cc
+     src/subgraph_traverser.cc
+     src/func_debug.cc
+     src/func_config.cc
+     src/ops/op_factory.cc
+     src/ops/tensor_ops.cc
+     src/ops/activation_funcs.cc
+     src/ops/ewise_binary.cc
+     src/ops/ewise_unary.cc
+     src/ops/ewise_ternary.cc
+     src/ops/comparison.cc
+     src/ops/reduction.cc
+     src/ops/data_layout.cc
+     src/ops/scatter_gather.cc
+     src/ops/image.cc
+     src/ops/type_conversion.cc
+     src/ops/data_nodes.cc
+     src/ops/custom.cc
+     src/ops/control_flow.cc
+)
+
+add_executable(tosa_reference_model ${CXX_SOURCE})
+
+target_include_directories(tosa_reference_model
+  PUBLIC
+    $<INSTALL_INTERFACE:include>
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_SRC_DIR}/include>
+  PRIVATE
+    ${CMAKE_CURRENT_SOURCE_DIR}/src
+    ${FLATBUFFERS_DIR}/include
+    ../thirdparty/eigen/
+    ../thirdparty/eigen/unsupported/
+    ${SERIALIZATION_DIR}
+)
+
+target_link_libraries(tosa_reference_model
+  PRIVATE
+    flatbuffers
+    tosa_serialization
+)
+
+install (TARGETS tosa_reference_model DESTINATION bin)