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

Method setFunction

src/library/tools/ktest/config.cpp:341–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341bool
342Config::setFunction(const std::string& name)
343{
344 if (name.empty()) {
345 return false;
346 }
347 switch (name.c_str()[0]) {
348 case 's':
349 case 'S':
350 kargs_.dtype = TYPE_FLOAT;
351 break;
352 case 'd':
353 case 'D':
354 kargs_.dtype = TYPE_DOUBLE;
355 break;
356 case 'c':
357 case 'C':
358 kargs_.dtype = TYPE_COMPLEX_FLOAT;
359 break;
360 case 'z':
361 case 'Z':
362 kargs_.dtype = TYPE_COMPLEX_DOUBLE;
363 break;
364 default:
365 return false;
366 }
367
368 for (NameMap::iterator it = names_.begin(); it != names_.end(); ++it) {
369 if (strcmp(name.substr(1).c_str(), (*it).second.c_str()) == 0) {
370 funcID_ = (*it).first;
371 setCl((*it).second + ".cl");
372 hasFuncID_ = true;
373 return true;
374 }
375 }
376 return false;
377}
378
379void
380Config::setOrder(clblasOrder order)

Callers

nothing calls this directly

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected