Skip to main content

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, g: Graph, s: Slice)

Convenience constructor from a Slice.

This wraps any indices in s into constant nodes (using mo.constant).

Args:

  • g (Graph): The Graph into which the constant nodes are created.
  • s (Slice): The Slice to turn into SymbolicSlice.