Commit 799f40dc authored by Berrill, Mark's avatar Berrill, Mark
Browse files

Fixing minor bug

parent 968c7f21
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -311,6 +311,12 @@ static inline std::vector<std::string> allMethods()
#endif
    return methods;
}
static inline void erase( std::vector<std::string> &x, const std::string& v )
{
    auto it = std::find(x.begin(),x.end(),v);
    if ( it != x.end() )
        x.erase(it);
}
Options::Options() : iterations( 1 ), scale( 1.0 ) {}
Options::Options( int argc, char *argv[] ) : iterations( 1 ), scale( 1.0 )
{
@@ -369,8 +375,8 @@ Options::Options( int argc, char *argv[] ) : iterations( 1 ), scale( 1.0 )
        methods = allMethods();
    if ( methods[0] == "parallel" ) {
        methods = allMethods();
        methods.erase(std::find(methods.begin(),methods.end(),"cpu"));
        methods.erase(std::find(methods.begin(),methods.end(),"Kokkos-Serial"));
        erase(methods,"cpu");
        erase(methods,"Kokkos-Serial");
    }
    // Process the exclude list
    for ( auto &tmp : exclude )