MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / dumpFlags

Function dumpFlags

src/library/tools/ktest/step-dump.cpp:67–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66template <typename T>
67static void
68dumpFlags(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
95std::string
96Step::dtypeToString(DataType dtype)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected