changed macro naming

This commit is contained in:
Lewis Van Winkle 2018-07-07 18:51:16 -05:00
parent fb6df6d00a
commit eb56a6d9f2
2 changed files with 8 additions and 8 deletions

View File

@ -57,9 +57,9 @@ double lookup[LOOKUP_SIZE];
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#define __unused __attribute__((unused))
#define unused __attribute__((unused))
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 1;
return 1.0 / (1 + exp(-a));
@ -75,7 +75,7 @@ void genann_init_sigmoid_lookup(const genann *ann) {
}
}
double inline genann_act_sigmoid_cached(const genann *ann __unused, double a) {
double inline genann_act_sigmoid_cached(const genann *ann unused, double a) {
assert(!isnan(a));
if (a < sigmoid_dom_min) return lookup[0];
@ -89,11 +89,11 @@ double inline genann_act_sigmoid_cached(const genann *ann __unused, double a) {
return lookup[j];
}
double inline genann_act_linear(const struct genann *ann __unused, double a) {
double inline genann_act_linear(const struct genann *ann unused, double a) {
return a;
}
double inline genann_act_threshold(const struct genann *ann __unused, double a) {
double inline genann_act_threshold(const struct genann *ann unused, double a) {
return a > 0;
}

View File

@ -24,8 +24,8 @@
*/
#ifndef __GENANN_H__
#define __GENANN_H__
#ifndef GENANN_H__
#define GENANN_H__
#include <stdio.h>
@ -105,4 +105,4 @@ double genann_act_linear(const genann *ann, double a);
}
#endif
#endif /*__GENANN_H__*/
#endif /*GENANN_H__*/