NuPIC Core
Core algorithms for NuPIC(the Numenta Platform for Intelligent Computing), implemented in C++
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Friends Pages
types.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------
2  * Numenta Platform for Intelligent Computing (NuPIC)
3  * Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
4  * with Numenta, Inc., for a separate license for this software code, the
5  * following terms and conditions apply:
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 3 as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://www.gnu.org/licenses.
18  *
19  * http://numenta.org/licenses/
20  * ---------------------------------------------------------------------
21  */
22 
28 #ifndef NTA_TYPES_H
29 #define NTA_TYPES_H
30 
31 #include <stddef.h>
32 
33 /*---------------------------------------------------------------------- */
34 
36 typedef enum NTA_BasicType
37  {
58 
61 
62 #ifdef NTA_DOUBLE_PRECISION
63 
65 #else
66 
67  NTA_BasicType_Real = NTA_BasicType_Real32,
68 #endif
69 
70  } NTA_BasicType;
71 
72 /* Basic types */
73 
75 typedef char NTA_Byte;
76 
78 typedef size_t NTA_Size;
79 
81 typedef short NTA_Int16;
83 typedef unsigned short NTA_UInt16;
84 
86 typedef float NTA_Real32;
88 typedef double NTA_Real64;
90 typedef void * NTA_Handle;
91 
92 #if defined(NTA_PLATFORM_darwin86)
93 
94 typedef int NTA_Int32;
96 typedef unsigned int NTA_UInt32;
98 typedef long long NTA_Int64;
100 typedef unsigned long long NTA_UInt64;
101 
102 #elif defined(NTA_PLATFORM_darwin64)
103 
104 typedef int NTA_Int32;
106 typedef unsigned int NTA_UInt32;
108 typedef long NTA_Int64;
110 typedef unsigned long NTA_UInt64;
111 
112 #elif defined(NTA_PLATFORM_linux32)
113 
114 typedef int NTA_Int32;
116 typedef unsigned int NTA_UInt32;
118 typedef long long NTA_Int64;
120 typedef unsigned long long NTA_UInt64;
121 
122 #elif defined(NTA_PLATFORM_linux32arm) || defined(NTA_PLATFORM_linux32armv7)
123 
124 typedef int NTA_Int32;
126 typedef unsigned int NTA_UInt32;
128 typedef long long NTA_Int64;
130 typedef unsigned long long NTA_UInt64;
131 
132 #elif defined(NTA_PLATFORM_win32)
133 
134 typedef long NTA_Int32;
136 typedef unsigned long NTA_UInt32;
138 typedef long long NTA_Int64;
140 typedef unsigned long long NTA_UInt64;
141 
142 #elif defined(NTA_PLATFORM_linux64)
143 
144 typedef int NTA_Int32;
146 typedef unsigned int NTA_UInt32;
148 typedef long NTA_Int64;
150 typedef unsigned long NTA_UInt64;
151 #else
152 #error "Unknown platform"
153 #endif
154 
155 #ifdef NTA_DOUBLE_PRECISION
156 
157  typedef NTA_Real64 NTA_Real;
158  #define NTA_REAL_TYPE_STRING "NTA_Real64"
159 #else
160 
162  #define NTA_REAL_TYPE_STRING "NTA_Real32"
163 #endif
164 
165 #ifdef NTA_BIG_INTEGER
166 
167  typedef NTA_Int64 NTA_Int;
169  typedef NTA_UInt64 NTA_UInt;
170 #else
171 
172  typedef NTA_Int32 NTA_Int;
174  typedef NTA_UInt32 NTA_UInt;
175 #endif
176 
177 #ifndef SWIG
178 #ifdef WIN32
179 #define NTA_EXPORT __declspec(dllexport)
180 #define NTA_HIDDEN
181 #else
182 #define NTA_EXPORT __attribute__ ((visibility ("default")))
183 #define NTA_HIDDEN __attribute__ ((visibility ("hidden")))
184 #endif
185 
186 
187 #else
188 #define NTA_HIDDEN
189 #define NTA_EXPORT
190 #endif
191 
195 typedef enum NTA_LogLevel
196  {
206  } NTA_LogLevel;
207 
208 #endif /* NTA_TYPES_H */
qmi style