| 33 | namespace framework |
| 34 | { |
| 35 | DatasetMode dataset_mode_from_name(const std::string &name) |
| 36 | { |
| 37 | static const std::map<std::string, DatasetMode> modes = { |
| 38 | {"all", DatasetMode::ALL}, |
| 39 | {"disabled", DatasetMode::DISABLED}, |
| 40 | {"precommit", DatasetMode::PRECOMMIT}, |
| 41 | {"nightly", DatasetMode::NIGHTLY}, |
| 42 | }; |
| 43 | |
| 44 | try |
| 45 | { |
| 46 | return modes.at(tolower(name)); |
| 47 | } |
| 48 | catch (const std::out_of_range &) |
| 49 | { |
| 50 | throw std::invalid_argument(name); |
| 51 | } |
| 52 | } |
| 53 | } // namespace framework |
| 54 | } // namespace test |
| 55 | } // namespace arm_compute |