Browse Source
Added ConversionHelper.h to single out the needed no-strict-aliasing target
Added ConversionHelper.h to single out the needed no-strict-aliasing target
Replaced a few "auto" variables as GCC4.7 fails to infer the correct type
Former-commit-id: 09a0c8dac9
tempestpy_adaptions
PBerger
11 years ago
8 changed files with 69 additions and 13 deletions
-
11CMakeLists.txt
-
8src/adapters/GmmxxAdapter.h
-
2src/settings/Argument.h
-
10src/settings/ArgumentBuilder.h
-
2src/settings/Option.h
-
6src/settings/Settings.cpp
-
5src/utility/ConversionHelper.cpp
-
38src/utility/ConversionHelper.h
@ -0,0 +1,5 @@ |
|||
#include "ConversionHelper.h"
|
|||
|
|||
std::vector<unsigned long long, std::allocator<unsigned long long>>* storm::utility::ConversionHelper::toUnsignedLongLong(std::vector<uint_fast64_t, std::allocator<uint_fast64_t>>* vectorPtr) { |
|||
return reinterpret_cast<std::vector<unsigned long long, std::allocator<unsigned long long>> *>(vectorPtr); |
|||
} |
@ -0,0 +1,38 @@ |
|||
/* |
|||
* ConversionHelper.h |
|||
* |
|||
* Created on: 14.09.2013 |
|||
* Author: Philipp Berger |
|||
* |
|||
* WARNING: This file REQUIRES -no-strict-aliasing! |
|||
*/ |
|||
|
|||
#ifndef STORM_UTILITY_CONVERSIONHELPER_H_ |
|||
#define STORM_UTILITY_CONVERSIONHELPER_H_ |
|||
|
|||
#include <iostream> |
|||
#include <vector> |
|||
#include <cstdint> |
|||
|
|||
static_assert(sizeof(unsigned long long) == sizeof(uint_fast64_t), "This program uses the GMM Backend and therefor requires unsigned long long and uint_fast64_t to be of the same size!"); |
|||
|
|||
|
|||
namespace storm { |
|||
namespace utility { |
|||
|
|||
class ConversionHelper { |
|||
public: |
|||
/*! |
|||
* Converts a pointer to a std::vector<uint_fast64_t> to std::vector<unsigned long long> |
|||
*/ |
|||
static std::vector<unsigned long long, std::allocator<unsigned long long>>* toUnsignedLongLong(std::vector<uint_fast64_t, std::allocator<uint_fast64_t>>* vectorPtr); |
|||
|
|||
private: |
|||
ConversionHelper() {} |
|||
ConversionHelper(ConversionHelper& other) {} |
|||
~ConversionHelper() {} |
|||
}; |
|||
} |
|||
} |
|||
|
|||
#endif // STORM_UTILITY_CONVERSIONHELPER_H_ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue