legate.core.context.Context.create_task#
- Context.create_task(task_id: int, mapper_id: int = 0, manual: bool = False, launch_domain: Optional[Rect] = None) Union[AutoTask, ManualTask] #
Creates a task. The type of the returned task is determined by the value of
manual
.- Parameters:
task_id (int) – Task id. Scoped locally within the context; i.e., different libraries can use the same task id. There must be a task implementation corresponding to the task id.
mapper_id (int, optional) – Id of the mapper that should determine mapping policies for the task. Used only when the library has more than one mapper.
manual (bool) – Indicates whether the task should be manually parallelized; if
True
, the task is parallelized manually by the caller.launch_domain (Rect, optional) – Launch domain of the task. Ignored if the task is automatically parallelized, mandatory otherwise.
- Returns:
A new task
- Return type:
AutoTask or ManualTask