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

diff --combined intern/elbeem/SConscript
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) 
index ae65b1d9fa61af02dd8c79842f028492869a28be,357623ea4943301274eec23e198dd317bc3f0d76..9e8992b4e1e36f72e0c82c716cecc079d1359f9a
@@@ -67,7 -67,6 +67,7 @@@
  #include "BKE_action.h"
  #include "BKE_anim.h"
  #include "BKE_armature.h"
 +#include "BKE_cloth.h"
  #include "BKE_curve.h"
  #include "BKE_depsgraph.h"
  #include "BKE_displist.h"
@@@ -140,7 -139,7 +140,7 @@@ void getViewVector(float coord[3], floa
  static void clipMirrorModifier(TransInfo *t, Object *ob)
  {
        ModifierData *md= ob->modifiers.first;
-       float tolerance[3];
+       float tolerance[3] = {0.0f, 0.0f, 0.0f};
        int axis = 0;
  
        for (; md; md=md->next) {
@@@ -314,16 -313,8 +314,16 @@@ void recalcData(TransInfo *t
                        /* bah, softbody exception... recalcdata doesnt reset */
                        for(base= FIRSTBASE; base; base= base->next) {
                                if(base->object->recalc & OB_RECALC_DATA)
 +                              {                                       
 +                                      ClothModifierData *clmd = NULL;
 +                                      
                                        if(modifiers_isSoftbodyEnabled(base->object)) {
                                                base->object->softflag |= OB_SB_REDO;
 +                                      }
 +                                      else if(modifiers_isClothEnabled(ob)) {
 +                                              cloth_free_modifier(modifiers_isClothEnabled(ob));
 +                                      }
 +                                      
                                }
                        }
                }
                                }                               
                        }
                        
 -                      /* softbody exception */
 -                      if(modifiers_isSoftbodyEnabled(ob)) {
 -                              if(ob->recalc & OB_RECALC_DATA)
 -                                      ob->softflag |= OB_SB_REDO;
 +                      /* softbody & cloth exception */
 +                      if(ob->recalc & OB_RECALC_DATA)
 +                      {
 +                              ClothModifierData *clmd = NULL;
 +                              
 +                              if(modifiers_isSoftbodyEnabled(ob)) {
 +                                              ob->softflag |= OB_SB_REDO;
 +                              }
 +                              else if(modifiers_isClothEnabled(ob)) {
 +                                      cloth_free_modifier(modifiers_isClothEnabled(ob));
 +                              }
                        }
                        
                        /* proxy exception */