diff options
Diffstat (limited to 'fpconv.h')
-rw-r--r-- | fpconv.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -7,10 +7,20 @@ | |||
7 | # define FPCONV_G_FMT_BUFSIZE 32 | 7 | # define FPCONV_G_FMT_BUFSIZE 32 |
8 | 8 | ||
9 | #ifdef USE_INTERNAL_FPCONV | 9 | #ifdef USE_INTERNAL_FPCONV |
10 | static inline void fpconv_init(void) | 10 | #ifdef MULTIPLE_THREADS |
11 | #include "dtoa_config.h" | ||
12 | #include <unistd.h> | ||
13 | static inline void fpconv_init() | ||
14 | { | ||
15 | // Add one to try and avoid core id multiplier alignment | ||
16 | set_max_dtoa_threads((sysconf(_SC_NPROCESSORS_CONF) + 1) * 3); | ||
17 | } | ||
18 | #else | ||
19 | static inline void fpconv_init() | ||
11 | { | 20 | { |
12 | /* Do nothing - not required */ | 21 | /* Do nothing - not required */ |
13 | } | 22 | } |
23 | #endif | ||
14 | #else | 24 | #else |
15 | extern void fpconv_init(void); | 25 | extern void fpconv_init(void); |
16 | #endif | 26 | #endif |