| 65 | |
| 66 | template <typename T> |
| 67 | static void |
| 68 | dumpFlags(std::stringstream& ss, T flags, const struct FlagsDesc<T> *desc) |
| 69 | { |
| 70 | bool first = true; |
| 71 | |
| 72 | if (flags == static_cast<T>(0)) { |
| 73 | ss << "-"; |
| 74 | return; |
| 75 | } |
| 76 | |
| 77 | for (size_t i = 0; desc[i].desc != NULL; i++) { |
| 78 | if (flags & desc[i].flag) { |
| 79 | if (!first) { |
| 80 | ss << " "; |
| 81 | } |
| 82 | ss << desc[i].desc; |
| 83 | flags = static_cast<T>(flags & ~desc[i].flag); |
| 84 | first = false; |
| 85 | } |
| 86 | } |
| 87 | if (flags != static_cast<T>(0)) { |
| 88 | if (!first) { |
| 89 | ss << " "; |
| 90 | } |
| 91 | ss << flags; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | std::string |
| 96 | Step::dtypeToString(DataType dtype) |
nothing calls this directly
no outgoing calls
no test coverage detected