X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;h=bf8143a33462780ac15e61fb3b9ddd4b6b8bc420;hp=f831338730f34a614d5010141e8f26111e1bea68;hb=0980f43ab06611c6eb0fb4c112551e9c40254a23;hpb=b38685625af42b9ef96a9f964062d63fe0b3d027 diff --git a/src/misc.cpp b/src/misc.cpp index f8313387..bf8143a3 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -27,6 +27,9 @@ # include # include # include +# if defined(__hpux) +# include +# endif #else @@ -52,7 +55,7 @@ using namespace std; static const string EngineVersion = ""; static const string AppName = "Stockfish"; -static const string AppTag = "765a"; +static const string AppTag = ""; //// @@ -187,6 +190,14 @@ int get_system_time() { int cpu_count() { return Min(sysconf(_SC_NPROCESSORS_ONLN), 8); } +# elif defined(__hpux) +int cpu_count() { + struct pst_dynamic psd; + if (pstat_getdynamic(&psd, sizeof(psd), (size_t)1, 0) == -1) + return 1; + + return Min(psd.psd_proc_cnt, 8); +} # else int cpu_count() { return 1;