internal ComputeUserEvent(ComputeContext context, CLEventHandle handle, ComputeCommandType type) { Handle = handle; SetID(Handle.Value); Type = type; Context = context; }
internal ComputeEvent(IntPtr handle, ComputeCommandQueue queue) { unsafe { Handle = handle; commandQueue = queue; commandType = (ComputeCommandType)GetInfo<ComputeEventInfo, uint>( ComputeEventInfo.CommandType, CL10.GetEventInfo); } }
/// <summary> /// Creates a new user created event. /// </summary> /// <param name="context"> The context in which the user created event is created. </param> /// <remarks> Requires OpenCL 1.1. </remarks> public ComputeUserEvent(IComputeContext context) { Handle = CL11.CreateUserEvent(context.Handle, out ComputeErrorCode error); ComputeException.ThrowOnError(error); SetID(Handle.Value); Type = (ComputeCommandType)GetInfo <CLEventHandle, ComputeEventInfo, uint>(Handle, ComputeEventInfo.CommandType, CL10.GetEventInfo); HookNotifier(); logger.Info("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information"); }
internal ComputeEvent(CLEventHandle handle, ComputeCommandQueue queue, ComputeCommandType type) { Handle = handle; SetID(Handle.Value); CommandQueue = queue; Type = type; Context = queue.Context; //if (ComputeTools.ParseVersionString(CommandQueue.Device.Platform.Version, 1) > new Version(1, 0)) // HookNotifier(); //Debug.WriteLine("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information"); }