From 5c3b0b61c612b195e7456195ffdad90498c3a48d Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 16 Sep 2005 09:15:44 +0000 Subject: [PATCH] To implement min/max background compilation --- src/CONVERTOR/VISU_MedConvertor.cxx | 206 +++++++++++++--------------- 1 file changed, 96 insertions(+), 110 deletions(-) diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index dd69788c..245f8149 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -35,6 +35,7 @@ #include "MED_Utilities.hxx" #include +#include #include @@ -48,7 +49,7 @@ using MED::EBooleen; #ifdef _DEBUG_ static int MYDEBUG = 0; static int MYVALUEDEBUG = 0; -static int MYTHREADDEBUG = 1; +static int MYTHREADDEBUG = 0; static int MY_FAMILY_DEBUG = 0; static int MY_GROUP_DEBUG = 0; //#define _DEXCEPT_ @@ -516,93 +517,6 @@ namespace } - //--------------------------------------------------------------- - struct TFieldMinMax; - - void - GetMinMax(TFieldMinMax* theFieldMinMax, - PMEDField theField, - const MED::PFieldInfo& theFieldInfo, - TInt theNbTimeStamps, - MED::EEntiteMaillage theMEntity, - const MED::TGeom2Size& theGeom2Size, - const MED::TMKey2Profile& theMKey2Profile, - const MED::TKey2Gauss& theKey2Gauss, - const MED::PWrapper& theMEDWrapper, - VISU_MedConvertor::TMutex& theMutex) - { - //boost::mutex::scoped_lock aLock(theMutex); - INITMSG(MYTHREADDEBUG,"GetMinMax: - "<GetMinMax(iComp); - INITMSG(MYTHREADDEBUG,"- "< PFieldMinMax; + + + //--------------------------------------------------------------- + void + GetFieldMinMax(PFieldMinMax theFieldMinMax) + { + theFieldMinMax->Calculate(); + } + //--------------------------------------------------------------- void @@ -684,16 +669,17 @@ namespace TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap; PMEDField aField = aFieldMap[aFieldName]; - TFieldMinMax* aFieldMinMax = new TFieldMinMax(aField, - aFieldInfo, - aNbTimeStamps, - aMEntity, - aGeom2Size, - theMKey2Profile, - theKey2Gauss, - theMEDWrapper, - theMutex); - new boost::thread(*aFieldMinMax); + PFieldMinMax aFieldMinMax(new TFieldMinMax(aField, + aFieldInfo, + aNbTimeStamps, + aMEntity, + aGeom2Size, + theMKey2Profile, + theKey2Gauss, + theMEDWrapper, + theMutex)); + + boost::thread aThread(boost::bind(&GetFieldMinMax,aFieldMinMax)); } } -- 2.39.2