For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
NoScoreHook
struct NoScoreHook
Leaves the scores alone.
Implemented traits
AnyType,
Copyable,
Deinitable,
DevicePassable,
ImplicitlyCopyable,
IndexerScoreHook,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
device_type
comptime device_type = NoScoreHook
Device-side type; the struct is trivially device-passable.
enabled
comptime enabled = False
Never runs.
Methods
__init__
def __init__() -> Self
Creates the hook.
window
def window(self, ctx: DeviceContext, first_row: Int, rows: Int) -> Self
Returns the hook unchanged.
Args:
- ctx (
DeviceContext): Device context. - first_row (
Int): Query token of the window's row 0. - rows (
Int): Rows in the window.
Returns:
Self: This hook.
window_rows
def window_rows(self) -> Int
Returns an unbounded row cap, as the hook keeps no scratch.
Returns:
Int: Int.MAX.
after_window
def after_window(self, ctx: DeviceContext, first_row: Int, rows: Int)
Does nothing.
Args:
score
def score[dtype: DType, lane_keys: Int](self, value: Scalar[dtype], row: Int32, key: Int32, key_live: Bool, row_live: Bool) -> Scalar[dtype]
Returns value.
Parameters:
Args:
- value (
Scalar[dtype]): The score. - row (
Int32): Window row of the query token. - key (
Int32): Key column. - key_live (
Bool): Whether the key is below the row's bound. - row_live (
Bool): Whether the row is in the window.
Returns:
Scalar[dtype]: value.
get_type_name
static def get_type_name() -> String
Returns the type name for runtime diagnostics.
Returns:
String: Always "NoScoreHook".