Skip to main content

MaxSimElement

Trait MaxSimElement 

Source
pub trait MaxSimElement:
    Sealed
    + Sized
    + Copy
    + Send
    + Sync
    + 'static {
    // Required method
    fn build<E: Erase<Self>>(
        isa: MaxSimIsa,
        query: MatRef<'_, Standard<Self>>,
        erase: E,
    ) -> Result<E::Output, NotSupported>;
}
Expand description

Scalar element types accepted by build_max_sim.

Sealed: external crates cannot add impls. Quantized representations (PQ, SQ, packed sub-byte) are intentionally excluded — they need codebook/scale state that MatRef<'_, Standard<Self>> can’t carry.

Required Methods§

Source

fn build<E: Erase<Self>>( isa: MaxSimIsa, query: MatRef<'_, Standard<Self>>, erase: E, ) -> Result<E::Output, NotSupported>

Build the concrete kernel for this element type and hand it to erase.erase(...).

§Errors

Returns NotSupported when the requested ISA cannot run on this build (e.g. AVX-512 unavailable; aarch64 on x86_64).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MaxSimElement for f16

Source§

fn build<E: Erase<f16>>( isa: MaxSimIsa, query: MatRef<'_, Standard<f16>>, erase: E, ) -> Result<E::Output, NotSupported>

Source§

impl MaxSimElement for f32

Source§

fn build<E: Erase<f32>>( isa: MaxSimIsa, query: MatRef<'_, Standard<f32>>, erase: E, ) -> Result<E::Output, NotSupported>

Implementors§