Reputation: 341
I'm using a 2015 MacBook Pro and using the Iris Pro device and when I try to allocate 1024 int of memory using clCreateBuffer clCreateBuffer(context, flags, v.size() * sizeof(int), NULL, &error)
I get error CL_INVALID_CONTEXT (-34) but the context didn't return error and I even created a command queue with it.
Any idea?.
Upvotes: 1
Views: 558
Reputation: 341
I found the answer, I was releasing the context clReleaseContext
before clCreateBuffer
. That happened because I'm using clases and in the destructor I put the clReleaseContext
and I didn't realize the destructor was getting called.
Upvotes: 1