legate::Slice#
-
class Slice#
A slice descriptor.
Slicebehaves similarly to how the slice in Python does, and has different semantics fromstd::slice.Public Functions
- inline Slice(
- std::optional<std::int64_t> _start = OPEN,
- std::optional<std::int64_t> _stop = OPEN
Constructs a
SliceIf provided (and not
Slice::OPEN),_startmust compare less than or equal to_stop. Similarly, if provided (and notSlice::OPEN),_stopmust compare greater than or equal to_start. Put simply, unless one or both of the ends are unbounded,[_start, _stop]must form a valid (possibly empty) interval.- Parameters:
_start – The optional begin index of the slice, or
Slice::OPENif the start of the slice is unbounded._stop – The optional stop index of the slice, or
Slice::OPENif the end of the slice if unbounded.