routed_prefill_slot_of

Function routed_prefill_slot_of 

Source
pub fn routed_prefill_slot_of(
    adapter_slot: i32,
    active: usize,
    num_slots: usize,
) -> Option<usize>
Expand description

#30 (routed-prefill precision): the pure predicate behind LoraWeights::routed_prefill_slot, split out for unit testing. Resolves a request’s adapter_slot (>= 0 → that slot, -1 → active) and returns Some(resolved) ONLY when it routes to a NON-active, in-range slot. Returns None for an active/base request (byte-identical installed-pair path) and for out-of-range slots. Kept in exact lockstep with upload_seq_slot_uniform (resolved == activeDevicePtr(0)).