| 36 | namespace |
| 37 | { |
| 38 | std::pair<unsigned int, unsigned int> parse_validation_range(const std::string &validation_range) |
| 39 | { |
| 40 | std::pair<unsigned int /* start */, unsigned int /* end */> range = {0, std::numeric_limits<unsigned int>::max()}; |
| 41 | if (!validation_range.empty()) |
| 42 | { |
| 43 | std::string str; |
| 44 | std::stringstream stream(validation_range); |
| 45 | |
| 46 | // Get first value |
| 47 | std::getline(stream, str, ','); |
| 48 | if (stream.fail()) |
| 49 | { |
| 50 | return range; |
| 51 | } |
| 52 | else |
| 53 | { |
| 54 | range.first = arm_compute::support::cpp11::stoi(str); |
| 55 | } |
| 56 | |
| 57 | // Get second value |
| 58 | std::getline(stream, str); |
| 59 | if (stream.fail()) |
| 60 | { |
| 61 | range.second = range.first; |
| 62 | return range; |
| 63 | } |
| 64 | else |
| 65 | { |
| 66 | range.second = arm_compute::support::cpp11::stoi(str); |
| 67 | } |
| 68 | } |
| 69 | return range; |
| 70 | } |
| 71 | } // namespace |
| 72 | |
| 73 | namespace arm_compute |
no test coverage detected