| 635 | } |
| 636 | |
| 637 | void |
| 638 | KTest::setKernelArgs(std::stringstream& ss, Step *step) |
| 639 | { |
| 640 | std::map<unsigned int, const Variable*> kargMap = step->kargMap(); |
| 641 | ss << std::endl; |
| 642 | for (KArgMap::iterator it = kargMap.begin(); it != kargMap.end(); ++it) { |
| 643 | ss << indent() << "err = clSetKernelArg(kernel, " |
| 644 | << (*it).first << ", sizeof(" << (*it).second->type() << "), " |
| 645 | << "&" << (*it).second->name() << ");" << std::endl; |
| 646 | ss << indent() << "assert(err == CL_SUCCESS);" << std::endl; |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | void |
| 651 | KTest::execKernel(std::stringstream& ss) |