00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TYPES_H
00021 #define TYPES_H
00022
00031 #ifdef WIN32
00032 #define _CRT_SECURE_NO_DEPRECATE
00033 #ifdef NNFW_BUILDING_DLL
00034 #define NNFW_API __declspec(dllexport)
00035 #define NNFW_TEMPLATE __declspec(dllexport)
00036 #else
00037 #define NNFW_API __declspec(dllimport)
00038 #define NNFW_TEMPLATE
00039 #endif
00040 #ifdef NNFW_DONT_EXPORT
00041 #define NNFW_API
00042 #define NNFW_TEMPLATE
00043 #endif
00044 #define NNFW_INTERNAL
00045 #else
00046 #ifdef NNFW_DONT_EXPORT
00047 #define NNFW_API __attribute__ ((visibility ("hidden")))
00048 #define NNFW_TEMPLATE __attribute__ ((visibility ("hidden")))
00049 #else
00050 #define NNFW_API
00051 #define NNFW_TEMPLATE
00052 #endif
00053 #define NNFW_INTERNAL __attribute__ ((visibility ("hidden")))
00054 #endif
00055
00056 #define NNFW_VERSION 10400
00057
00058 #include <vector>
00059 #include <string>
00060
00061
00062
00063
00064 #define TYPES_INCLUDES
00065
00066 #include "messages.h"
00067 #include "primtypes.h"
00068 #include "observ.h"
00069 #include "vectordata.h"
00070 #include "matrixdata.h"
00071
00072 namespace nnfw {
00073 class RealMat;
00074 }
00075 #include "realvec.h"
00076 #include "realmat.h"
00077
00078 #undef TYPES_INCLUDES
00079
00080
00081 namespace nnfw {
00082
00084 template<class T>
00085 inline T max( T a, T b ) {
00086 return (a>b) ? a : b;
00087 }
00088
00090 template<class T>
00091 inline T min( T a, T b ) {
00092 return (a<b) ? a : b;
00093 }
00094
00096 typedef VectorData<bool> BoolVec;
00097
00099 typedef VectorData<u_int> U_IntVec;
00100
00101 class Updatable;
00103 typedef VectorData<Updatable*> UpdatableVec;
00104
00105 class Cluster;
00107 typedef VectorData<Cluster*> ClusterVec;
00108
00109 class Linker;
00111 typedef VectorData<Linker*> LinkerVec;
00112
00114 extern NNFW_API const LinkerVec emptyLinkerVec;
00115
00117 extern NNFW_API const ClusterVec emptyClusterVec;
00118
00119 class BaseTeachBlock;
00121 typedef VectorData<BaseTeachBlock*> TeachBlockVec;
00122
00123 }
00124
00125 #endif