4 |
#include "gadget.h" |
#include "gadget.h" |
5 |
|
|
6 |
extern Ecosystem* EcoSystem; |
extern Ecosystem* EcoSystem; |
7 |
|
extern volatile int interrupted; |
8 |
#ifndef NO_OPENMP |
#ifdef _OPENMP |
9 |
extern Ecosystem** EcoSystems; |
extern Ecosystem** EcoSystems; |
10 |
#endif |
#endif |
11 |
|
|
13 |
if (EcoSystem->getFuncEval() != 0) |
if (EcoSystem->getFuncEval() != 0) |
14 |
{ |
{ |
15 |
int iters = EcoSystem->getFuncEval(); |
int iters = EcoSystem->getFuncEval(); |
16 |
#ifndef NO_OPENMP |
#ifdef _OPENMP |
17 |
int numThr = omp_get_max_threads ( ); |
int numThr = omp_get_max_threads ( ); |
18 |
for (int i = 0; i < numThr; i++) |
for (int i = 0; i < numThr; i++) |
19 |
iters += EcoSystems[i]->getFuncEval(); |
iters += EcoSystems[i]->getFuncEval(); |
31 |
} |
} |
32 |
|
|
33 |
int InterruptInterface::menu() { |
int InterruptInterface::menu() { |
34 |
|
interrupted = 0; |
35 |
char userinput[MaxStrLength]; |
char userinput[MaxStrLength]; |
36 |
char interruptfile[MaxStrLength]; |
char interruptfile[MaxStrLength]; |
37 |
strncpy(userinput, "", MaxStrLength); |
strncpy(userinput, "", MaxStrLength); |