MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / simd_sum

Function simd_sum

cranelift/interpreter/src/value.rs:897–908  ·  view source on GitHub ↗
(dv: DataValue, ty: types::Type)

Source from the content-addressed store, hash-verified

895 }
896
897 fn simd_sum(dv: DataValue, ty: types::Type) -> i128 {
898 let itr = dv.iter_lanes(ty).unwrap();
899
900 itr.map(|e| {
901 if let Some(v) = e.into_int_signed().ok() {
902 v
903 } else {
904 0
905 }
906 })
907 .sum()
908 }
909}

Callers

nothing calls this directly

Calls 6

iter_lanesMethod · 0.80
sumMethod · 0.80
into_int_signedMethod · 0.80
unwrapMethod · 0.45
mapMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected