mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0023952: Improving thread-safety of intersections, approximations and other modeling algorithms
AdvApp2Var_SysBase::mcrgene_ size reduced from 1000 to 32 elements, and each element reworked into typed structure. fixed IntAna_Curve.cxx to prevent access to #NAN# SigneSqrtDis fixed alignment of doubles by 8 bytes, and minor corrections Minor correction: static const N given more specific name (MAX_ALLOC_NB) Added QAcommands OCC23952sweep and OCC23952intersect Added test cases bugs/modalg_5/bug23952_1 bug23952_2
This commit is contained in:
@@ -201,10 +201,7 @@ static void Solve(math_FunctionWithDerivative& F,
|
||||
|
||||
#define NEWSEQ 1
|
||||
|
||||
#if NEWSEQ
|
||||
TColStd_SequenceOfReal StaticSol;
|
||||
|
||||
#endif
|
||||
static const Standard_Integer methode = 1; //-- 1:(Nv Traitement) 3:(Nv + Ancien +check) 2:(Ancien)
|
||||
|
||||
math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
|
||||
const Standard_Real A,
|
||||
@@ -222,7 +219,9 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
|
||||
}
|
||||
#endif
|
||||
|
||||
static Standard_Integer methode = 1; //-- 1:(Nv Traitement) 3:(Nv + Ancien +check) 2:(Ancien)
|
||||
#if NEWSEQ
|
||||
TColStd_SequenceOfReal StaticSol;
|
||||
#endif
|
||||
Sol.Clear();
|
||||
NbStateSol.Clear();
|
||||
if(methode & 1) {
|
||||
|
@@ -29,8 +29,12 @@
|
||||
#include <math_MultipleVarFunction.hxx>
|
||||
|
||||
|
||||
static Standard_Real sqrarg;
|
||||
#define SQR(a) (sqrarg=(a), sqrarg*sqrarg)
|
||||
namespace {
|
||||
static inline Standard_Real SQR (const Standard_Real a)
|
||||
{
|
||||
return a * a;
|
||||
}
|
||||
}
|
||||
|
||||
class DirFunctionBis : public math_Function {
|
||||
|
||||
|
@@ -42,9 +42,20 @@
|
||||
#include <math_IntegerVector.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
static Standard_Real at, bt, ct;
|
||||
#define PYTHAG(a,b) ((at=fabs(a)) > (bt=fabs(b)) ? \
|
||||
(ct=bt/at,at*sqrt(1.0+ct*ct)) : (bt ? (ct=at/bt,bt*sqrt(1.0+ct*ct)) : 0.0))
|
||||
namespace {
|
||||
static inline Standard_Real PYTHAG (const Standard_Real a, const Standard_Real b)
|
||||
{
|
||||
Standard_Real at = fabs (a), bt = fabs (b), ct = 0.;
|
||||
if (at > bt) {
|
||||
ct = bt / at;
|
||||
ct = at * sqrt (1.0 + ct * ct);
|
||||
} else if (bt) {
|
||||
ct = at / bt;
|
||||
ct = bt * sqrt (1.0 + ct * ct);
|
||||
}
|
||||
return ct;
|
||||
}
|
||||
}
|
||||
|
||||
#define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
|
||||
|
||||
|
Reference in New Issue
Block a user