Hi,
I am creating several context instances (one for each device) and put them in a vector.
For each context I also create a command_queue instance (initialised with the previously generated context instance and the according device) and put them in a vector.
Now, every time I call boost::compute::copy(v.begin(),v.end(),t.begin(),queue) then in command_queue::enqueue_copy_buffer the call to "BOOST_ASSERT(buffer.get_context() == this->get_context())" always triggers a break point.
While buffer.get_context() correctly points to my previously allocated context, this->get_context() always returns another pointer address.
Why is that (and how can this happen at all)? I only have a single GPU device, so my vector containers only contain a single context & queue instance (and as I only have that single gpu device, this is my default device).
Can you clarify or does somebody know why this happens?
Btw. doing this with a context and queue retrieved via ::default_xxx() etc. works fine. No crash with copy() or copy_async() (I tried both)
I must be missing something or not seeing it correctly.
Thanks in advacne
Cheers
Sam
for(auto& gpu : gpus)
{
m_cl_contexts.push_back(clgpu::context(gpu));
m_cl_queues.push_back(clgpu::command_queue(m_cl_contexts.back(),gpu));
}
P.S.: it's my second day with boost compute and I am loving it already btw.