Skip to main content

Module vector

Module vector 

Source
Expand description

The f32 vector bodies: the scalar references, the SIMD dispatch, and the element-wise and reducing operations the vec_* nodes and their native lowerings share, so both produce the same bytes.

Functionsยง

add_f32
a + b element-wise, as a new vector.
add_f32_into
a + b element-wise into out, which is cleared first.
check_lens
Panics with both lengths named when two operands differ in length.
cosine_f32
The cosine similarity of vec_cosine.
dot_f32
The dot product, through the SIMD kernel where the host has one.
dot_scalar
The scalar dot product: the reference the SIMD kernel is checked against.
hash_vec_into
The vector of hash_vec into out, which is cleared first.
l2sq_f32
The squared L2 distance, through the SIMD kernel where the host has one.
l2sq_scalar
The scalar squared L2 distance: the reference the SIMD kernel is checked against.
lid_mle_of
The estimate of lid_mle.
norm_f32_into
a scaled to unit L2 magnitude into out; a itself when its magnitude is zero.
scale_f32
a * k element-wise, as a new vector.
scale_f32_into
a * k element-wise into out, which is cleared first.
xxhash3_vec_into
The vector of xxhash3_vec into out, which is cleared first.