22#include <gtsam/config.h>
23#include <gtsam/dllexport.h>
30#include <tbb/scalable_allocator.h>
33#ifdef GTSAM_USE_EIGEN_MKL_OPENMP
40 std::string GTSAM_EXPORT
demangle(
const char* name);
43 typedef std::uint64_t
Key;
57 template<
typename T, T defaultValue>
74 operator T()
const {
return value; }
79# pragma clang diagnostic push
80# pragma clang diagnostic ignored "-Wunused-private-field"
86 class TbbOpenMPMixedScope
88 int previousOpenMPThreads;
91#if defined GTSAM_USE_TBB && defined GTSAM_USE_EIGEN_MKL_OPENMP
92 TbbOpenMPMixedScope() :
93 previousOpenMPThreads(omp_get_num_threads())
95 omp_set_num_threads(omp_get_num_procs() / 4);
98 ~TbbOpenMPMixedScope()
100 omp_set_num_threads(previousOpenMPThreads);
103 TbbOpenMPMixedScope() : previousOpenMPThreads(-1) {}
104 ~TbbOpenMPMixedScope() {}
109# pragma clang diagnostic pop
118#define assert_throw(CONDITION, EXCEPTION) ((void)0)
120#define assert_throw(CONDITION, EXCEPTION) \
121 if (!(CONDITION)) { \
Global functions in a separate testing namespace.
Definition chartTesting.h:28
std::string demangle(const char *name)
Pretty print Value type name.
Definition types.cpp:37
std::uint64_t FactorIndex
Integer nonlinear factor index type.
Definition types.h:46
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:49
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:43
T & operator*()
Operator to access the value.
Definition types.h:68
const T & operator*() const
Operator to access the value.
Definition types.h:71
ValueWithDefault()
Default constructor, initialize to default value supplied in template argument.
Definition types.h:62
ValueWithDefault(const T &_value)
Initialize to the given value.
Definition types.h:65