mirror of
https://github.com/codeplea/genann
synced 2024-11-24 23:40:02 +03:00
tweaks to help it compile in VS
This commit is contained in:
parent
703b51ad43
commit
94e22d4e06
10
genann.c
10
genann.c
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user