MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / parse_validation_range

Function parse_validation_range

utils/CommonGraphOptions.cpp:38–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace
37{
38std::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
73namespace arm_compute

Callers 1

Calls 2

stoiFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected