How do I get a ComputeEvent Object?

Help
2011-07-20
2012-12-21
  • I want to measure Execution and Copy time of a Kernelexecution, but don't know how to pass an event… I didn't found any documentation about that issue using Cloo.
    Here's what I want to do:

    ComputeEvent ce = ***HOW the hell do I get an event***;
    CQ.Execute(kernel, null, new long[] { SIZE_X, SIZE_Y }, null, new List<ComputeEvent>(){ce});
    int foo = ce.CommandStartTime;
    

    Thanks for help

     

  • Anonymous
    2011-07-24

    hi ,
    I think event create automaticaly by CQ.Exec , to List<ComputeEvent>.
    You can get it from list after Exec and shild after call CQ.Finish.

    I'm new Cloo , any no true, please forgive me

    Cang
    dovancang@gmail.com

     
  • nythrix
    nythrix
    2011-07-24

    The command queue methods generate events. You can get them from an event list like this:

    ComputeEventList evList = new ComputeEventList();
    CQ.Execute(kernel, null, new long[] { SIZE_X, SIZE_Y }, null, evList);
    //evList now contains one event
    int foo = evList[0].CommandStartTime;