Browse Source
added sylvan settings. made sylvan available from the cli
added sylvan settings. made sylvan available from the cli
Former-commit-id: 3d2403de90
tempestpy_adaptions
dehnert
9 years ago
11 changed files with 169 additions and 17 deletions
-
25src/cli/entrypoints.h
-
6src/settings/SettingsManager.cpp
-
8src/settings/SettingsManager.h
-
2src/settings/modules/CuddSettings.cpp
-
16src/settings/modules/GeneralSettings.cpp
-
12src/settings/modules/GeneralSettings.h
-
33src/settings/modules/SylvanSettings.cpp
-
50src/settings/modules/SylvanSettings.h
-
24src/storage/dd/sylvan/InternalSylvanDdManager.cpp
-
2src/utility/storm.cpp
-
8src/utility/storm.h
@ -0,0 +1,33 @@ |
|||
#include "src/settings/modules/SylvanSettings.h"
|
|||
|
|||
#include "src/settings/SettingsManager.h"
|
|||
|
|||
#include "src/settings/Option.h"
|
|||
#include "src/settings/OptionBuilder.h"
|
|||
#include "src/settings/ArgumentBuilder.h"
|
|||
#include "src/settings/Argument.h"
|
|||
|
|||
namespace storm { |
|||
namespace settings { |
|||
namespace modules { |
|||
|
|||
const std::string SylvanSettings::moduleName = "sylvan"; |
|||
const std::string SylvanSettings::maximalMemoryOptionName = "maxmem"; |
|||
const std::string SylvanSettings::threadCountOptionName = "threads"; |
|||
|
|||
SylvanSettings::SylvanSettings(storm::settings::SettingsManager& settingsManager) : ModuleSettings(settingsManager, moduleName) { |
|||
this->addOption(storm::settings::OptionBuilder(moduleName, maximalMemoryOptionName, true, "Sets the upper bound of memory available to Sylvan in MB.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("value", "The memory available to Sylvan.").setDefaultValueUnsignedInteger(4096).build()).build()); |
|||
this->addOption(storm::settings::OptionBuilder(moduleName, threadCountOptionName, true, "Sets the number of threads used by Sylvan.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("value", "The number of threads available to Sylvan (0 means 'auto-detect').").setDefaultValueUnsignedInteger(0).build()).build()); |
|||
} |
|||
|
|||
uint_fast64_t SylvanSettings::getMaximalMemory() const { |
|||
return this->getOption(maximalMemoryOptionName).getArgumentByName("value").getValueAsUnsignedInteger(); |
|||
} |
|||
|
|||
uint_fast64_t SylvanSettings::getNumberOfThreads() const { |
|||
return this->getOption(threadCountOptionName).getArgumentByName("value").getValueAsUnsignedInteger(); |
|||
} |
|||
|
|||
} // namespace modules
|
|||
} // namespace settings
|
|||
} // namespace storm
|
@ -0,0 +1,50 @@ |
|||
#ifndef STORM_SETTINGS_MODULES_SYLVANSETTINGS_H_ |
|||
#define STORM_SETTINGS_MODULES_SYLVANSETTINGS_H_ |
|||
|
|||
#include "src/settings/modules/ModuleSettings.h" |
|||
|
|||
namespace storm { |
|||
namespace settings { |
|||
namespace modules { |
|||
|
|||
/*! |
|||
* This class represents the settings for Sylvan. |
|||
*/ |
|||
class SylvanSettings : public ModuleSettings { |
|||
public: |
|||
/*! |
|||
* Creates a new set of CUDD settings that is managed by the given manager. |
|||
* |
|||
* @param settingsManager The responsible manager. |
|||
*/ |
|||
SylvanSettings(storm::settings::SettingsManager& settingsManager); |
|||
|
|||
/*! |
|||
* Retrieves the maximal amount of memory (in megabytes) that Sylvan can occupy. |
|||
* |
|||
* @return The maximal amount of memory to use. |
|||
*/ |
|||
uint_fast64_t getMaximalMemory() const; |
|||
|
|||
/*! |
|||
* Retrieves the amount of threads available to Sylvan. Note that a value of zero means that the number |
|||
* of threads is auto-detected to fit the current machine. |
|||
* |
|||
* @rreturn The number of threads. |
|||
*/ |
|||
uint_fast64_t getNumberOfThreads() const; |
|||
|
|||
// The name of the module. |
|||
static const std::string moduleName; |
|||
|
|||
private: |
|||
// Define the string names of the options as constants. |
|||
static const std::string maximalMemoryOptionName; |
|||
static const std::string threadCountOptionName; |
|||
}; |
|||
|
|||
} // namespace modules |
|||
} // namespace settings |
|||
} // namespace storm |
|||
|
|||
#endif /* STORM_SETTINGS_MODULES_SYLVANSETTINGS_H_ */ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue