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:
12
src/main.cpp
12
src/main.cpp
@@ -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");
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user