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

Function splat

cranelift/interpreter/src/step.rs:1618–1624  ·  view source on GitHub ↗
(ty: Type, val: DataValue)

Source from the content-addressed store, hash-verified

1616}
1617
1618fn splat(ty: Type, val: DataValue) -> ValueResult<DataValue> {
1619 let mut new_vector = SimdVec::new();
1620 for _ in 0..ty.lane_count() {
1621 new_vector.push(val.clone());
1622 }
1623 vectorizelanes(&new_vector, ty)
1624}
1625
1626// Prepares the shift amount for a shift/rotate operation.
1627// The shift amount must be the same type and have the same number of lanes as the vector.

Callers 2

stepFunction · 0.85
shift_amtFunction · 0.85

Calls 5

vectorizelanesFunction · 0.85
newFunction · 0.50
lane_countMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected