]> git.sesse.net Git - stockfish/blobdiff - src/misc.cpp
Synchronize search_pv() with search take I
[stockfish] / src / misc.cpp
index 06339d21ec14c24160cbf67e5c5e43873425a605..bf8143a33462780ac15e61fb3b9ddd4b6b8bc420 100644 (file)
@@ -27,6 +27,9 @@
 #  include <sys/time.h>
 #  include <sys/types.h>
 #  include <unistd.h>
+#  if defined(__hpux)
+#     include <sys/pstat.h>
+#  endif
 
 #else
 
@@ -50,7 +53,7 @@ using namespace std;
 /// Version number. If this is left empty, the current date (in the format
 /// YYMMDD) is used as a version number.
 
-static const string EngineVersion = "1.5";
+static const string EngineVersion = "";
 static const string AppName = "Stockfish";
 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;