Added args and buffer handling, but now clEnqueueNDRangeKernel is failing

with the error invalid command queue. Haven't seen that one before, and
cursory google suggests it's a problem with MBP's. Fun! I'll keep taking
a look, and I'll try it on my windows machine here soon
This commit is contained in:
2016-08-29 18:51:46 -07:00
parent 0c70c24a52
commit c3902c2f6e
4 changed files with 40 additions and 14 deletions

View File

@@ -41,6 +41,18 @@ int main(){
c.create_shared_context();
c.compile_kernel("../kernels/kernel.txt", true, "hello");
c.compile_kernel("../kernels/minimal_kernel.c", true, "min_kern");
std::string in = "hello!!!!!!!!!!!!!!!!!!!!!";
cl_mem buff = clCreateBuffer(
c.getContext(), CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
sizeof(char) * in.size(), &in, NULL);
c.store_buffer(buff, "buffer_1");
//c.set_kernel_arg("min_kern", 0, "buffer_1");
c.run_kernel("min_kern");
};