| 54 | const char *name); |
| 55 | |
| 56 | int |
| 57 | main(int argc, char *argv[]) |
| 58 | { |
| 59 | clMath::Config cfg; |
| 60 | cfg.setDefaultConfig("ktest.cfg"); |
| 61 | if (!cfg.parseCommandLine(argc, argv) || !cfg.isSane()) { |
| 62 | return 1; |
| 63 | } |
| 64 | |
| 65 | clblasSetup(); |
| 66 | parseEnvImplementation(); |
| 67 | |
| 68 | clMath::Step *masterStep = getMasterStep(cfg.blasFunctionID(), |
| 69 | cfg.platform(), cfg.device()); |
| 70 | if (masterStep == NULL) { |
| 71 | std::cerr << "Function support not implemented yet" << std::endl; |
| 72 | return 1; |
| 73 | } |
| 74 | |
| 75 | CLBlasKargs kargs; |
| 76 | SubproblemDim subdims[MAX_SUBDIMS]; |
| 77 | |
| 78 | cfg.kargs(&kargs); |
| 79 | masterStep->setKargs(kargs); |
| 80 | masterStep->fixLD(); |
| 81 | |
| 82 | ListHead seq; |
| 83 | listInitHead(&seq); |
| 84 | bool severalKernels = false; |
| 85 | |
| 86 | /* Single kernel for this function */ |
| 87 | if (cfg.decomposition(subdims)) { |
| 88 | masterStep->setDecomposition(subdims); |
| 89 | } |
| 90 | masterStep->completeDecompositionSingle(); |
| 91 | |
| 92 | if (cfg.permitMultiKernels()) { |
| 93 | masterStep->makeSolutionSequence(&seq, |
| 94 | getPlatform(cfg.platform().c_str())); |
| 95 | if (listLength(&seq) > 1) { |
| 96 | severalKernels = true; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | if (severalKernels) { |
| 101 | std::ofstream fs; |
| 102 | ListNode *node; |
| 103 | |
| 104 | std::vector<clMath::Step*> steps; |
| 105 | |
| 106 | masterStep->declareVars(NULL); |
| 107 | |
| 108 | for (node = listNodeFirst(&seq); node != &seq; node = node->next) { |
| 109 | steps.push_back(getStep(node)); |
| 110 | } |
| 111 | |
| 112 | std::string str; |
| 113 |
nothing calls this directly
no test coverage detected