Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more windows tests #1581

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,7 @@ jobs:
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear_unstable
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam_unstable
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.partition

- name: Test
run: |
cmake --build build -j4 --config ${{ matrix.build_type }} --target check
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ set (CMAKE_PROJECT_VERSION_MAJOR ${GTSAM_VERSION_MAJOR})
set (CMAKE_PROJECT_VERSION_MINOR ${GTSAM_VERSION_MINOR})
set (CMAKE_PROJECT_VERSION_PATCH ${GTSAM_VERSION_PATCH})

if(MSVC)
set(MSVC_LINKER_FLAGS "/FORCE:MULTIPLE")
set(CMAKE_EXE_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
set(CMAKE_MODULE_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
set(CMAKE_SHARED_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
set(CMAKE_STATIC_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
endif()

###############################################################################
# Gather information, perform checks, set defaults

Expand Down
21 changes: 8 additions & 13 deletions gtsam/inference/Ordering.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace gtsam {

class Ordering: public KeyVector {
class GTSAM_EXPORT Ordering: public KeyVector {
protected:
typedef KeyVector Base;

Expand All @@ -45,7 +45,6 @@ class Ordering: public KeyVector {
typedef std::shared_ptr<This> shared_ptr; ///< shared_ptr to this class

/// Create an empty ordering
GTSAM_EXPORT
Ordering() {
}

Expand All @@ -71,11 +70,9 @@ class Ordering: public KeyVector {
* @param keys The key vector to append to this ordering.
* @return The ordering variable with appended keys.
*/
GTSAM_EXPORT
This& operator+=(KeyVector& keys);

/// Check if key exists in ordering.
GTSAM_EXPORT
bool contains(const Key& key) const;

/**
Expand All @@ -101,7 +98,7 @@ class Ordering: public KeyVector {
}

/// Compute a fill-reducing ordering using COLAMD from a VariableIndex.
static GTSAM_EXPORT Ordering Colamd(const VariableIndex& variableIndex);
static Ordering Colamd(const VariableIndex& variableIndex);

/// Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details
/// for note on performance). This internally builds a VariableIndex so if you already have a
Expand All @@ -126,7 +123,7 @@ class Ordering: public KeyVector {
/// variables in \c constrainLast will be ordered in the same order specified in the KeyVector
/// \c constrainLast. If \c forceOrder is false, the variables in \c constrainLast will be
/// ordered after all the others, but will be rearranged by CCOLAMD to reduce fill-in as well.
static GTSAM_EXPORT Ordering ColamdConstrainedLast(
static Ordering ColamdConstrainedLast(
const VariableIndex& variableIndex, const KeyVector& constrainLast,
bool forceOrder = false);

Expand Down Expand Up @@ -154,7 +151,7 @@ class Ordering: public KeyVector {
/// KeyVector \c constrainFirst. If \c forceOrder is false, the variables in \c
/// constrainFirst will be ordered before all the others, but will be rearranged by CCOLAMD to
/// reduce fill-in as well.
static GTSAM_EXPORT Ordering ColamdConstrainedFirst(
static Ordering ColamdConstrainedFirst(
const VariableIndex& variableIndex,
const KeyVector& constrainFirst, bool forceOrder = false);

Expand Down Expand Up @@ -183,7 +180,7 @@ class Ordering: public KeyVector {
/// appear in \c groups in arbitrary order. Any variables not present in \c groups will be
/// assigned to group 0. This function simply fills the \c cmember argument to CCOLAMD with the
/// supplied indices, see the CCOLAMD documentation for more information.
static GTSAM_EXPORT Ordering ColamdConstrained(
static Ordering ColamdConstrained(
const VariableIndex& variableIndex, const FastMap<Key, int>& groups);

/// Return a natural Ordering. Typically used by iterative solvers
Expand All @@ -197,11 +194,11 @@ class Ordering: public KeyVector {

/// METIS Formatting function
template<class FACTOR_GRAPH>
static GTSAM_EXPORT void CSRFormat(std::vector<int>& xadj,
static void CSRFormat(std::vector<int>& xadj,
std::vector<int>& adj, const FACTOR_GRAPH& graph);

/// Compute an ordering determined by METIS from a VariableIndex
static GTSAM_EXPORT Ordering Metis(const MetisIndex& met);
static Ordering Metis(const MetisIndex& met);

template<class FACTOR_GRAPH>
static Ordering Metis(const FACTOR_GRAPH& graph) {
Expand Down Expand Up @@ -243,18 +240,16 @@ class Ordering: public KeyVector {
/// @name Testable
/// @{

GTSAM_EXPORT
void print(const std::string& str = "", const KeyFormatter& keyFormatter =
DefaultKeyFormatter) const;

GTSAM_EXPORT
bool equals(const Ordering& other, double tol = 1e-9) const;

/// @}

private:
/// Internal COLAMD function
static GTSAM_EXPORT Ordering ColamdConstrained(
static Ordering ColamdConstrained(
const VariableIndex& variableIndex, std::vector<int>& cmember);

#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
Expand Down
Loading