/// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnAborted(object sender, OpenCLCommandStatusArgs evArgs)
 {
     //Trace.WriteLine("Abort " + Type + " operation of " + this + ".", "Information");
     if (aborted != null)
     {
         aborted(sender, evArgs);
     }
 }
        private void StatusNotify(CLEventHandle eventHandle, int cmdExecStatusOrErr, IntPtr userData)
        {
            status = new OpenCLCommandStatusArgs(this, (OpenCLCommandExecutionStatus)cmdExecStatusOrErr);
            switch (cmdExecStatusOrErr)
            {
            case (int)OpenCLCommandExecutionStatus.Complete: OnCompleted(this, status); break;

            default: OnAborted(this, status); break;
            }
        }
Exemple #3
0
 private void Cleanup(object sender, OpenCLCommandStatusArgs e)
 {
     lock (CommandQueue.Events)
     {
         if (CommandQueue.Events.Contains(this))
         {
             CommandQueue.Events.Remove(this);
             Dispose();
         }
         else
         {
             FreeGCHandle();
         }
     }
 }
 private void Cleanup(object sender, OpenCLCommandStatusArgs e)
 {
     lock (CommandQueue.Events)
     {
         if (CommandQueue.Events.Contains(this))
         {
             CommandQueue.Events.Remove(this);
             Dispose();
         }
         else
             FreeGCHandle();
     }
 }
 private void StatusNotify(CLEventHandle eventHandle, int cmdExecStatusOrErr, IntPtr userData)
 {
     status = new OpenCLCommandStatusArgs(this, (OpenCLCommandExecutionStatus)cmdExecStatusOrErr);
     switch (cmdExecStatusOrErr)
     {
         case (int)OpenCLCommandExecutionStatus.Complete: OnCompleted(this, status); break;
         default: OnAborted(this, status); break;
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnAborted(object sender, OpenCLCommandStatusArgs evArgs)
 {
     //Trace.WriteLine("Abort " + Type + " operation of " + this + ".", "Information");
     if (aborted != null)
         aborted(sender, evArgs);
 }