Make the sigmoid lookup table internal to genann.c

This commit is contained in:
Lewis Van Winkle
2026-08-05 21:20:18 -05:00
parent 7421fe6b95
commit 3d8e469f6d

View File

@@ -38,10 +38,10 @@
/* Bounds the size calculations in genann_init so they cannot overflow. */ /* Bounds the size calculations in genann_init so they cannot overflow. */
#define GENANN_MAX_DIMENSION (1 << 20) #define GENANN_MAX_DIMENSION (1 << 20)
const double sigmoid_dom_min = -15.0; static const double sigmoid_dom_min = -15.0;
const double sigmoid_dom_max = 15.0; static const double sigmoid_dom_max = 15.0;
double interval; static double interval;
double lookup[LOOKUP_SIZE]; static double lookup[LOOKUP_SIZE];
#ifdef __GNUC__ #ifdef __GNUC__
#define likely(x) __builtin_expect(!!(x), 1) #define likely(x) __builtin_expect(!!(x), 1)