legate.core.Machine.__getitem__#
- Machine.__getitem__()#
Slices the machine with a given slicer
- Parameters:
key (TaskTarget, slice, int, tuple[TaskTarget, slice]) –
Key to slice the machine by
If the
keyis aTaskTarget, a machine with only the processors of the chosen kind is returned.If the
keyis aslice, the returned machine only has a processor range for the preferred target, which is sliced by thekey. An integerkeyis treated like a singleton slice (i.e.,slice(key, key + 1)).If the key is a pair of a task target and a slice, the returned machine only has a processor range of the chosen kind, which is sliced by the
key.- Returns:
A new machine after slicing
- Return type:
Machine