Skip to main content

Mojo struct

ScatterNegativeIndexStrategy

struct ScatterNegativeIndexStrategy

Implemented traits

AnyType, Copyable, Equatable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, Writable

comptime members

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

NORMALIZE

comptime NORMALIZE = ScatterNegativeIndexStrategy(0)

Indices must be within the range [-dim_size, dim_size). Negative indices are normalized to the positive range via incrementing by dim_size: Eg: idx + dim_size if idx < 0 else idx. This mode supports negative relative indexing: Eg: x[-1] == x[dim_size - 1].

SKIP

comptime SKIP = ScatterNegativeIndexStrategy(1)

Indices must be within the range [-inf, dim_size). Negative indices are are skipped and the update is not applied.

Was this page helpful?