Rebased to upstream master. Removed inline function specifiers.

This commit is contained in:
Jose Fernando Lopez Fernandez 2019-06-07 12:13:27 -04:00
parent 23f2a94216
commit 5c93809d3b
No known key found for this signature in database
GPG Key ID: A711ACED5B856EBF

View File

@ -67,7 +67,7 @@ double lookup[LOOKUP_SIZE];
#endif #endif
double inline genann_act_sigmoid(const genann *ann unused, double a) { double genann_act_sigmoid(const genann *ann unused, double a) {
if (a < -45.0) return 0; if (a < -45.0) return 0;
if (a > 45.0) return 1; if (a > 45.0) return 1;
return 1.0 / (1 + exp(-a)); return 1.0 / (1 + exp(-a));
@ -83,7 +83,7 @@ void genann_init_sigmoid_lookup(const genann *ann) {
} }
} }
double inline genann_act_sigmoid_cached(const genann *ann unused, double a) { double genann_act_sigmoid_cached(const genann *ann unused, double a) {
assert(!isnan(a)); assert(!isnan(a));
if (a < sigmoid_dom_min) return lookup[0]; if (a < sigmoid_dom_min) return lookup[0];
@ -97,11 +97,11 @@ double inline genann_act_sigmoid_cached(const genann *ann unused, double a) {
return lookup[j]; return lookup[j];
} }
double inline genann_act_linear(const struct genann *ann unused, double a) { double genann_act_linear(const struct genann *ann unused, double a) {
return a; return a;
} }
double inline genann_act_threshold(const struct genann *ann unused, double a) { double genann_act_threshold(const struct genann *ann unused, double a) {
return a > 0; return a > 0;
} }