示例#1
0
        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");
        }
示例#2
0
 public extern static OpenCLErrorCode SetEventCallback(
     CLEventHandle @event,
     Int32 command_exec_callback_type,
     OpenCLEventCallback pfn_notify,
     IntPtr user_data);
示例#3
0
        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;
        }
示例#4
0
 public extern static OpenCLErrorCode SetUserEventStatus(
     CLEventHandle @event,
     Int32 execution_status);
示例#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);
示例#6
0
 public extern static OpenCLErrorCode EnqueueMarker(
     CLCommandQueueHandle command_queue,
     out CLEventHandle new_event);
示例#7
0
 public extern static OpenCLErrorCode EnqueueMarker(
     CLCommandQueueHandle command_queue,
     out CLEventHandle new_event);
示例#8
0
 public extern static OpenCLErrorCode ReleaseEvent(
     CLEventHandle @event);
示例#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);
示例#10
0
 public extern static OpenCLErrorCode ReleaseEvent(
     CLEventHandle @event);
示例#11
0
 public extern static OpenCLErrorCode SetEventCallback(
     CLEventHandle @event,
     Int32 command_exec_callback_type,
     OpenCLEventCallback pfn_notify,
     IntPtr user_data);
示例#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;
     }
 }