Exemple #1
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;
            }
        }
        internal ComputeEvent(CLEventHandle handle, ComputeCommandQueue queue)
        {
            Handle = handle;
            SetID(Handle.Value);

            CommandQueue = queue;
            Type         = (ComputeCommandType)GetInfo <CLEventHandle, ComputeEventInfo, int>(Handle,
                                                                                              ComputeEventInfo.CommandType, CL10.GetEventInfo);

            if (ComputeTools.ParseVersionString(CommandQueue.Device.Platform.Version, 1) > new Version(1, 0))
            {
                HookNotifier();
            }
            logger.Info("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information");
        }