| 51 | MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_DEBUG_SAVE_TEMP_DIR) |
| 52 | |
| 53 | static std::string random_string(std::string::size_type length) |
| 54 | { |
| 55 | static const std::string& chars = "0123456789" |
| 56 | "abcdefghijklmnopqrstuvwxyz" |
| 57 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
| 58 | |
| 59 | std::mt19937 rg{std::random_device{}()}; |
| 60 | std::uniform_int_distribution<std::string::size_type> pick(0, chars.length() - 1); |
| 61 | |
| 62 | std::string str(length, 0); |
| 63 | std::generate(str.begin(), str.end(), [&] { return chars[pick(rg)]; }); |
| 64 | |
| 65 | return str; |
| 66 | } |
| 67 | |
| 68 | static std::string unique_string(const std::string& prefix) |
| 69 | { |
no test coverage detected