Browse Source

Introducing a TBB adapter that #undefs TRUE and FALSE.

tempestpy_adaptions
Tim Quatmann 6 years ago
parent
commit
3a11a4b3eb
  1. 2
      resources/3rdparty/gmm-5.2/include/gmm/gmm_blas.h
  2. 5
      src/storm-cli-utilities/cli.cpp
  3. 32
      src/storm/adapters/IntelTbbAdapter.h
  4. 1
      src/storm/settings/modules/CoreSettings.cpp
  5. 1
      src/storm/solver/GmmxxMultiplier.cpp
  6. 1
      src/storm/solver/NativeMultiplier.cpp
  7. 7
      src/storm/storage/SparseMatrix.cpp
  8. 1
      src/storm/storage/SparseMatrix.h
  9. 3
      src/storm/utility/VectorHelper.cpp
  10. 6
      src/storm/utility/vector.h

2
resources/3rdparty/gmm-5.2/include/gmm/gmm_blas.h

@ -44,7 +44,7 @@
#ifdef STORM_HAVE_INTELTBB
#include <new> // This fixes a potential dependency ordering problem between GMM and TBB
#include "tbb/tbb.h"
#include "storm/adapters/IntelTbbAdapter.h"
#include <iterator>
#endif

5
src/storm-cli-utilities/cli.cpp

@ -17,9 +17,8 @@
// Includes for the linked libraries and versions header.
#ifdef STORM_HAVE_INTELTBB
# include "tbb/tbb_stddef.h"
#endif
#include "storm/adapters/IntelTbbAdapter.h"
#ifdef STORM_HAVE_GLPK
# include "glpk.h"
#endif

32
src/storm/adapters/IntelTbbAdapter.h

@ -0,0 +1,32 @@
#pragma once
// To detect whether the usage of TBB is possible, this include is neccessary
#include "storm-config.h"
/* On macOS, TBB includes the header
* /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach/boolean.h
* which #defines macros TRUE and FALSE. Since these also occur as identifiers, we #undef them after including TBB.
* We still issue a warning in case these macros have been defined before.
*/
#ifdef TRUE
#warning "Undefining previously defined macro 'TRUE'."
#endif
#ifdef FALSE
#warning "Undefining previously defined macro 'FALSE'."
#endif
#ifdef STORM_HAVE_INTELTBB
#include "tbb/tbb.h"
#include "tbb/tbb_stddef.h"
#endif
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif

1
src/storm/settings/modules/CoreSettings.cpp

@ -9,6 +9,7 @@
#include "storm/solver/SolverSelectionOptions.h"
#include "storm/storage/dd/DdType.h"
#include "storm/adapters/IntelTbbAdapter.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/IllegalArgumentValueException.h"

1
src/storm/solver/GmmxxMultiplier.cpp

@ -2,6 +2,7 @@
#include "storm/adapters/RationalNumberAdapter.h"
#include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/adapters/IntelTbbAdapter.h"
#include "storm/storage/SparseMatrix.h"
#include "storm/settings/SettingsManager.h"
#include "storm/settings/modules/CoreSettings.h"

1
src/storm/solver/NativeMultiplier.cpp

@ -10,6 +10,7 @@
#include "storm/adapters/RationalNumberAdapter.h"
#include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/adapters/IntelTbbAdapter.h"
#include "storm/utility/macros.h"

7
src/storm/storage/SparseMatrix.cpp

@ -1,12 +1,5 @@
#include <boost/functional/hash.hpp>
// To detect whether the usage of TBB is possible, this include is neccessary
#include "storm-config.h"
#ifdef STORM_HAVE_INTELTBB
#include "tbb/tbb.h"
#endif
#include "storm/storage/sparse/StateType.h"
#include "storm/storage/SparseMatrix.h"
#include "storm/adapters/RationalFunctionAdapter.h"

1
src/storm/storage/SparseMatrix.h

@ -16,6 +16,7 @@
#include "storm/utility/macros.h"
#include "storm/utility/constants.h"
#include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/adapters/IntelTbbAdapter.h"
// Forward declaration for adapter classes.
namespace storm {

3
src/storm/utility/VectorHelper.cpp

@ -5,8 +5,7 @@
#include "storm/adapters/RationalNumberAdapter.h"
#include "storm/adapters/RationalFunctionAdapter.h"
#include "storm-config.h"
#include "storm/adapters/IntelTbbAdapter.h"
#include "storm/utility/vector.h"

6
src/storm/utility/vector.h

@ -1,16 +1,12 @@
#ifndef STORM_UTILITY_VECTOR_H_
#define STORM_UTILITY_VECTOR_H_
#include "storm-config.h"
#ifdef STORM_HAVE_INTELTBB
#include "tbb/tbb.h"
#endif
#include <iostream>
#include <algorithm>
#include <functional>
#include <numeric>
#include <storm/adapters/RationalFunctionAdapter.h>
#include <storm/adapters/IntelTbbAdapter.h>
#include <boost/optional.hpp>

Loading…
Cancel
Save