mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
changed NO_THREADS to USE_THREADS
This commit is contained in:
parent
d4df8a970c
commit
51f1bba9c8
@ -16,13 +16,13 @@
|
|||||||
|
|
||||||
// press 'o' when flocking active to change the parameters.
|
// press 'o' when flocking active to change the parameters.
|
||||||
|
|
||||||
#ifndef NO_THREADS
|
#ifdef USE_THREADS
|
||||||
#include <thread>
|
#include <thread>
|
||||||
int threads = 1;
|
int threads = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<class T> auto parallelize(long long N, T action) -> decltype(action(0,0)) {
|
template<class T> auto parallelize(long long N, T action) -> decltype(action(0,0)) {
|
||||||
#ifdef NO_THREADS
|
#ifndef USE_THREADS
|
||||||
return action(0,N);
|
return action(0,N);
|
||||||
#else
|
#else
|
||||||
if(threads == 1) return action(0,N);
|
if(threads == 1) return action(0,N);
|
||||||
@ -327,7 +327,7 @@ namespace flocking {
|
|||||||
for(int i=0; i<N; i++)
|
for(int i=0; i<N; i++)
|
||||||
vdata[i].cp.shade = shape;
|
vdata[i].cp.shade = shape;
|
||||||
}
|
}
|
||||||
#ifndef NO_THREADS
|
#ifdef USE_THREADS
|
||||||
else if(argis("-threads")) {
|
else if(argis("-threads")) {
|
||||||
shift(); threads = argi();
|
shift(); threads = argi();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user