diff --git a/examples/uTensorFirst/uTensorFirst.ino b/examples/uTensorFirst/uTensorFirst.ino index 521b858..16559e5 100644 --- a/examples/uTensorFirst/uTensorFirst.ino +++ b/examples/uTensorFirst/uTensorFirst.ino @@ -1,7 +1,7 @@ #include using namespace std; -#include "uTensor.h" +#include void setup() { diff --git a/keywords.txt b/keywords.txt new file mode 100644 index 0000000..665343c --- /dev/null +++ b/keywords.txt @@ -0,0 +1,18 @@ +####################################### +# Syntax Coloring Map For uTensor +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +uTensor KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +####################################### +# Constants (LITERAL1) +####################################### + diff --git a/library.properties b/library.properties new file mode 100644 index 0000000..8aaf7d5 --- /dev/null +++ b/library.properties @@ -0,0 +1,11 @@ +name=uTensor +version=0.0.0 +author=uTensor team +maintainer=uTensor team +sentence=Port of uTensor to Arduino +paragraph=AI inference library based TensorFlow +category=Data Processing +url=https://github.com/uTensor/utensor-arduino-demo +architectures=* +includes=uTensor.h +depends=ArduinoSTL diff --git a/mbed_lib.json b/mbed_lib.json new file mode 100644 index 0000000..fd1a476 --- /dev/null +++ b/mbed_lib.json @@ -0,0 +1,5 @@ +{ + "name": "utensor", + "macros": ["TARGET_MBED"] +} + diff --git a/uTensor.h b/src/uTensor.h similarity index 100% rename from uTensor.h rename to src/uTensor.h diff --git a/uTensor/core/context.cpp b/src/uTensor/core/context.cpp similarity index 100% rename from uTensor/core/context.cpp rename to src/uTensor/core/context.cpp diff --git a/uTensor/core/context.hpp b/src/uTensor/core/context.hpp similarity index 100% rename from uTensor/core/context.hpp rename to src/uTensor/core/context.hpp diff --git a/uTensor/core/sdtensor.hpp b/src/uTensor/core/sdtensor.hpp similarity index 100% rename from uTensor/core/sdtensor.hpp rename to src/uTensor/core/sdtensor.hpp diff --git a/uTensor/core/tensor.cpp b/src/uTensor/core/tensor.cpp similarity index 100% rename from uTensor/core/tensor.cpp rename to src/uTensor/core/tensor.cpp diff --git a/uTensor/core/tensor.hpp b/src/uTensor/core/tensor.hpp similarity index 100% rename from uTensor/core/tensor.hpp rename to src/uTensor/core/tensor.hpp diff --git a/uTensor/core/uTensorBase.cpp b/src/uTensor/core/uTensorBase.cpp similarity index 100% rename from uTensor/core/uTensorBase.cpp rename to src/uTensor/core/uTensorBase.cpp diff --git a/uTensor/core/uTensorBase.hpp b/src/uTensor/core/uTensorBase.hpp similarity index 100% rename from uTensor/core/uTensorBase.hpp rename to src/uTensor/core/uTensorBase.hpp diff --git a/uTensor/core/utensor_string.hpp b/src/uTensor/core/utensor_string.hpp similarity index 96% rename from uTensor/core/utensor_string.hpp rename to src/uTensor/core/utensor_string.hpp index e7897d1..7de1f0d 100644 --- a/uTensor/core/utensor_string.hpp +++ b/src/uTensor/core/utensor_string.hpp @@ -39,7 +39,7 @@ namespace utensor { namespace std { - template<> struct std::hash + template<> struct hash { typedef utensor::string argument_type; typedef std::size_t result_type; diff --git a/uTensor/core/vm.cpp b/src/uTensor/core/vm.cpp similarity index 100% rename from uTensor/core/vm.cpp rename to src/uTensor/core/vm.cpp diff --git a/uTensor/core/vm.hpp b/src/uTensor/core/vm.hpp similarity index 100% rename from uTensor/core/vm.hpp rename to src/uTensor/core/vm.hpp diff --git a/uTensor/loaders/tensorIdxImporter.cpp b/src/uTensor/loaders/tensorIdxImporter.cpp similarity index 100% rename from uTensor/loaders/tensorIdxImporter.cpp rename to src/uTensor/loaders/tensorIdxImporter.cpp diff --git a/uTensor/loaders/tensorIdxImporter.hpp b/src/uTensor/loaders/tensorIdxImporter.hpp similarity index 100% rename from uTensor/loaders/tensorIdxImporter.hpp rename to src/uTensor/loaders/tensorIdxImporter.hpp diff --git a/uTensor/ops/ArrayOps.hpp b/src/uTensor/ops/ArrayOps.hpp similarity index 100% rename from uTensor/ops/ArrayOps.hpp rename to src/uTensor/ops/ArrayOps.hpp diff --git a/uTensor/ops/MathOps.hpp b/src/uTensor/ops/MathOps.hpp similarity index 100% rename from uTensor/ops/MathOps.hpp rename to src/uTensor/ops/MathOps.hpp diff --git a/uTensor/ops/MatrixOps.hpp b/src/uTensor/ops/MatrixOps.hpp similarity index 100% rename from uTensor/ops/MatrixOps.hpp rename to src/uTensor/ops/MatrixOps.hpp diff --git a/uTensor/ops/NnOps.hpp b/src/uTensor/ops/NnOps.hpp similarity index 100% rename from uTensor/ops/NnOps.hpp rename to src/uTensor/ops/NnOps.hpp diff --git a/uTensor/ops/cmsis_ops/CmsisConvolution.hpp b/src/uTensor/ops/cmsis_ops/CmsisConvolution.hpp similarity index 100% rename from uTensor/ops/cmsis_ops/CmsisConvolution.hpp rename to src/uTensor/ops/cmsis_ops/CmsisConvolution.hpp diff --git a/uTensor/ops/cmsis_ops/CmsisPoolingOps.hpp b/src/uTensor/ops/cmsis_ops/CmsisPoolingOps.hpp similarity index 100% rename from uTensor/ops/cmsis_ops/CmsisPoolingOps.hpp rename to src/uTensor/ops/cmsis_ops/CmsisPoolingOps.hpp diff --git a/uTensor/ops/cmsis_ops/FullyConnectedOps.hpp b/src/uTensor/ops/cmsis_ops/FullyConnectedOps.hpp similarity index 100% rename from uTensor/ops/cmsis_ops/FullyConnectedOps.hpp rename to src/uTensor/ops/cmsis_ops/FullyConnectedOps.hpp diff --git a/uTensor/ops/cmsis_ops/activationOps.hpp b/src/uTensor/ops/cmsis_ops/activationOps.hpp similarity index 100% rename from uTensor/ops/cmsis_ops/activationOps.hpp rename to src/uTensor/ops/cmsis_ops/activationOps.hpp diff --git a/uTensor/ops/cmsis_ops/softmax.hpp b/src/uTensor/ops/cmsis_ops/softmax.hpp similarity index 100% rename from uTensor/ops/cmsis_ops/softmax.hpp rename to src/uTensor/ops/cmsis_ops/softmax.hpp diff --git a/uTensor/util/math_utils.hpp b/src/uTensor/util/math_utils.hpp similarity index 100% rename from uTensor/util/math_utils.hpp rename to src/uTensor/util/math_utils.hpp diff --git a/uTensor/util/quantization_utils.cpp b/src/uTensor/util/quantization_utils.cpp similarity index 100% rename from uTensor/util/quantization_utils.cpp rename to src/uTensor/util/quantization_utils.cpp diff --git a/uTensor/util/quantization_utils.hpp b/src/uTensor/util/quantization_utils.hpp similarity index 100% rename from uTensor/util/quantization_utils.hpp rename to src/uTensor/util/quantization_utils.hpp diff --git a/uTensor/util/uTensor_util.cpp b/src/uTensor/util/uTensor_util.cpp similarity index 100% rename from uTensor/util/uTensor_util.cpp rename to src/uTensor/util/uTensor_util.cpp diff --git a/uTensor/util/uTensor_util.hpp b/src/uTensor/util/uTensor_util.hpp similarity index 98% rename from uTensor/util/uTensor_util.hpp rename to src/uTensor/util/uTensor_util.hpp index 37296cb..d0e734e 100644 --- a/uTensor/util/uTensor_util.hpp +++ b/src/uTensor/util/uTensor_util.hpp @@ -99,8 +99,11 @@ void printVector(std::vector vec); #elif defined(_POSIX_VERSION) // POSIX #else - //#include "mbed.h" +#if ARDUINO #include "Arduino.h" +#else + #include "mbed.h" +#endif //# error "Unknown compiler" // little endian to big endian //uint32_t htonl(uint32_t& val);