mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul-phaser] Add --population-autosave option
This commit is contained in:
parent
1b5960111d
commit
3f7ada1689
@ -280,6 +280,11 @@ Phaser::CommandLineDescription Phaser::buildCommandLineDescription()
|
|||||||
po::value<vector<string>>()->value_name("<FILE>"),
|
po::value<vector<string>>()->value_name("<FILE>"),
|
||||||
"A text file with a list of chromosomes (one per line) to be included in the initial population."
|
"A text file with a list of chromosomes (one per line) to be included in the initial population."
|
||||||
)
|
)
|
||||||
|
(
|
||||||
|
"population-autosave",
|
||||||
|
po::value<string>()->value_name("<FILE>"),
|
||||||
|
"If specified, the population is saved in the specified file after each round. (default=autosave disabled)"
|
||||||
|
)
|
||||||
;
|
;
|
||||||
keywordDescription.add(populationDescription);
|
keywordDescription.add(populationDescription);
|
||||||
|
|
||||||
@ -337,7 +342,8 @@ void Phaser::initialiseRNG(po::variables_map const& _arguments)
|
|||||||
AlgorithmRunner::Options Phaser::buildAlgorithmRunnerOptions(po::variables_map const& _arguments)
|
AlgorithmRunner::Options Phaser::buildAlgorithmRunnerOptions(po::variables_map const& _arguments)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
_arguments.count("rounds") > 0 ? static_cast<optional<size_t>>(_arguments["rounds"].as<size_t>()) : nullopt
|
_arguments.count("rounds") > 0 ? static_cast<optional<size_t>>(_arguments["rounds"].as<size_t>()) : nullopt,
|
||||||
|
_arguments.count("population-autosave") > 0 ? static_cast<optional<string>>(_arguments["population-autosave"].as<string>()) : nullopt,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user