internal OpenCLEvent(CLEventHandle handle, OpenCLCommandQueue queue)
        {
            Handle = handle;
            SetID(Handle.Value);

            CommandQueue = queue;
            Type = (OpenCLCommandType)GetInfo<CLEventHandle, OpenCLEventInfo, int>(Handle, OpenCLEventInfo.CommandType, CL10.GetEventInfo);
            Context = queue.Context;

            if (OpenCLTools.ParseVersionString(CommandQueue.Device.Platform.Version, 1) > new Version(1, 0))
                HookNotifier();

            //Trace.WriteLine("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information");
        }
Exemple #2
0
 public extern static OpenCLErrorCode SetEventCallback(
     CLEventHandle @event,
     Int32 command_exec_callback_type,
     OpenCLEventCallback pfn_notify,
     IntPtr user_data);
        internal static CLEventHandle[] ExtractHandles(IReadOnlyList<OpenCLEventBase> computeObjects, out int handleCount)
        {
            if (computeObjects == null || computeObjects.Count == 0)
            {
                handleCount = 0;
                return null;
            }

            CLEventHandle[] result = new CLEventHandle[computeObjects.Count];
            for (int i = 0; i < computeObjects.Count; i++)
            {
                result[i] = computeObjects[i].Handle;
            }
            handleCount = computeObjects.Count;
            return result;
        }
Exemple #4
0
 public extern static OpenCLErrorCode SetUserEventStatus(
     CLEventHandle @event,
     Int32 execution_status);
Exemple #5
0
 public extern static OpenCLErrorCode GetEventProfilingInfo(
     CLEventHandle @event,
     OpenCLCommandProfilingInfo param_name,
     IntPtr param_value_size,
     IntPtr param_value,
     out IntPtr param_value_size_ret);
Exemple #6
0
 public extern static OpenCLErrorCode EnqueueMarker(
     CLCommandQueueHandle command_queue,
     out CLEventHandle new_event);
Exemple #7
0
 public extern static OpenCLErrorCode EnqueueMarker(
     CLCommandQueueHandle command_queue,
     out CLEventHandle new_event);
Exemple #8
0
 public extern static OpenCLErrorCode ReleaseEvent(
     CLEventHandle @event);
Exemple #9
0
 public extern static OpenCLErrorCode GetEventProfilingInfo(
     CLEventHandle @event,
     OpenCLCommandProfilingInfo param_name,
     IntPtr param_value_size,
     IntPtr param_value,
     out IntPtr param_value_size_ret);
Exemple #10
0
 public extern static OpenCLErrorCode ReleaseEvent(
     CLEventHandle @event);
Exemple #11
0
 public extern static OpenCLErrorCode SetEventCallback(
     CLEventHandle @event,
     Int32 command_exec_callback_type,
     OpenCLEventCallback pfn_notify,
     IntPtr user_data);
Exemple #12
0
 public extern static OpenCLErrorCode SetUserEventStatus(
     CLEventHandle @event,
     Int32 execution_status);
 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;
     }
 }