Commit 95533fec authored by Kazutomo Yoshii's avatar Kazutomo Yoshii
Browse files

duplicate binaries to match with the number of devs. incremented the minor ver to 2

parent 39e9dfec
......@@ -35,7 +35,7 @@ extern "C" void aocl_mmd_card_info(const char *name , int id,
class clwrap {
public:
const int version_major = 0;
const int version_minor = 1;
const int version_minor = 2;
// VALUE: pass by value, otherwise passed by reference
enum dir_enum { VALUE, HOST2DEV, DEV2HOST, DUPLEX };
......@@ -128,16 +128,23 @@ private:
return false;
cl::Program::Binaries bin;
bin.push_back({getkernelbuf(),getkernelbufsize()});
for (int i = 0; i < (int)devs.size(); i++) {
bin.push_back({getkernelbuf(),getkernelbufsize()});
}
std::vector<int> binaryStatus;
cl_int err = CL_SUCCESS;
cl::Program p(ctx,devs,bin, &binaryStatus, &err);
//std::cout << "devs size=" << devs.size() << std::endl;
//std::cout << "bin size=" << bin.size() << std::endl;
cl::Program p(ctx, devs, bin, &binaryStatus, &err);
// std::cout << "err=" << err << std::endl;
err = p.build(devs); // required even for binary
std::vector<cl::Device> devstmp;
if (err != CL_SUCCESS) {
std::cout << "fn=" << fn << std::endl;
std::cout << "Program failed to build: " << err << std::endl;
std::cout << p.getBuildInfo<CL_PROGRAM_BUILD_LOG>(devs[device_id]);
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment