Ask Your Question
0

OpenCV 3.1 custom OpenCL Queue

asked 2016-12-16 14:19:12 -0600

MikeSZ gravatar image

With OpenCV 3.1, when I use cv :: ocl :: attachContext for interoperation, a new queue is created. If I run an OpenCV function, it runs in its own queue, different from the main queue.

Main question: How can I set OpenCV to use the same queue I already have created and in use?

Or, how do I check that the OpenCV queue has finished running, while I pause the main queue, until OpenCV finishes?

Or wait for the main queue to run, before running the OpenCV functions, and move on to the subject of the previous question?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-12-16 19:06:54 -0600

Tetragramm gravatar image

I think finish is the function you need. I don't know how to attach to an existing queue, but this will let you ensure the OpenCV queue has finished running before moving on.

edit flag offensive delete link more

Comments

that's right. using "finish" the host thread waits until the OpenCL queue completes. anyway, I'm thinking on expose the command_queue class field in OpenCV, or add a property, and recompile, so I can delete what it create an attach my own queue, and control/avoid delete the queue when the class is destroyed.

MikeSZ gravatar imageMikeSZ ( 2016-12-23 07:11:55 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-16 14:19:12 -0600

Seen: 281 times

Last updated: Dec 16 '16