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

Method readBuffers

src/library/tools/ktest/ktest.cpp:668–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668void
669KTest::readBuffers(std::stringstream& ss)
670{
671 VarList list;
672 std::string size;
673
674 ss << std::endl;
675 list = masterStep_->buffers();
676 for (VarList::const_iterator it = list.begin(); it != list.end(); ++it) {
677 if (((*it)->flags() & CL_MEM_READ_WRITE) ||
678 ((*it)->flags() & CL_MEM_WRITE_ONLY)) {
679 getBufferSizeExpr(*it, size);
680 ss << indent() << "err = clEnqueueReadBuffer(queue, "
681 << (*it)->name() << ", CL_TRUE, 0," << std::endl
682 << indent() << " " << size << ", "
683 << ((Variable*)(*it)->hostPtr())->name() << "," << std::endl
684 << indent() << " 0, NULL, NULL);" << std::endl;
685 ss << indent() << "assert(err == CL_SUCCESS);" << std::endl;
686 }
687 }
688}
689
690void
691KTest::mainFinish(std::stringstream& ss)

Callers

nothing calls this directly

Calls 6

indentFunction · 0.85
buffersMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
flagsMethod · 0.80
hostPtrMethod · 0.80

Tested by

no test coverage detected