Skip to content

Commit

Permalink
Fix windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev committed Sep 7, 2023
1 parent 5d44dbb commit 3d86225
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 26 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,19 @@ jobs:
# Run GTSAM_UNSTABLE tests
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.base_unstable
# Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.geometry_unstable
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.geometry_unstable
# Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.linear_unstable
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.linear_unstable
# Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.discrete_unstable
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.discrete_unstable
# Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.dynamics_unstable
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.dynamics_unstable
# Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear_unstable
# Compilation error
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam_unstable
# Compilation error
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.partition
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.nonlinear_unstable
# Compile. Fail with exception
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.slam_unstable
# Compile. Fail with exception
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check.partition
# Run all tests
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check
2 changes: 1 addition & 1 deletion gtsam/discrete/AlgebraicDecisionTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace gtsam {
* @ingroup discrete
*/
template <typename L>
class GTSAM_EXPORT AlgebraicDecisionTree : public DecisionTree<L, double> {
class AlgebraicDecisionTree : public DecisionTree<L, double> {
/**
* @brief Default method used by `labelFormatter` or `valueFormatter` when
* printing.
Expand Down
2 changes: 1 addition & 1 deletion gtsam/linear/SubgraphBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ GaussianFactorGraph buildFactorSubgraph(const GaussianFactorGraph &gfg,

/** Split the graph into a subgraph and the remaining edges.
* Note that the remaining factorgraph has null factors. */
std::pair<GaussianFactorGraph, GaussianFactorGraph> splitFactorGraph(
std::pair<GaussianFactorGraph, GaussianFactorGraph> GTSAM_EXPORT splitFactorGraph(
const GaussianFactorGraph &factorGraph, const Subgraph &subgraph);

} // namespace gtsam
2 changes: 1 addition & 1 deletion gtsam/sfm/TranslationRecovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace gtsam {
// where s is an arbitrary scale that can be supplied, default 1.0. Hence, two
// versions are supplied below corresponding to whether we have initial values
// or not.
class TranslationRecovery {
class GTSAM_EXPORT TranslationRecovery {
public:
using KeyPair = std::pair<Key, Key>;
using TranslationEdges = std::vector<BinaryMeasurement<Unit3>>;
Expand Down
6 changes: 3 additions & 3 deletions gtsam_unstable/geometry/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace gtsam {
* SLAM, where we have "time of arrival" measurements at a set of sensors. The
* TOA functor below provides a measurement function for those applications.
*/
class Event {
class GTSAM_UNSTABLE_EXPORT Event {
double time_; ///< Time event was generated
Point3 location_; ///< Location at time event was generated

Expand Down Expand Up @@ -62,10 +62,10 @@ class Event {
}

/** print with optional string */
GTSAM_UNSTABLE_EXPORT void print(const std::string& s = "") const;
void print(const std::string& s = "") const;

/** equals with an tolerance */
GTSAM_UNSTABLE_EXPORT bool equals(const Event& other,
bool equals(const Event& other,
double tol = 1e-9) const;

/// Updates a with tangent space delta
Expand Down
7 changes: 4 additions & 3 deletions gtsam_unstable/partition/GenericGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <stdexcept>
#include <string>
#include <memory>
#include <gtsam_unstable/dllexport.h>

#include "PartitionWorkSpace.h"

Expand Down Expand Up @@ -49,7 +50,7 @@ namespace gtsam { namespace partition {
typedef std::vector<sharedGenericFactor2D> GenericGraph2D;

/** merge nodes in DSF using constraints captured by the given graph */
std::list<std::vector<size_t> > findIslands(const GenericGraph2D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT findIslands(const GenericGraph2D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark);

/** eliminate the sensors from generic graph */
Expand Down Expand Up @@ -97,11 +98,11 @@ namespace gtsam { namespace partition {
typedef std::vector<sharedGenericFactor3D> GenericGraph3D;

/** merge nodes in DSF using constraints captured by the given graph */
std::list<std::vector<size_t> > findIslands(const GenericGraph3D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT findIslands(const GenericGraph3D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark);

/** eliminate the sensors from generic graph */
void reduceGenericGraph(const GenericGraph3D& graph, const std::vector<size_t>& cameraKeys, const std::vector<size_t>& landmarkKeys,
void GTSAM_UNSTABLE_EXPORT reduceGenericGraph(const GenericGraph3D& graph, const std::vector<size_t>& cameraKeys, const std::vector<size_t>& landmarkKeys,
const std::vector<int>& dictionary, GenericGraph3D& reducedGraph);

/** check whether the 3D graph is singular (under constrained) */
Expand Down
2 changes: 1 addition & 1 deletion gtsam_unstable/partition/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(ignore_test "testNestedDissection.cpp")

if (NOT GTSAM_USE_BOOST_FEATURES)
if (NOT GTSAM_USE_BOOST_FEATURES OR MSVC)
list(APPEND ignore_test "testFindSeparator.cpp")
endif()

Expand Down
2 changes: 1 addition & 1 deletion gtsam_unstable/slam/ProjectionFactorPPPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace gtsam {
* @ingroup slam
*/
template <class POSE, class LANDMARK, class CALIBRATION = Cal3_S2>
class GTSAM_UNSTABLE_EXPORT ProjectionFactorPPPC
class ProjectionFactorPPPC
: public NoiseModelFactorN<POSE, POSE, LANDMARK, CALIBRATION> {
protected:
Point2 measured_; ///< 2D measurement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gtsam {
* @ingroup slam
*/
template <class CAMERA>
class GTSAM_UNSTABLE_EXPORT SmartProjectionPoseFactorRollingShutter
class SmartProjectionPoseFactorRollingShutter
: public SmartProjectionFactor<CAMERA> {
private:
typedef SmartProjectionFactor<CAMERA> Base;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1441,14 +1441,14 @@ TEST( SmartStereoProjectionPoseFactor, HessianWithRotationNonDegenerate ) {
std::shared_ptr<GaussianFactor> hessianFactorRotTran =
smartFactor->linearize(tranValues);

// Hessian is invariant to rotations and translations in the degenerate case
EXPECT(
assert_equal(hessianFactor->information(),
double error;
#ifdef GTSAM_USE_EIGEN_MKL
hessianFactorRotTran->information(), 1e-5));
error = 1e-5;
#else
hessianFactorRotTran->information(), 1e-6));
error = 1e-6;
#endif
// Hessian is invariant to rotations and translations in the degenerate case
EXPECT(assert_equal(hessianFactor->information(), hessianFactorRotTran->information(), error));
}

/* ************************************************************************* */
Expand Down

0 comments on commit 3d86225

Please sign in to comment.