Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Diff of /trunk/gadget/ecosystem.cc
[mareframe] / trunk / gadget / ecosystem.cc Repository:
ViewVC logotype

Diff of /trunk/gadget/ecosystem.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15, Tue Sep 1 19:14:33 2015 UTC revision 16, Tue Oct 13 11:29:01 2015 UTC
# Line 1  Line 1 
1  #include "ecosystem.h"  #include "ecosystem.h"
2  #include "runid.h"  #include "runid.h"
3  #include "global.h"  #include "global.h"
4  #ifndef NO_OPENMP  #ifdef _OPENMP
5  #include <omp.h>  #include <omp.h>
6  #endif  #endif
7    
8  #ifndef NO_OPENMP  #ifdef _OPENMP
9  extern Ecosystem** EcoSystems;  extern Ecosystem** EcoSystems;
10  //extern StochasticData* data;  //extern StochasticData* data;
11  #endif  #endif
# Line 111  Line 111 
111  void Ecosystem::Optimise() {  void Ecosystem::Optimise() {
112    int i;    int i;
113    for (i = 0; i < optvec.Size(); i++) {    for (i = 0; i < optvec.Size(); i++) {
114  #ifndef NO_OPENMP  #ifdef _OPENMP
115            int j, numThr = omp_get_max_threads ( );            int j, numThr = omp_get_max_threads ( );
116            DoubleVector v = this->getValues();            DoubleVector v = this->getValues();
117            for (j = 0; j < numThr; j++)            for (j = 0; j < numThr; j++)
# Line 169  Line 169 
169      tmpvec[i] = likevec[i]->getUnweightedLikelihood();      tmpvec[i] = likevec[i]->getUnweightedLikelihood();
170    
171    int iters = 0;    int iters = 0;
172  #ifndef NO_OPENMP  #ifdef _OPENMP
173    int numThr = omp_get_max_threads ( );    int numThr = omp_get_max_threads ( );
174      for (i = 0; i < numThr; i++)      for (i = 0; i < numThr; i++)
175            iters += EcoSystems[i]->getFuncEval();            iters += EcoSystems[i]->getFuncEval();

Legend:
Removed from v.15  
changed lines
  Added in v.16

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge