Mojo struct
SymbolicSlice
Slice
-like struct with Symbol
fields.
This struct enables the range slice (start:stop:end
) operator with
Symbol
indices.
Fields
- start (
Optional[Symbol]
): The slice's start index. - stop (
Optional[Symbol]
): The slice's start index, exclusive. - step (
Optional[Symbol]
): The slice's step.
Implemented traits
AnyType
,
CollectionElement
,
Copyable
,
Movable
Methods
__init__
__init__(inout self: Self, start: Optional[Symbol], stop: Optional[Symbol])
Convenience constructor from start
and step
that doesn't require step
.
__init__(inout self: Self, g: Graph, s: Slice)
Convenience constructor from a Slice
.
This wraps any indices in s
into constant nodes (using mo.constant
).
Args:
- g (
Graph
): TheGraph
into which the constant nodes are created. - s (
Slice
): TheSlice
to turn intoSymbolicSlice
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?