tweaks to help it compile in VS

This commit is contained in:
Lewis Van Winkle 2018-07-07 19:05:53 -05:00
parent 703b51ad43
commit 94e22d4e06

View File

@ -55,9 +55,17 @@ const double sigmoid_dom_max = 15.0;
double interval; double interval;
double lookup[LOOKUP_SIZE]; double lookup[LOOKUP_SIZE];
#ifdef __GNUC__
#define likely(x) __builtin_expect(!!(x), 1) #define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0) #define unlikely(x) __builtin_expect(!!(x), 0)
#define unused __attribute__((unused)) #define unused __attribute__((unused))
#else
#define likely(x) x
#define unlikely(x) x
#define unused
#pragma warning(disable : 4996) /* For fscanf */
#endif
double inline genann_act_sigmoid(const genann *ann unused, double a) { double inline genann_act_sigmoid(const genann *ann unused, double a) {
if (a < -45.0) return 0; if (a < -45.0) return 0;