Commit 1c458b94 authored by Joseph Noir's avatar Joseph Noir

kernel is only compiled for the device in use

parent 996a1386
...@@ -86,7 +86,8 @@ program program::create(const char* kernel_source, uint32_t device_id) { ...@@ -86,7 +86,8 @@ program program::create(const char* kernel_source, uint32_t device_id) {
}; };
// build programm from program object // build programm from program object
err = clBuildProgram(pptr.get(), 0, nullptr, nullptr, nullptr, nullptr); auto dev_tmp = devices[device_id].m_device.get();
err = clBuildProgram(pptr.get(), 1, &dev_tmp, nullptr, nullptr, nullptr);
if (err != CL_SUCCESS) { if (err != CL_SUCCESS) {
// todo: chosoe device, not just front // todo: chosoe device, not just front
device_ptr device{devices[device_id].m_device}; device_ptr device{devices[device_id].m_device};
......
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