Jeff's picture

ComputeCommandQueue.Wait(...) documentation is wrong

Project:Cloo
Version:1.0-dev
Component:Documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:fixed
Description

The documentation (probably cut-n-paste from elsewhere) says "If events is not null a new event identifying this command is attached to the end of the list." Isn't that incorrect? Wait just waits for the specified events to complete.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nythrix's picture

#1

Status:open» by design

CommandQueue.Wait translates to clEnqueueWaitForEvents. As you see the documentation matches the Khronos pages so there's nothing fundamentally wrong with it. This is not a blocking function. It merely gives you a "wait" event on a given command queue.
However, I have to say that the purpose of this function isn't very clear to me. I haven't been able to think of a useful scenario for it.

I believe you're probably after one of these:

ComputeEventList.Wait()
ComputeCommandQueue.Finish()/Flush()

Edit: Ok, the only thing I could think of is synchronizing several command queues using these "waits" without you having to block your application or building a very long event list. It still remains a weak selling point, though.

Jeff's picture

#2

Title:ComputeCommandQueue.Wait(...) documentation is wrong» ComputeCommandQueue.Wait(...) doesn't append a new event to the list.
Component:Documentation» Code
Status:by design» open

Okay, in that case the docs are right but it doesn't work.

Because after calling it, I still have 1 event in my list.

You're right though, I was actually looking for .Finish().

nythrix's picture

#3

Component:Code» Documentation
Status:open» confirmed

Sorry, I've been messing around again. clEnqueueWaitForEvents()/CommandQueue.Wait() isn't supposed to create a new event/append it to the list. Never mind my previous post, you were actually right, the docs should be fixed.

Interestingly, the very same bug you mentioned was affecting the function next door. Funny that!

nythrix's picture

#4

Title:ComputeCommandQueue.Wait(...) doesn't append a new event to the list.» ComputeCommandQueue.Wait(...) documentation is wrong
Status:confirmed» fixed