---
title: "hashLanes"
sidebar_label: "hashLanes"
description: "Kotlin binding reference: hashLanes."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[hashLanes](hashLanes.md)

# hashLanes

[common]\
fun [hashLanes](hashLanes.md)(input: [Tensor](../Tensor/index.md), key: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0, algo: [HashLaneAlgo](../HashLaneAlgo/index.md) = HashLaneAlgo.AUTO, maskBits: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0): [Tensor](../Tensor/index.md)

`hashLanes(input: Tensor, key: Long = 0L, algo: HashLaneAlgo = HashLaneAlgo.AUTO, maskBits: Long = 0L)`: the `hash_lanes` operator. Elementwise per-lane BIJECTIVE hash, shape-preserving: every lane of an integer `input` maps through a permutation of its width, so distinct lane values stay distinct (a lane-wise content id, a bucket index, a deterministic shuffle key). A 32-bit lane lands as UInt32, a 64-bit lane as UInt64; `algo` selects the permutation within the input's width (`HashLaneAlgo::Auto`: `Triple32` for 32-bit lanes, `Moremur` for 64-bit ones). `key` perturbs the permutation (0 is a fixed valid default, so the same key gives the same map on every platform and backend). `mask_bits` in `(0, width]` restricts the bijection to `[0, 2^mask_bits)`: a lane below that bound maps to a lane below it, so a table of that size is permuted onto itself; 0 (and the lane width) keeps the full width.