Results 1 to 5 of 5

Thread: Events usage

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    4

    Events usage

    Hi,

    Is it any way to reuse Event objects after assosiated queue entry was executed?
    Is event.wait() function clean CL_COMPLETE event status?
    It looks like I need all the time allocate and deallocate Event objects if they are supposed to be used in iterrative procedure.

  2. #2
    Member
    Join Date
    Nov 2009
    Location
    Scotland
    Posts
    72

    Re: Events usage

    You can use events to get profiling information (see clGetEventProfilingInfo), e.g. you can use it to compute the execution time of a command after it has finished.

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    4

    Re: Events usage

    That's great.
    In my case I have to use events for synchronization. I have steam of messages carrying data that I have to accept, put in the image3D memory buffer (non-blocking) and than the buffer is full execute kernel. I can start kernel only after all memory operations are done and then start over. My question is it any way to use the event I created on first iteration on second one?

  4. #4
    Member
    Join Date
    Nov 2009
    Location
    Scotland
    Posts
    72

    Re: Events usage

    Sorry, I thought you were asking why en event is still "valid" after the associated command has been executed.

    Have you tried using clReleaseEvent() ? At the end of each iteration you could release the event and then use the same variable in the next iteration. I haven't tried it myself, but I don't see why it shouldn't work.

  5. #5
    Junior Member
    Join Date
    Jan 2011
    Posts
    29

    Re: Events usage

    No, cl_events are not reusable. cl_events are allocated by the runtime during the enqueue call and freed when their retain count goes to zero. Your thread should call clReleaseEvent when it is finished with the object, but the retain count might remain greater than zero.

Similar Threads

  1. Asynchronous Events
    By Amnon in forum Suggestions for next release
    Replies: 0
    Last Post: 11-25-2009, 12:07 AM
  2. PLAYBACK RELATED EVENTS
    By Jim in forum OpenMAX AL
    Replies: 0
    Last Post: 03-25-2008, 01:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •