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";
|
return "eoParallel";
|
||||||
}
|
}
|
||||||
|
|
||||||
void eoParallel::_createParameters( eoParser& parser )
|
std::string eoParallel::prefix() const
|
||||||
{
|
{
|
||||||
std::string section("Parallelization");
|
std::string value( _prefix.value() );
|
||||||
|
|
||||||
parser.processParam( _isEnabled, section );
|
|
||||||
parser.processParam( _isDynamic, section );
|
|
||||||
|
|
||||||
std::string default_value( _prefix.defValue() );
|
|
||||||
|
|
||||||
if ( _isEnabled.value() )
|
if ( _isEnabled.value() )
|
||||||
{
|
{
|
||||||
if ( _isDynamic.value() )
|
if ( _isDynamic.value() )
|
||||||
{
|
{
|
||||||
default_value += "_dynamic.out";
|
value += "_dynamic.out";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
default_value += "_parallel.out";
|
value += "_parallel.out";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
default_value += "_sequential.out";
|
value += "_sequential.out";
|
||||||
}
|
}
|
||||||
|
|
||||||
_prefix.defValue( default_value );
|
return value;
|
||||||
|
}
|
||||||
std::cout << "defvalue: " << _prefix.defValue() << std::endl;
|
|
||||||
|
|
||||||
|
void eoParallel::_createParameters( eoParser& parser )
|
||||||
|
{
|
||||||
|
std::string section("Parallelization");
|
||||||
|
parser.processParam( _isEnabled, section );
|
||||||
|
parser.processParam( _isDynamic, section );
|
||||||
parser.processParam( _prefix, 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)
|
void make_parallel(eoParser& parser)
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,10 @@ public:
|
||||||
|
|
||||||
virtual std::string className() const;
|
virtual std::string className() const;
|
||||||
|
|
||||||
inline bool isEnabled() { return _isEnabled.value(); }
|
inline bool isEnabled() const { return _isEnabled.value(); }
|
||||||
inline bool isDynamic() { return _isDynamic.value(); }
|
inline bool isDynamic() const { return _isDynamic.value(); }
|
||||||
inline std::string prefix() { return _prefix.value(); }
|
|
||||||
|
std::string prefix() const;
|
||||||
|
|
||||||
friend void make_parallel(eoParser&);
|
friend void make_parallel(eoParser&);
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue