Fix some CI issues (running in Debug, with TBB)
parent
c681628cd0
commit
fdc0068c00
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtsam/nonlinear/Values.h>
|
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include <boost/bind/bind.hpp>
|
||||||
|
#include <gtsam/nonlinear/Values.h>
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
|
|
@ -103,16 +103,16 @@ namespace gtsam {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void Values::retractMasked(const VectorValues& delta, const KeySet& mask) {
|
void Values::retractMasked(const VectorValues& delta, const KeySet& mask) {
|
||||||
gttic(retractMasked);
|
gttic(retractMasked);
|
||||||
assert(theta->size() == delta.size());
|
assert(this->size() == delta.size());
|
||||||
auto key_value = values_.begin();
|
auto key_value = values_.begin();
|
||||||
VectorValues::const_iterator key_delta;
|
VectorValues::const_iterator key_delta;
|
||||||
#ifdef GTSAM_USE_TBB
|
#ifdef GTSAM_USE_TBB
|
||||||
for (; key_value != values_.end(); ++key_value) {
|
for (; key_value != values_.end(); ++key_value) {
|
||||||
key_delta = delta.find(key_value.first);
|
key_delta = delta.find(key_value->first);
|
||||||
#else
|
#else
|
||||||
for (key_delta = delta.begin(); key_value != values_.end();
|
for (key_delta = delta.begin(); key_value != values_.end();
|
||||||
++key_value, ++key_delta) {
|
++key_value, ++key_delta) {
|
||||||
assert(key_value.first == key_delta->first);
|
assert(key_value->first == key_delta->first);
|
||||||
#endif
|
#endif
|
||||||
Key var = key_value->first;
|
Key var = key_value->first;
|
||||||
assert(static_cast<size_t>(delta[var].size()) == key_value->second->dim());
|
assert(static_cast<size_t>(delta[var].size()) == key_value->second->dim());
|
||||||
|
|
|
@ -306,12 +306,6 @@ namespace gtsam {
|
||||||
typedef KeyValueMap::const_iterator::value_type ConstKeyValuePtrPair;
|
typedef KeyValueMap::const_iterator::value_type ConstKeyValuePtrPair;
|
||||||
typedef KeyValueMap::iterator::value_type KeyValuePtrPair;
|
typedef KeyValueMap::iterator::value_type KeyValuePtrPair;
|
||||||
|
|
||||||
/** insert that mimics the STL map insert - if the value already exists, the map is not modified
|
|
||||||
* and an iterator to the existing value is returned, along with 'false'. If the value did not
|
|
||||||
* exist, it is inserted and an iterator pointing to the new element, along with 'true', is
|
|
||||||
* returned. */
|
|
||||||
std::pair<iterator, bool> tryInsert(Key j, const Value& value);
|
|
||||||
|
|
||||||
/// Mutable forward iterator, with value type KeyValuePair
|
/// Mutable forward iterator, with value type KeyValuePair
|
||||||
typedef boost::transform_iterator<
|
typedef boost::transform_iterator<
|
||||||
std::function<KeyValuePair(const KeyValuePtrPair&)>, KeyValueMap::iterator> iterator;
|
std::function<KeyValuePair(const KeyValuePtrPair&)>, KeyValueMap::iterator> iterator;
|
||||||
|
@ -328,6 +322,12 @@ namespace gtsam {
|
||||||
typedef boost::transform_iterator<
|
typedef boost::transform_iterator<
|
||||||
std::function<ConstKeyValuePair(const ConstKeyValuePtrPair&)>, KeyValueMap::const_reverse_iterator> const_reverse_iterator;
|
std::function<ConstKeyValuePair(const ConstKeyValuePtrPair&)>, KeyValueMap::const_reverse_iterator> const_reverse_iterator;
|
||||||
|
|
||||||
|
/** insert that mimics the STL map insert - if the value already exists, the map is not modified
|
||||||
|
* and an iterator to the existing value is returned, along with 'false'. If the value did not
|
||||||
|
* exist, it is inserted and an iterator pointing to the new element, along with 'true', is
|
||||||
|
* returned. */
|
||||||
|
std::pair<iterator, bool> tryInsert(Key j, const Value& value);
|
||||||
|
|
||||||
static ConstKeyValuePair make_const_deref_pair(const KeyValueMap::const_iterator::value_type& key_value) {
|
static ConstKeyValuePair make_const_deref_pair(const KeyValueMap::const_iterator::value_type& key_value) {
|
||||||
return ConstKeyValuePair(key_value.first, *key_value.second); }
|
return ConstKeyValuePair(key_value.first, *key_value.second); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue