Browse Source

Replaced boost integer mask includes with cstdint

Reimplemented Gmm conversion with in place constructors


Former-commit-id: 003f582f9c
main
PBerger 12 years ago
parent
commit
158430418e
  1. 21
      src/adapters/GmmxxAdapter.h
  2. 2
      src/formula/Ltl/BoundedEventually.h
  3. 2
      src/formula/Ltl/BoundedUntil.h
  4. 2
      src/formula/Prctl/BoundedEventually.h
  5. 2
      src/formula/Prctl/BoundedNaryUntil.h
  6. 2
      src/formula/Prctl/BoundedUntil.h
  7. 2
      src/formula/Prctl/InstantaneousReward.h
  8. 2
      src/formula/abstract/BoundedEventually.h
  9. 2
      src/formula/abstract/BoundedNaryUntil.h
  10. 2
      src/formula/abstract/BoundedUntil.h
  11. 2
      src/formula/abstract/InstantaneousReward.h
  12. 2
      src/parser/AtomicPropositionLabelingParser.h
  13. 2
      src/parser/DeterministicSparseTransitionParser.cpp
  14. 2
      src/parser/NondeterministicSparseTransitionParser.cpp
  15. 2
      src/parser/SparseStateRewardParser.h
  16. 5
      src/settings/Argument.h
  17. 2
      src/storage/BitVector.h
  18. 2
      src/storage/SparseMatrix.h
  19. 2
      src/utility/CuddUtility.h
  20. 2
      test/functional/eigen/EigenSparseMatrixTest.cpp
  21. 2
      test/functional/storage/adapters/EigenAdapterTest.cpp
  22. 2
      test/functional/storage/adapters/GmmAdapterTest.cpp
  23. 2
      test/functional/storage/adapters/StormAdapterTest.cpp

21
src/adapters/GmmxxAdapter.h

@ -9,6 +9,7 @@
#define STORM_ADAPTERS_GMMXXADAPTER_H_
#include "src/storage/SparseMatrix.h"
#include <new>
#include "log4cplus/logger.h"
#include "log4cplus/loggingmacros.h"
@ -59,12 +60,20 @@ public:
// Prepare the resulting matrix.
gmm::csr_matrix<T>* result = new gmm::csr_matrix<T>(matrix.rowCount, matrix.colCount);
// Move Row Indications
result->jc = std::vector<uint_fast64_t>(std::move(matrix.rowIndications));
// Move Columns Indications
result->ir = std::vector<uint_fast64_t>(std::move(matrix.columnIndications));
// And do the same thing with the actual values.
result->pr = std::vector<T>(std::move(matrix.valueStorage));
typedef unsigned long long IND_TYPE;
typedef std::vector<IND_TYPE> vectorType_ull_t;
typedef std::vector<T> vectorType_T_t;
// Move Row Indications
result->jc.~vectorType_ull_t(); // Call Destructor inplace
new (&result->jc) vectorType_ull_t(std::move(matrix.rowIndications));
// Move Columns Indications
result->ir.~vectorType_ull_t(); // Call Destructor inplace
new (&result->ir) vectorType_ull_t(std::move(matrix.columnIndications));
// And do the same thing with the actual values.
result->pr.~vectorType_T_t(); // Call Destructor inplace
new (&result->pr) vectorType_T_t(std::move(matrix.valueStorage));
LOG4CPLUS_DEBUG(logger, "Done converting matrix to gmm++ format.");

2
src/formula/Ltl/BoundedEventually.h

@ -11,7 +11,7 @@
#include "src/formula/abstract/BoundedEventually.h"
#include "AbstractLtlFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
#include "src/modelchecker/ltl/ForwardDeclarations.h"

2
src/formula/Ltl/BoundedUntil.h

@ -10,7 +10,7 @@
#include "src/formula/abstract/BoundedUntil.h"
#include "AbstractLtlFormula.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
#include "src/modelchecker/ltl/ForwardDeclarations.h"

2
src/formula/Prctl/BoundedEventually.h

@ -12,7 +12,7 @@
#include "src/formula/Prctl/AbstractPathFormula.h"
#include "src/formula/Prctl/AbstractStateFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
#include "src/modelchecker/prctl/ForwardDeclarations.h"

2
src/formula/Prctl/BoundedNaryUntil.h

@ -11,7 +11,7 @@
#include "src/formula/abstract/BoundedNaryUntil.h"
#include "src/formula/Prctl/AbstractPathFormula.h"
#include "src/formula/Prctl/AbstractStateFormula.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <tuple>

2
src/formula/Prctl/BoundedUntil.h

@ -11,7 +11,7 @@
#include "src/formula/abstract/BoundedUntil.h"
#include "src/formula/Prctl/AbstractPathFormula.h"
#include "src/formula/Prctl/AbstractStateFormula.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
#include "src/modelchecker/prctl/ForwardDeclarations.h"

2
src/formula/Prctl/InstantaneousReward.h

@ -12,7 +12,7 @@
#include "AbstractStateFormula.h"
#include "src/formula/abstract/InstantaneousReward.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
namespace storm {

2
src/formula/abstract/BoundedEventually.h

@ -10,7 +10,7 @@
#include "src/formula/abstract/AbstractFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
namespace storm {

2
src/formula/abstract/BoundedNaryUntil.h

@ -9,7 +9,7 @@
#define STORM_FORMULA_ABSTRACT_BOUNDEDNARYUNTIL_H_
#include "src/formula/abstract/AbstractFormula.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <tuple>

2
src/formula/abstract/BoundedUntil.h

@ -9,7 +9,7 @@
#define STORM_FORMULA_ABSTRACT_BOUNDEDUNTIL_H_
#include "src/formula/abstract/AbstractFormula.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
namespace storm {

2
src/formula/abstract/InstantaneousReward.h

@ -10,7 +10,7 @@
#include "AbstractFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include <string>
namespace storm {

2
src/parser/AtomicPropositionLabelingParser.h

@ -2,7 +2,7 @@
#define STORM_PARSER_LABPARSER_H_
#include "src/models/AtomicPropositionsLabeling.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include "src/parser/Parser.h"

2
src/parser/DeterministicSparseTransitionParser.cpp

@ -22,7 +22,7 @@
#include "src/exceptions/FileIoException.h"
#include "src/exceptions/WrongFormatException.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include "src/settings/Settings.h"
#include "log4cplus/logger.h"

2
src/parser/NondeterministicSparseTransitionParser.cpp

@ -24,7 +24,7 @@
#include "src/settings/Settings.h"
#include "src/exceptions/FileIoException.h"
#include "src/exceptions/WrongFormatException.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include "log4cplus/logger.h"
#include "log4cplus/loggingmacros.h"
extern log4cplus::Logger logger;

2
src/parser/SparseStateRewardParser.h

@ -1,7 +1,7 @@
#ifndef STORM_PARSER_SPARSESTATEREWARDPARSER_H_
#define STORM_PARSER_SPARSESTATEREWARDPARSER_H_
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include "src/parser/Parser.h"
#include <memory>
#include <vector>

5
src/settings/Argument.h

@ -16,6 +16,7 @@
#include "src/settings/ArgumentTypeInferationHelper.h"
#include "src/utility/StringHelper.h"
#include "src/exceptions/ArgumentUnificationException.h"
#include "src/exceptions/IllegalArgumentException.h"
#include "src/exceptions/IllegalArgumentValueException.h"
#include "src/exceptions/IllegalFunctionCallException.h"
@ -50,11 +51,11 @@ namespace storm {
}
}
Argument(std::string const& argumentName, std::string const& argumentDescription, std::vector<userValidationFunction_t> const& validationFunctions, bool isOptional, T defaultValue): ArgumentBase(argumentName, argumentDescription, isOptional), argumentType(ArgumentTypeInferation::inferToEnumType<T>()), userValidationFunction(validationFunctions), hasDefaultValue(true), defaultValue(defaultValue) {
Argument(std::string const& argumentName, std::string const& argumentDescription, std::vector<userValidationFunction_t> const& validationFunctions, bool isOptional, T defaultValue): ArgumentBase(argumentName, argumentDescription, isOptional), argumentType(ArgumentTypeInferation::inferToEnumType<T>()), userValidationFunction(validationFunctions), defaultValue(defaultValue), hasDefaultValue(true) {
}
Argument(Argument const& other) : ArgumentBase(other.argumentName, other.argumentDescription, other.isOptional), argumentType(other.argumentType), hasDefaultValue(other.hasDefaultValue), defaultValue(other.defaultValue) {
Argument(Argument const& other) : ArgumentBase(other.argumentName, other.argumentDescription, other.isOptional), argumentType(other.argumentType), defaultValue(other.defaultValue), hasDefaultValue(other.hasDefaultValue) {
this->userValidationFunction.reserve(other.userValidationFunction.size());
for (auto i = 0; i < other.userValidationFunction.size(); ++i) {
this->userValidationFunction.push_back(userValidationFunction_t(other.userValidationFunction.at(i)));

2
src/storage/BitVector.h

@ -4,7 +4,7 @@
#include <exception>
#include <new>
#include <cmath>
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#include "src/exceptions/InvalidStateException.h"
#include "src/exceptions/InvalidArgumentException.h"

2
src/storage/SparseMatrix.h

@ -7,7 +7,7 @@
#include <iostream>
#include <iterator>
#include <set>
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#ifdef STORM_USE_TBB
# include <new> // This fixes a potential dependency ordering problem between GMM and TBB

2
src/utility/CuddUtility.h

@ -10,7 +10,7 @@
#include "cuddObj.hh"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
namespace storm {

2
test/functional/eigen/EigenSparseMatrixTest.cpp

@ -2,7 +2,7 @@
#include "Eigen/Sparse"
#include "src/exceptions/InvalidArgumentException.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
TEST(EigenSparseMatrixTest, BasicReadWriteTest) {
// 25 rows, 50 non zero entries

2
test/functional/storage/adapters/EigenAdapterTest.cpp

@ -3,7 +3,7 @@
#include "Eigen/Sparse"
#include "src/adapters/EigenAdapter.h"
#include "src/exceptions/InvalidArgumentException.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#define STORM_EIGENADAPTERTEST_SIMPLEDENSESQUARECOPY_SIZE 5
#define STORM_EIGENADAPTERTEST_SIMPLESPARSESQUARECOPY_SIZE 5

2
test/functional/storage/adapters/GmmAdapterTest.cpp

@ -3,7 +3,7 @@
#include "gmm/gmm_matrix.h"
#include "src/adapters/GmmxxAdapter.h"
#include "src/exceptions/InvalidArgumentException.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#define STORM_GMMADAPTERTEST_SIMPLEDENSESQUARECOPY_SIZE 5
#define STORM_GMMADAPTERTEST_SIMPLESPARSESQUARECOPY_SIZE 5

2
test/functional/storage/adapters/StormAdapterTest.cpp

@ -3,7 +3,7 @@
#include "gmm/gmm_matrix.h"
#include "src/adapters/StormAdapter.h"
#include "src/exceptions/InvalidArgumentException.h"
#include "boost/integer/integer_mask.hpp"
#include <cstdint>
#define STORM_STORMADAPTERTEST_SIMPLEDENSESQUARECOPY_SIZE 5
#define STORM_STORMADAPTERTEST_SIMPLESPARSESQUARECOPY_SIZE 5

Loading…
Cancel
Save