public void ScheduleLongTask(TaskSet task, uint setSize, uint minRange, IntPtr arguments) { if (setSize == 0 || minRange == 0) { throw new ArgumentOutOfRangeException(); } Native.enkiAddTaskSetToPipeMinRange(nativeScheduler, task, arguments, setSize, minRange); }
public TaskSet CreateTask(TaskExecuteRange taskFunction) { TaskSet task = Native.enkiCreateTaskSet(nativeScheduler, taskFunction); if (!task.IsCreated) { throw new InvalidOperationException("TaskSet creation failed"); } return(task); }
internal static extern void enkiWaitForTaskSet(IntPtr scheduler, TaskSet task);
internal static extern int enkiIsTaskSetComplete(IntPtr scheduler, TaskSet task);
internal static extern void enkiAddTaskSetToPipeMinRange(IntPtr scheduler, TaskSet task, IntPtr arguments, uint setSize, uint minRange);
public void WaitForTask(TaskSet task) { Native.enkiWaitForTaskSet(nativeScheduler, task); }
public bool CheckTaskCompletion(TaskSet task) { return(Native.enkiIsTaskSetComplete(nativeScheduler, task) == 1); }
public void ScheduleLongTask(TaskSet task, uint setSize = 1, uint minRange = 1) { ScheduleLongTask(task, setSize, minRange, IntPtr.Zero); }
public void ScheduleTask(TaskSet task, uint setSize = 1) { ScheduleTask(task, setSize, IntPtr.Zero); }
public void DeleteTask(ref TaskSet task) { Native.enkiDeleteTaskSet(task.pointer); task.pointer = IntPtr.Zero; }