mirror of https://github.com/CGAL/cgal
make variables atomic
This commit is contained in:
parent
1d0ec5bd38
commit
fab26b5a05
|
|
@ -183,7 +183,7 @@ public:
|
|||
/// \name String Conversion Functions
|
||||
//@{
|
||||
/// set value from <tt>const char*</tt> (base = 10)
|
||||
void fromString(const char* s, const extLong& p=get_static_defBigFloatInputDigits()) {
|
||||
void fromString(const char* s, extLong p = getBigFloatInputDigits()) {
|
||||
rep->fromString(s, p);
|
||||
}
|
||||
/// convert to <tt>std::string</tt> (base = 10)
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ private:
|
|||
std::string round(std::string inRep, long& L10, unsigned int width) const;
|
||||
DecimalOutput toDecimal(unsigned int width=get_static_defBigFloatOutputDigits(),
|
||||
bool Scientific=false) const;
|
||||
void fromString(const char *p, const extLong & prec = get_static_defBigFloatInputDigits());
|
||||
void fromString(const char *p, extLong prec = getBigFloatInputDigits());
|
||||
|
||||
void dump() const; //inline
|
||||
long adjustE(long E, BigInt M, long e) const;
|
||||
|
|
|
|||
|
|
@ -1009,7 +1009,7 @@ std::string BigFloatRep::round(std::string inRep, long& L10, unsigned int width)
|
|||
// See the file Real.cc for the differences
|
||||
|
||||
CGAL_INLINE_FUNCTION
|
||||
void BigFloatRep :: fromString(const char *str, const extLong & prec ) {
|
||||
void BigFloatRep :: fromString(const char *str, extLong prec ) {
|
||||
// NOTE: prec defaults to get_static_defBigFloatInputDigits() (see BigFloat.h)
|
||||
// check that prec is not INFTY
|
||||
if (prec.isInfty())
|
||||
|
|
|
|||
|
|
@ -134,6 +134,13 @@ CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defOutputDigits, get_static_def
|
|||
/** This value cannot be CORE_INFTY. */
|
||||
CGAL_GLOBAL_STATE_VAR(CGAL::cpp11::atomic<long>, defBigFloatInputDigits, 16)
|
||||
|
||||
inline
|
||||
long
|
||||
getBigFloatInputDigits()
|
||||
{
|
||||
return get_static_defBigFloatInputDigits();
|
||||
}
|
||||
|
||||
/// default BigFloat Division Relative Precision
|
||||
CGAL_GLOBAL_STATE_VAR(extLong, defBFdivRelPrec, 54)
|
||||
/// default BigFloat Sqrt Absolute Precision
|
||||
|
|
@ -234,6 +241,11 @@ inline bool setProgressiveEvalFlag(bool f) {
|
|||
return oldf;
|
||||
}
|
||||
|
||||
inline long getInitialProgressivePrec()
|
||||
{
|
||||
return get_static_defInitialProgressivePrec();
|
||||
}
|
||||
|
||||
/// set initial bit precision for progressive evaluation:
|
||||
inline long setDefInitialProgressivePrec(long n) {
|
||||
long oldn = get_static_defInitialProgressivePrec();
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ CGAL::cpp11::atomic<long> defBigFloatOutputDigits = 10;
|
|||
|
||||
/** NORMALLY, we like to make this equal to defBigFloatOutputDigits
|
||||
* 8/3/01, Chee: re-introduced this parameter */
|
||||
CGAL::cpp11::atomic<long> defOutputDigits = defBigFloatOutputDigits;
|
||||
CGAL::cpp11::atomic<long> defOutputDigits = 10; // == defBigFloatOutputDigits;
|
||||
|
||||
/** String Input Precision */
|
||||
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,7 @@ void AddSubRep<Operator>::computeExactFlags() {
|
|||
// larger than lowBound AND the defaultInitialProgressivePrec,
|
||||
// so that we do at least one iteration of the for-loop. So:
|
||||
// i is the variable for iteration.
|
||||
extLong i = core_min(get_static_defInitialProgressivePrec(), lowBound.asLong());
|
||||
extLong i = core_min(getInitialProgressivePrec(), lowBound.asLong());
|
||||
extLong ua = lowBound.asLong() + EXTLONG_ONE;
|
||||
// NOTE: ua is allowed to be CORE_INFTY
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue