Issue in timeSchurFactor.cpp
Issue #246
resolved
There are now some issues in develop branch about SchurFactor:
In file included from /home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:8:0:
/home/zlv30/develop/gtsam/timing/DummyFactor.h:17:55: error: type/value mismatch at argument 1 in template parameter list for ‘template<class CAMERA> class gtsam::RegularImplicitSchurFactor’
class DummyFactor: public RegularImplicitSchurFactor<D> {
^
/home/zlv30/develop/gtsam/timing/DummyFactor.h:17:55: error: expected a type, got ‘D’
/home/zlv30/develop/gtsam/timing/DummyFactor.h: In constructor ‘gtsam::DummyFactor<D>::DummyFactor(const std::vector<std::pair<long unsigned int, Eigen::Matrix<double, 2, D> > >&, const Matrix&, const Matrix3&, const Vector&)’:
/home/zlv30/develop/gtsam/timing/DummyFactor.h:28:71: error: type/value mismatch at argument 1 in template parameter list for ‘template<class CAMERA> class gtsam::RegularImplicitSchurFactor’
const Matrix3& P, const Vector& b) :RegularImplicitSchurFactor<D>(Fblocks,E,P,b)
^
/home/zlv30/develop/gtsam/timing/DummyFactor.h:28:71: error: expected a type, got ‘D’
/home/zlv30/develop/gtsam/timing/DummyFactor.h:28:72: error: expected ‘{’ before ‘(’ token
const Matrix3& P, const Vector& b) :RegularImplicitSchurFactor<D>(Fblocks,E,P,b)
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp: In function ‘void timeAll(std::size_t, std::size_t)’:
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:31: error: type/value mismatch at argument 1 in template parameter list for ‘template<class CAMERA> class gtsam::RegularImplicitSchurFactor’
RegularImplicitSchurFactor<D> implicitFactor(Fblocks, E, P, b);
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:31: error: expected a type, got ‘D’
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:47: error: invalid type in declaration before ‘(’ token
RegularImplicitSchurFactor<D> implicitFactor(Fblocks, E, P, b);
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:64: error: expression list treated as compound expression in initializer [-fpermissive]
RegularImplicitSchurFactor<D> implicitFactor(Fblocks, E, P, b);
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:73:13: error: request for member ‘multiplyHessianAdd’ in ‘implicitFactor’, which is of non-class type ‘int’
factor.multiplyHessianAdd(alpha, xx, yy);\
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:84:3: note: in expansion of macro ‘TIME’
TIME(Implicit, implicitFactor, xvalues, yvalues)
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:76:15: error: request for member ‘multiplyHessianAdd’ in ‘implicitFactor’, which is of non-class type ‘int’
factor.multiplyHessianAdd(alpha, xx, yy);\
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:84:3: note: in expansion of macro ‘TIME’
TIME(Implicit, implicitFactor, xvalues, yvalues)
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:73:13: error: request for member ‘multiplyHessianAdd’ in ‘implicitFactor’, which is of non-class type ‘int’
factor.multiplyHessianAdd(alpha, xx, yy);\
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:108:5: note: in expansion of macro ‘TIME’
TIME(RawImplicit, implicitFactor, xdata, y.data())
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:76:15: error: request for member ‘multiplyHessianAdd’ in ‘implicitFactor’, which is of non-class type ‘int’
factor.multiplyHessianAdd(alpha, xx, yy);\
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:108:5: note: in expansion of macro ‘TIME’
TIME(RawImplicit, implicitFactor, xdata, y.data())
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp: In instantiation of ‘void timeAll(std::size_t, std::size_t) [with long unsigned int D = 6ul; std::size_t = long unsigned int]’:
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:149:33: required from here
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:64: warning: left operand of comma operator has no effect [-Wunused-value]
RegularImplicitSchurFactor<D> implicitFactor(Fblocks, E, P, b);
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:64: warning: right operand of comma operator has no effect [-Wunused-value]
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:64: warning: right operand of comma operator has no effect [-Wunused-value]
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:63:64: error: cannot convert ‘const Vector {aka const Eigen::Matrix<double, -1, 1>}’ to ‘int’ in initialization
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:65:51: error: no matching function for call to ‘gtsam::JacobianFactorQ<6ul, 2ul>::JacobianFactorQ(std::vector<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> >, std::allocator<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> > > >&, gtsam::Matrix&, gtsam::Matrix&, const Vector&, const SharedDiagonal&)’
JacobianFactorQ<D, 2> jf(Fblocks, E, P, b, model);
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:65:51: note: candidates are:
In file included from /home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:11:0:
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:53:3: note: gtsam::JacobianFactorQ<D, ZDim>::JacobianFactorQ(const gtsam::FastVector<long unsigned int>&, const std::vector<Eigen::Matrix<double, ZDim, D> >&, const Matrix&, const Matrix3&, const Vector&, const SharedDiagonal&) [with long unsigned int D = 6ul; long unsigned int ZDim = 2ul; gtsam::Matrix = Eigen::Matrix<double, -1, -1>; gtsam::Matrix3 = Eigen::Matrix<double, 3, 3>; gtsam::Vector = Eigen::Matrix<double, -1, 1>; gtsam::SharedDiagonal = boost::shared_ptr<gtsam::noiseModel::Diagonal>]
JacobianFactorQ(const FastVector<Key>& keys,
^
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:53:3: note: no known conversion for argument 1 from ‘std::vector<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> >, std::allocator<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> > > >’ to ‘const gtsam::FastVector<long unsigned int>&’
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:40:3: note: gtsam::JacobianFactorQ<D, ZDim>::JacobianFactorQ(const gtsam::FastVector<long unsigned int>&, const SharedDiagonal&) [with long unsigned int D = 6ul; long unsigned int ZDim = 2ul; gtsam::SharedDiagonal = boost::shared_ptr<gtsam::noiseModel::Diagonal>]
JacobianFactorQ(const FastVector<Key>& keys, //
^
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:40:3: note: candidate expects 2 arguments, 5 provided
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:36:3: note: gtsam::JacobianFactorQ<D, ZDim>::JacobianFactorQ() [with long unsigned int D = 6ul; long unsigned int ZDim = 2ul]
JacobianFactorQ() {
^
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:36:3: note: candidate expects 0 arguments, 5 provided
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:27:7: note: gtsam::JacobianFactorQ<6ul, 2ul>::JacobianFactorQ(const gtsam::JacobianFactorQ<6ul, 2ul>&)
class JacobianFactorQ: public RegularJacobianFactor<D> {
^
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQ.h:27:7: note: candidate expects 1 argument, 5 provided
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:67:53: error: no matching function for call to ‘gtsam::JacobianFactorQR<6ul, 2ul>::JacobianFactorQR(std::vector<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> >, std::allocator<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> > > >&, gtsam::Matrix&, gtsam::Matrix&, const Vector&, const SharedDiagonal&)’
JacobianFactorQR<D, 2> jqr(Fblocks, E, P, b, model);
^
/home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:67:53: note: candidates are:
In file included from /home/zlv30/develop/gtsam/timing/timeSchurFactors.cpp:12:0:
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQR.h:31:3: note: gtsam::JacobianFactorQR<D, ZDim>::JacobianFactorQR(const gtsam::FastVector<long unsigned int>&, const std::vector<Eigen::Matrix<double, ZDim, D> >&, const Matrix&, const Matrix3&, const Vector&, const SharedDiagonal&) [with long unsigned int D = 6ul; long unsigned int ZDim = 2ul; gtsam::Matrix = Eigen::Matrix<double, -1, -1>; gtsam::Matrix3 = Eigen::Matrix<double, 3, 3>; gtsam::Vector = Eigen::Matrix<double, -1, 1>; gtsam::SharedDiagonal = boost::shared_ptr<gtsam::noiseModel::Diagonal>]
JacobianFactorQR(const FastVector<Key>& keys,
^
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQR.h:31:3: note: no known conversion for argument 1 from ‘std::vector<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> >, std::allocator<std::pair<long unsigned int, Eigen::Matrix<double, 2, 6> > > >’ to ‘const gtsam::FastVector<long unsigned int>&’
/home/zlv30/develop/gtsam/gtsam/slam/JacobianFactorQR.h:21:7: note: gtsam::JacobianFactorQR<6ul, 2ul>::JacobianFactorQR(const gtsam::JacobianFactorQR<6ul, 2ul>&)
class JacobianFactorQR: public RegularJacobianFactor<D> {
Looks some effects caused by the merge of SmartFactor branch. Maybe Jenkins did not run over timing examples properly? Need to fix to compile the develop.
Comments (3)
-
reporter -
Jenkins has never built timing scripts in any configuration. We can turn them on once there is a pull request to fix them. CMake flag to turn them on/off on
make all
is GTSAM_BUILD_TIMING_ALWAYS. -
- changed status to resolved
Resolved in Pull Request #166
- Log in to comment
@dellaert Maybe Jenkins didn't have the timing enabled for SmartFactor Branch? I checked the log of this file, there is no history except a new file from the . I see some templates changes in RegularImplicitSchurFactor. Will it be much easier for you to fix it?