Marge with trunk: svn merge -r 12050:12057 https://svn.blender.org/svnroot/bf-blender...
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 17 Sep 2007 11:10:23 +0000 (11:10 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 17 Sep 2007 11:10:23 +0000 (11:10 +0000)
1  2 
intern/elbeem/SConscript
intern/elbeem/intern/paraloop.h
intern/elbeem/intern/paraloopend.h
intern/elbeem/intern/paraloopstart.h
source/blender/src/transform_generics.c

index bb6637ba32d1109cf2cd431cb6edbe3eba1b5a85,bb6637ba32d1109cf2cd431cb6edbe3eba1b5a85..75d9b98c82a4360af85b839b722f723e47e2c1f4
@@@ -5,7 -5,7 +5,7 @@@ Import('env'
  
  sources = env.Glob('intern/*.cpp')
  
--defs = 'NOGUI ELBEEM_BLENDER=1'
++defs = 'PARALLEL NOGUI ELBEEM_BLENDER=1'
  if env['OURPLATFORM']=='win32-vc':
      defs += ' USE_MSVC6FIXES'
  incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC']
index e8bef648a8ded9e12ec288ec48eaf9d9e8c5ff0e,0000000000000000000000000000000000000000..fba0ae44b91583bab268b32e1716cdf5d239ac12
mode 100644,000000..100644
--- /dev/null
@@@ -1,51 -1,0 +1,50 @@@
-       if(jstart<1) jstart = 1; \
 +
 +#define PERFORM_USQRMAXCHECK \
 +_Pragma("omp critical") {\
 +USQRMAXCHECK(usqr,ux,uy,uz, mMaxVlen, mMxvx,mMxvy,mMxvz); \
 +} \
 +
 +
 +#define LIST_EMPTY(x) \
 +_Pragma("omp critical") {\
 +mListEmpty.push_back( x ); }
 +
 +#define LIST_FULL(x) \
 +_Pragma("omp critical") {\
 +mListFull.push_back( x ); }
 +
 +#define FSGR_ADDPART(x)  \
 +_Pragma("omp critical") { \
 +mpParticles->addFullParticle( x ); } \
 +
 +
 +#define MAX_THREADS 2
 +
 +#define  GRID_REGION_START()  \
 +{ /* main_region */ \
 +      int kstart=getForZMinBnd(), kend=getForZMaxBnd(mMaxRefine); \
 +      if(gridLoopBound>0){ kstart=getForZMin1(), kend=getForZMax1(mMaxRefine); } \
 +      int kdir = 1; \
 +      const int id=omp_get_thread_num(); \
 +      int jstart = (id*((mLevel[mMaxRefine].lSizey-gridLoopBound) / MAX_THREADS))+gridLoopBound; \
 +      int jend   = (id+1)*((mLevel[mMaxRefine].lSizey-gridLoopBound)/ MAX_THREADS); \
 +      if(id+1 == MAX_THREADS) \
 +      { \
 +      jend = mLevel[mMaxRefine].lSizey-gridLoopBound; \
 +      } \
 +      LbmFloat *ccel = NULL, *tcel = NULL; \
 +      CellFlagType *pFlagSrc=NULL, *pFlagDst=NULL; \
 +      if(mLevel[mMaxRefine].setCurr==1) { \
 +      kdir = -1; \
 +      int temp = kend; \
 +      kend = kstart-1; \
 +      kstart = temp-1; \
 +      temp = id; /* dummy remove warning */ \
 +} \
 +
++// if(jstart<1) jstart = 1; 
 +
 +#define unused_GRID_REGION_END() \
 +} /* main_region */  \
 +      // end unusedGRID_REGION_END
 +
index 6ea636e8d23aada44b0ed6ed5eefaba5a517bcb3,0000000000000000000000000000000000000000..889e29308182e8b720f91d09774dada618c56e2c
mode 100644,000000..100644
--- /dev/null
@@@ -1,14 -1,0 +1,13 @@@
-       /* COMPRESSGRIDS!=1 */ 
 +// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 +} /* i */ 
 +      int i=0; 
 +      ADVANCE_POINTERS(2*gridLoopBound); 
 +} /* j */ 
 +#pragma omp barrier 
++      /* COMPRESSGRIDS!=1 */ 
 +      /* int i=0;  */ 
 +      /* ADVANCE_POINTERS(mLevel[lev].lSizex*2);  */ 
 +} /* all cell loop k,j,i */ 
 +      if(doReduce) { } /* dummy remove warning */ 
 +} /* main_region */ 
 +
index 9f13eb3207bc0228877283cd2397751da11e111d,0000000000000000000000000000000000000000..e5940815dc808f77d9012672a8e5828b69532e68
mode 100644,000000..100644
--- /dev/null
@@@ -1,3 -1,0 +1,3 @@@
- #pragma omp parallel section num_threads(MAX_THREADS) \
- reduction(+: calcCurrentMass, calcCurrentVolume, calcCellsFilled, calcCellsEmptied, calcNumUsedCells)
 +
++#pragma omp parallel num_threads(MAX_THREADS) \
++reduction(+: calcCurrentMass, calcCurrentVolume, calcCellsFilled, calcCellsEmptied, calcNumUsedCells)