svn merge -r 12653:12664 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / intern / elbeem / intern / paraloopend.h
1 // same as grid loop_end + barrier
2
3                         } // i
4                 int i=0; //dummy
5                 ADVANCE_POINTERS(2*gridLoopBound);
6         } // j
7
8 #       if COMPRESSGRIDS==1
9 #       if PARALLEL==1
10         //frintf(stderr," (id=%d k=%d) ",id,k);
11 #pragma omp barrier
12 #       endif // PARALLEL==1
13 #       else // COMPRESSGRIDS==1
14         int i=0; //dummy
15         ADVANCE_POINTERS(mLevel[lev].lSizex*2);
16 #       endif // COMPRESSGRIDS==1
17
18 } // all cell loop k,j,i
19
20 #pragma omp critical
21 {
22         if(doReduce) {
23                 // synchronize global vars
24                 for(int j=0; j<calcListFull.size() ; j++) mListFull.push_back( calcListFull[j] ); 
25                 for(int j=0; j<calcListEmpty.size(); j++) mListEmpty.push_back( calcListEmpty[j] ); 
26                 for(int j=0; j<calcListParts.size(); j++) mpParticles->addFullParticle( calcListParts[j] );
27                 if(calcMaxVlen>mMaxVlen) {  
28                         mMxvx = calcMxvx;  
29                         mMxvy = calcMxvy;  
30                         mMxvz = calcMxvz;  
31                         mMaxVlen = calcMaxVlen;  
32                 }  
33                 if(0) {debMsgStd("OMP_CRIT",DM_MSG,     "reduce id"<<id<<" curr: "<<mMaxVlen<<"|"<<mMxvx<<","<<mMxvy<<","<<mMxvz<< 
34                                                                                                                                                                 "      calc[ "<<calcMaxVlen<<"|"<<calcMxvx<<","<<calcMxvy<<","<<calcMxvz<<"]  " ,4 ); }
35         }
36 } // critical
37
38
39 } /* main_region */  
40         //?lobOutstrForce = true;
41