26 #include <Availability.h>
31 #if defined(_WIN32) || defined(_WINDOWS) || defined(_MSC_VER)
35 #define _CRT_NONSTDC_NO_DEPRECATE 1
36 #define _CRT_SECURE_NO_DEPRECATE 1
56 #include <libkern/OSAtomic.h>
57 #include <sys/types.h>
59 #endif // defined(_WIN32)...
69 #define snprintf sprintf_s
70 #define strtok_r strtok_s
72 #define fseeko _fseeki64
73 #define ftello _ftelli64
75 inline double log2(
double x) {
return log(x) * 1.4426950408889634; }
77 typedef unsigned int uint32_t;
78 #define M_E (2.7182818284590452354)
79 #define M_PI (3.141592653589793238)
80 #define UINT32_MAX (0xffffffff)
81 #define UINT32_MIN (0)
91 typedef struct timeval Time;
106 clock_gettime(CLOCK_MONOTONIC, &
startTime);
116 long elapsedTime = ((seconds) * 1000 + useconds / 1000.0) + 0.5;
118 clock_gettime(CLOCK_MONOTONIC, &
stopTime);
121 long elapsedTime = ((seconds) * 1000 + nseconds / 1000000.0) + 0.5;
131 void start() { std::cerr <<
"timer not implemented on Windows" << std::endl; }
144 const std::string
_s;
148 namespace SeExprInternal2 {
160 void lock() { WaitForSingleObject(
_mutex, INFINITE); }
PrintTiming(const std::string &s)
</pre >< h3 > A simple variable reference</h3 > This is not a very interesting subclass of expression until we add some additional variables Variables on some applications may be very dynamic In this we only need x
pthread_spinlock_t _spinlock