fixed an issue in eoParallel class
This commit is contained in:
parent
bd88da01f7
commit
2013d57fe8
2 changed files with 16 additions and 21 deletions
|
|
@ -38,41 +38,35 @@ std::string eoParallel::className() const
|
|||
return "eoParallel";
|
||||
}
|
||||
|
||||
void eoParallel::_createParameters( eoParser& parser )
|
||||
std::string eoParallel::prefix() const
|
||||
{
|
||||
std::string section("Parallelization");
|
||||
|
||||
parser.processParam( _isEnabled, section );
|
||||
parser.processParam( _isDynamic, section );
|
||||
|
||||
std::string default_value( _prefix.defValue() );
|
||||
std::string value( _prefix.value() );
|
||||
|
||||
if ( _isEnabled.value() )
|
||||
{
|
||||
if ( _isDynamic.value() )
|
||||
{
|
||||
default_value += "_dynamic.out";
|
||||
value += "_dynamic.out";
|
||||
}
|
||||
else
|
||||
{
|
||||
default_value += "_parallel.out";
|
||||
value += "_parallel.out";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
default_value += "_sequential.out";
|
||||
value += "_sequential.out";
|
||||
}
|
||||
|
||||
_prefix.defValue( default_value );
|
||||
|
||||
std::cout << "defvalue: " << _prefix.defValue() << std::endl;
|
||||
return value;
|
||||
}
|
||||
|
||||
void eoParallel::_createParameters( eoParser& parser )
|
||||
{
|
||||
std::string section("Parallelization");
|
||||
parser.processParam( _isEnabled, section );
|
||||
parser.processParam( _isDynamic, section );
|
||||
parser.processParam( _prefix, section );
|
||||
|
||||
std::cout << "value: " << parser.getParamWithLongName("parallelize-prefix")->getValue() << std::endl;
|
||||
|
||||
std::cout << "defvalue: " << _prefix.defValue() << std::endl;
|
||||
|
||||
}
|
||||
|
||||
void make_parallel(eoParser& parser)
|
||||
|
|
|
|||
|
|
@ -47,9 +47,10 @@ public:
|
|||
|
||||
virtual std::string className() const;
|
||||
|
||||
inline bool isEnabled() { return _isEnabled.value(); }
|
||||
inline bool isDynamic() { return _isDynamic.value(); }
|
||||
inline std::string prefix() { return _prefix.value(); }
|
||||
inline bool isEnabled() const { return _isEnabled.value(); }
|
||||
inline bool isDynamic() const { return _isDynamic.value(); }
|
||||
|
||||
std::string prefix() const;
|
||||
|
||||
friend void make_parallel(eoParser&);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue