| 26 | namespace nvcv::util { |
| 27 | |
| 28 | static std::string_view GetFunctionName(const std::string_view &stmt) |
| 29 | { |
| 30 | static std::regex rgx("^([A-Za-z0-9_]+)\\(.*$"); |
| 31 | |
| 32 | std::match_results<std::string_view::const_iterator> match; |
| 33 | if (regex_match(stmt.begin(), stmt.end(), match, rgx)) |
| 34 | { |
| 35 | // With C++20 we can construct the string_view with the range directly |
| 36 | return std::string_view(match[1].first, std::distance(match[1].first, match[1].second)); |
| 37 | } |
| 38 | else |
| 39 | { |
| 40 | return ""; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | namespace detail { |
| 45 | const char *GetCheckMessage(char *buf, int bufsize) |
no test coverage detected