Skip to main content
Log in

Mojo struct

TopK_2

@register_passable(trivial) struct TopK_2[T: DType, largest: Bool = True]

Fields

  • p (Int):
  • u (SIMD[T, 1]):

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, Movable, UnknownDestructibility

Methods

__init__

__init__() -> Self

insert

insert(mut self, elem: SIMD[T, 1], elem_id: Int)