Skip to content

Commit 8d0060e

Browse files
committed
preparing deepC for arduino
1 parent f3ba133 commit 8d0060e

File tree

464 files changed

+130331
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

464 files changed

+130331
-0
lines changed

deepC/library.properties

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=Arduino_deepC
2+
version=0.121
3+
author=Rohit Sharma et. al.
4+
maintainer=Rohit Sharma <[email protected]>
5+
sentence=Allows you to run machine learning models locally on arduino boards.
6+
paragraph=This library runs deepC machine learning models on microcontrollers, allowing you to build AI/ML applications powered by deep learning and neural networks. With the included examples, you can recognize speech, detect people using a camera, and recognise asl gestures using an accelerometer. The examples work best with the Arduino Nano 33 BLE Sense board, which has a microphone and accelerometer.
7+
category=Data Processing
8+
url=https://github.com/ai-techsystems/dnnCompiler
9+
ldflags=-lm
10+
includes=deepC.h

deepC/src/Eigen.h

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
Eigen.h
3+
Brian R Taylor
4+
5+
2017-02-08
6+
7+
Copyright (c) 2017 Bolder Flight Systems
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
10+
and associated documentation files (the "Software"), to deal in the Software without restriction,
11+
including without limitation the rights to use, copy, modify, merge, publish, distribute,
12+
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all copies or
16+
substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
19+
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+
*/
24+
25+
// Credits: @rpavlik for writing the original header for the Eigen313 library, which this
26+
// was derived from:
27+
// http://forum.arduino.cc/index.php?PHPSESSID=a86gv50nb3e3ireijfmli63260&topic=144446.msg1089371#msg1089371
28+
29+
// Disable debug asserts.
30+
#define EIGEN_NO_DEBUG 1
31+
32+
// Hint to number of registers
33+
#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 16
34+
35+
#ifdef A0
36+
# define NEED_A0_RESTORED A0
37+
# undef A0
38+
#endif
39+
#ifdef A1
40+
# define NEED_A1_RESTORED A1
41+
# undef A1
42+
#endif
43+
#ifdef B0
44+
# define NEED_B0_RESTORED B0
45+
# undef B0
46+
#endif
47+
#ifdef B1
48+
# define NEED_B1_RESTORED B1
49+
# undef B1
50+
#endif
51+
#ifdef round
52+
# define NEED_round_RESTORED round
53+
# undef round
54+
#endif
55+
56+
namespace std {
57+
struct nothrow_t;
58+
}
59+
60+
// Include main EIGEN Core header
61+
#include <Eigen/Core>
62+
63+
#ifdef NEED_A0_RESTORED
64+
# define A0 NEED_A0_RESTORED
65+
# undef NEED_A0_RESTORED
66+
#endif
67+
#ifdef NEED_A1_RESTORED
68+
# define A1 NEED_A1_RESTORED
69+
# undef NEED_A1_RESTORED
70+
#endif
71+
#ifdef NEED_B0_RESTORED
72+
# define B0 NEED_B0_RESTORED
73+
# undef NEED_B0_RESTORED
74+
#endif
75+
#ifdef NEED_B1_RESTORED
76+
# define B1 NEED_B1_RESTORED
77+
# undef NEED_B1_RESTORED
78+
#endif
79+
#ifdef NEED_round_RESTORED
80+
# define round NEED_round_RESTORED
81+
# undef NEED_round_RESTORED
82+
#endif

deepC/src/Eigen/CMakeLists.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
include(RegexUtils)
2+
test_escape_string_as_regex()
3+
4+
file(GLOB Eigen_directory_files "*")
5+
6+
escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
7+
8+
foreach(f ${Eigen_directory_files})
9+
if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
10+
list(APPEND Eigen_directory_files_to_install ${f})
11+
endif()
12+
endforeach(f ${Eigen_directory_files})
13+
14+
install(FILES
15+
${Eigen_directory_files_to_install}
16+
DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
17+
)
18+
19+
install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h")

deepC/src/Eigen/Cholesky

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// This file is part of Eigen, a lightweight C++ template library
2+
// for linear algebra.
3+
//
4+
// This Source Code Form is subject to the terms of the Mozilla
5+
// Public License v. 2.0. If a copy of the MPL was not distributed
6+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
8+
#ifndef EIGEN_CHOLESKY_MODULE_H
9+
#define EIGEN_CHOLESKY_MODULE_H
10+
11+
#include "Core"
12+
#include "Jacobi"
13+
14+
#include "src/Core/util/DisableStupidWarnings.h"
15+
16+
/** \defgroup Cholesky_Module Cholesky module
17+
*
18+
*
19+
*
20+
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
21+
* Those decompositions are also accessible via the following methods:
22+
* - MatrixBase::llt()
23+
* - MatrixBase::ldlt()
24+
* - SelfAdjointView::llt()
25+
* - SelfAdjointView::ldlt()
26+
*
27+
* \code
28+
* #include <Eigen/Cholesky>
29+
* \endcode
30+
*/
31+
32+
#include "src/Cholesky/LLT.h"
33+
#include "src/Cholesky/LDLT.h"
34+
#ifdef EIGEN_USE_LAPACKE
35+
#ifdef EIGEN_USE_MKL
36+
#include "mkl_lapacke.h"
37+
#else
38+
#include "src/misc/lapacke.h"
39+
#endif
40+
#include "src/Cholesky/LLT_LAPACKE.h"
41+
#endif
42+
43+
#include "src/Core/util/ReenableStupidWarnings.h"
44+
45+
#endif // EIGEN_CHOLESKY_MODULE_H
46+
/* vim: set filetype=cpp et sw=2 ts=2 ai: */

deepC/src/Eigen/CholmodSupport

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// This file is part of Eigen, a lightweight C++ template library
2+
// for linear algebra.
3+
//
4+
// This Source Code Form is subject to the terms of the Mozilla
5+
// Public License v. 2.0. If a copy of the MPL was not distributed
6+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
8+
#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
9+
#define EIGEN_CHOLMODSUPPORT_MODULE_H
10+
11+
#include "SparseCore"
12+
13+
#include "src/Core/util/DisableStupidWarnings.h"
14+
15+
extern "C" {
16+
#include <cholmod.h>
17+
}
18+
19+
/** \ingroup Support_modules
20+
* \defgroup CholmodSupport_Module CholmodSupport module
21+
*
22+
* This module provides an interface to the Cholmod library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> package.
23+
* It provides the two following main factorization classes:
24+
* - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
25+
* - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
26+
*
27+
* For the sake of completeness, this module also propose the two following classes:
28+
* - class CholmodSimplicialLLT
29+
* - class CholmodSimplicialLDLT
30+
* Note that these classes does not bring any particular advantage compared to the built-in
31+
* SimplicialLLT and SimplicialLDLT factorization classes.
32+
*
33+
* \code
34+
* #include <Eigen/CholmodSupport>
35+
* \endcode
36+
*
37+
* In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
38+
* The dependencies depend on how cholmod has been compiled.
39+
* For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
40+
*
41+
*/
42+
43+
#include "src/CholmodSupport/CholmodSupport.h"
44+
45+
#include "src/Core/util/ReenableStupidWarnings.h"
46+
47+
#endif // EIGEN_CHOLMODSUPPORT_MODULE_H
48+

0 commit comments

Comments
 (0)