Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnAborted(object sender, ComputeCommandStatusArgs evArgs)
 {
     if (aborted != null)
     {
         aborted(sender, evArgs);
     }
 }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnCompleted(object sender, ComputeCommandStatusArgs evArgs)
 {
     if (completed != null)
     {
         completed(sender, evArgs);
     }
 }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnAborted(object sender, ComputeCommandStatusArgs evArgs)
 {
     Trace.WriteLine("Abort " + Type + " operation of " + this + ".", "Information");
     if (aborted != null)
     {
         aborted(sender, evArgs);
     }
 }
Esempio n. 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnCompleted(object sender, ComputeCommandStatusArgs evArgs)
 {
     //Console.WriteLine("Complete " + Type + " operation of " + this + ".", "Information");
     if (completed != null)
     {
         completed(sender, evArgs);
     }
 }
Esempio n. 5
0
        private void StatusNotify(CLEventHandle eventHandle, int cmdExecStatusOrErr, IntPtr userData)
        {
            status = new ComputeCommandStatusArgs(this, (ComputeCommandExecutionStatus)cmdExecStatusOrErr);
            switch (cmdExecStatusOrErr)
            {
            case (int)ComputeCommandExecutionStatus.Complete: OnCompleted(this, status); break;

            default: OnAborted(this, status); break;
            }
        }
Esempio n. 6
0
 private void Cleanup(object sender, ComputeCommandStatusArgs e)
 {
     lock (CommandQueue.Events)
     {
         if (CommandQueue.Events.Contains(this))
         {
             CommandQueue.Events.Remove(this);
             Dispose();
         }
         else
         {
             FreeGCHandle();
         }
     }
 }
Esempio n. 7
0
 private void StatusNotify(CLEventHandle eventHandle, int cmdExecStatusOrErr, IntPtr userData)
 {
     status = new ComputeCommandStatusArgs(this, (ComputeCommandExecutionStatus)cmdExecStatusOrErr);
     switch (cmdExecStatusOrErr)
     {
         case (int)ComputeCommandExecutionStatus.Complete: OnCompleted(this, status); break;
         default: OnAborted(this, status); break;
     }
 }
Esempio n. 8
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnAborted(object sender, ComputeCommandStatusArgs evArgs)
 {
     if (aborted != null)
         aborted(sender, evArgs);
 }
Esempio n. 9
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnCompleted(object sender, ComputeCommandStatusArgs evArgs)
 {
     if (completed != null)
         completed(sender, evArgs);
 }
Esempio n. 10
0
 private void Cleanup(object sender, ComputeCommandStatusArgs e)
 {
     lock (CommandQueue.Events)
     {
         if (CommandQueue.Events.Contains(this))
         {
             CommandQueue.Events.Remove(this);
             Dispose();
         }
         else
             FreeGCHandle();
     }
 }
Esempio n. 11
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnCompleted(object sender, ComputeCommandStatusArgs evArgs)
 {
     Trace.WriteLine("Completed " + Type + " operation of " + this + ".");
     if (Completed != null)
         Completed(sender, evArgs);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="evArgs"></param>
 protected virtual void OnAborted(object sender, ComputeCommandStatusArgs evArgs)
 {
     Trace.WriteLine("Abort " + Type + " operation of " + this + ".", "Information");
     if (aborted != null)
         aborted(sender, evArgs);
 }