aboutsummaryrefslogtreecommitdiff
path: root/fpconv.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpconv.h')
-rw-r--r--fpconv.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/fpconv.h b/fpconv.h
index 59e0867..5d9d95e 100644
--- a/fpconv.h
+++ b/fpconv.h
@@ -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
10static inline void fpconv_init(void) 10#ifdef MULTIPLE_THREADS
11#include "dtoa_config.h"
12#include <unistd.h>
13static 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
19static inline void fpconv_init()
11{ 20{
12 /* Do nothing - not required */ 21 /* Do nothing - not required */
13} 22}
23#endif
14#else 24#else
15extern void fpconv_init(void); 25extern void fpconv_init(void);
16#endif 26#endif