From e60308808f58a3517170edf61245031cb899e59e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 12 Jun 2018 00:40:37 -0700 Subject: fixes #32 autoscale based on CPUs available This should work on both Windows and the most common POSIX variants. We will create at least two threads for running completions, but there are numerous other threads in the code. --- src/core/platform.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/platform.h') diff --git a/src/core/platform.h b/src/core/platform.h index 07bfc14c..b709e3ba 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -190,6 +190,10 @@ extern int nni_plat_init(int (*)(void)); // will be called until nni_platform_init is called. extern void nni_plat_fini(void); +// nni_plat_ncpu returns the number of logical CPUs on the system. This is +// used to scale the number of independent threads started. +extern int nni_plat_ncpu(void); + // // TCP Support. // -- cgit v1.2.3-70-g09d2