1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025269: Make parallel version of boolean operations avaible from DRAW

new command bsetparallelmode added.
usage: bsetparallelmode [1/0].

Documentation for new command "bsetparallelmode" added.
This commit is contained in:
aml
2014-10-02 12:55:08 +04:00
committed by bugmaster
parent d32dc118f1
commit e322db461d
4 changed files with 94 additions and 9 deletions

View File

@@ -30,8 +30,14 @@ is
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_Algo();"
Initialize (theAllocator: BaseAllocator from BOPCol)
returns Algo from BOPAlgo;
returns Algo from BOPAlgo;
GetParallelMode(myclass)
returns Boolean;
SetParallelMode(myclass;
theNewMode: Boolean from Standard);
Perform(me:out)
is deferred;

View File

@@ -22,6 +22,30 @@
#include <Standard_ProgramError.hxx>
#include <Standard_NotImplemented.hxx>
namespace
{
Standard_Boolean myGlobalRunParallel = Standard_False;
}
//=======================================================================
// function:
// purpose:
//=======================================================================
void BOPAlgo_Algo::SetParallelMode(Standard_Boolean theNewMode)
{
myGlobalRunParallel = theNewMode;
}
//=======================================================================
// function:
// purpose:
//=======================================================================
Standard_Boolean BOPAlgo_Algo::GetParallelMode()
{
return myGlobalRunParallel;
}
//=======================================================================
// function:
// purpose:
@@ -31,7 +55,7 @@ BOPAlgo_Algo::BOPAlgo_Algo()
myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
myErrorStatus(1),
myWarningStatus(0),
myRunParallel(Standard_False)
myRunParallel(myGlobalRunParallel)
{}
//=======================================================================
// function:
@@ -43,7 +67,7 @@ BOPAlgo_Algo::BOPAlgo_Algo
myAllocator(theAllocator),
myErrorStatus(1),
myWarningStatus(0),
myRunParallel(Standard_False)
myRunParallel(myGlobalRunParallel)
{}
//=======================================================================