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

Method declarePatternVars

src/library/tools/ktest/ktest.cpp:230–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void
231KTest::declarePatternVars(std::stringstream& ss, Step *step)
232{
233 VarList vars = step->vars();
234 ArrayVarList var_arays = step->arrays();
235
236 vars.insert(vars.end(), var_arays.begin(), var_arays.end());
237
238 ss << std::endl;
239 for (VarList::const_iterator it = vars.begin(); it != vars.end(); ++it) {
240 Variable *var = *it;
241 if (step != masterStep_ && var->isBuffer()) {
242 // master step buffers are used
243 continue;
244 }
245 ss << indent();
246 if (var->constant()) {
247 ss << "const ";
248 }
249 ss << var->type() << " " << var->name();
250 if (!var->defaultValue().empty()) {
251 ss << " = " << var->defaultValue();
252 }
253 ss << ";" << std::endl;
254 }
255}
256
257void
258KTest::generateMain(std::stringstream& ss, bool withAccuracy)

Callers

nothing calls this directly

Calls 5

indentFunction · 0.85
endMethod · 0.80
beginMethod · 0.80
isBufferMethod · 0.80
constantMethod · 0.80

Tested by

no test coverage detected