mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Remove two DCHECKs from CubicHermiteSpline.
They were present as debugging checks but were causing problems with the build on 32bit i386 due to numerical cancellation issues, where x ~ -epsilon. Removing these checks only changes the behaviour in Debug mode. We are already handling such small negative numbers in production if they occur. All that this change does is to remove the crash. https://github.com/ceres-solver/ceres-solver/issues/212 Thanks to @NeroBurner and @debalance for reporting this. Change-Id: I66480e86d4fa0a4b621204f2ff44cc3ff8d01c04
This commit is contained in:
@@ -69,8 +69,6 @@ void CubicHermiteSpline(const Eigen::Matrix<double, kDataDimension, 1>& p0,
|
||||
const double x,
|
||||
double* f,
|
||||
double* dfdx) {
|
||||
DCHECK_GE(x, 0.0);
|
||||
DCHECK_LE(x, 1.0);
|
||||
typedef Eigen::Matrix<double, kDataDimension, 1> VType;
|
||||
const VType a = 0.5 * (-p0 + 3.0 * p1 - 3.0 * p2 + p3);
|
||||
const VType b = 0.5 * (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3);
|
||||
|
||||
Reference in New Issue
Block a user