legate::Slice#
-
class Slice#
A slice descriptor.
Slice
behaves 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
Slice
If provided (and not
Slice::OPEN
),_start
must compare less than or equal to_stop
. Similarly, if provided (and notSlice::OPEN
),_stop
must 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::OPEN
if the start of the slice is unbounded._stop – The optional stop index of the slice, or
Slice::OPEN
if the end of the slice if unbounded.