MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / replace_lane_bytes

Method replace_lane_bytes

crates/tinywasm/src/interpreter/simd/utils.rs:16–27  ·  view source on GitHub ↗
(
        self,
        lane: u8,
        value: [u8; LANE_BYTES],
        lane_count: u8,
    )

Source from the content-addressed store, hash-verified

14 }
15
16 pub(super) fn replace_lane_bytes<const LANE_BYTES: usize>(
17 self,
18 lane: u8,
19 value: [u8; LANE_BYTES],
20 lane_count: u8,
21 ) -> Self {
22 debug_assert!(lane < lane_count);
23 let mut bytes = self.0;
24 let start = lane as usize * LANE_BYTES;
25 bytes[start..start + LANE_BYTES].copy_from_slice(&value);
26 Self(bytes)
27 }
28}
29
30pub(super) const fn canonicalize_simd_f32_nan(x: f32) -> f32 {

Callers

nothing calls this directly

Calls 1

copy_from_sliceMethod · 0.45

Tested by

no test coverage detected