projects
/
stockfish
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compile error in cpu_count()
[stockfish]
/
src
/
misc.cpp
diff --git
a/src/misc.cpp
b/src/misc.cpp
index 10c779ed846f4d0a37f146efc636d0e687cbaedf..0920f7f08838b132f7413ee41c2a4229e0c80966 100644
(file)
--- a/
src/misc.cpp
+++ b/
src/misc.cpp
@@
-161,12
+161,12
@@
int cpu_count() {
#else
# if defined(_SC_NPROCESSORS_ONLN)
#else
# if defined(_SC_NPROCESSORS_ONLN)
- return std::min(sysconf(_SC_NPROCESSORS_ONLN), MAX_THREADS);
+ return std::min(
(int)
sysconf(_SC_NPROCESSORS_ONLN), MAX_THREADS);
# elif defined(__hpux)
struct pst_dynamic psd;
if (pstat_getdynamic(&psd, sizeof(psd), (size_t)1, 0) == -1)
return 1;
# elif defined(__hpux)
struct pst_dynamic psd;
if (pstat_getdynamic(&psd, sizeof(psd), (size_t)1, 0) == -1)
return 1;
- return std::min(psd.psd_proc_cnt, MAX_THREADS);
+ return std::min(
(int)
psd.psd_proc_cnt, MAX_THREADS);
# else
return 1;
# endif
# else
return 1;
# endif