Overview
Comment: | Does not now define Octave functions unless explicitly compiling for STANDALONE or OCTAVEDLD. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0c91fc17d1af8f8c52706ada1bb56f55 |
User & Date: | geraint@users.sourceforge.net on 2002-06-17 14:30:34 |
Other Links: | branch diff | manifest | tags |
Context
2002-06-18
| ||
18:03:16 | Appended "memory" blocks to plant model outputs to break simulink algebraic loops. check-in: ecb4011cd5 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-06-17
| ||
14:30:34 | Does not now define Octave functions unless explicitly compiling for STANDALONE or OCTAVEDLD. check-in: 0c91fc17d1 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
14:28:39 | c files now #include sys_cr.h. check-in: 168a121b9d user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/cc/include/useful-functions.hh from [1f4be0464d] to [f0062089cf].
1 2 3 4 5 6 7 8 9 10 11 | #ifndef HAVE_USEFUL_FUNCTIONS_HH #define HAVE_USEFUL_FUNCTIONS_HH #ifndef __cplusplus #define inline /* strip */ #define cast_to_double (double) /* typedef unsigned int bool; const bool true = 1; | > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #ifndef HAVE_USEFUL_FUNCTIONS_HH #define HAVE_USEFUL_FUNCTIONS_HH /* Code generation directives */ #define STANDALONE 0 #define OCTAVEDLD 1 #define MATLABMEX 2 #if (! defined (CODEGENTARGET)) #define CODEGENTARGET -1 #endif /* (! defined (CODEGENTARGET)) */ #ifndef __cplusplus #define inline /* strip */ #define cast_to_double (double) /* typedef unsigned int bool; const bool true = 1; |
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | sign (const double x) { return cast_to_double ((x > 0) ? +1 : (x < 0) ? -1 : 0); } /* Octave functions */ #ifdef __cplusplus static Matrix ones (const int r = 1, const int c = 1) { Matrix m (r, c, 1.0); return m; } | > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | sign (const double x) { return cast_to_double ((x > 0) ? +1 : (x < 0) ? -1 : 0); } /* Octave functions */ #if ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == OCTAVEDLD)) #ifdef __cplusplus static Matrix ones (const int r = 1, const int c = 1) { Matrix m (r, c, 1.0); return m; } |
︙ | ︙ | |||
80 81 82 83 84 85 86 87 88 89 90 | static Matrix zeros (const int r, const int c) { Matrix m (r, c, 0.0); return m; } #endif /* __cplusplus */ #endif /* HAVE_USEFUL_FUNCTIONS_HH */ | > | 88 89 90 91 92 93 94 95 96 97 98 99 | static Matrix zeros (const int r, const int c) { Matrix m (r, c, 0.0); return m; } #endif /* __cplusplus */ #endif /* ((CODEGENTARGET == STANDALONE) || (CODEGENTARGET == OCTAVEDLD)) */ #endif /* HAVE_USEFUL_FUNCTIONS_HH */ |