IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 function

page_and_offset

def page_and_offset(slot: Int, page_size: Int) -> Tuple[Int, Int]

Splits a slot into its page and its place in the page.

Args:

  • ​slot (Int): A slot in [0, 2^32).
  • ​page_size (Int): The slots in one page.

Returns:

Tuple[Int, Int]: The page and the slot's place in it.

Was this page helpful?