feat(const_eval): impl. exp

This commit is contained in:
Erich Gubler 2024-01-05 10:56:24 -05:00 committed by Teodor Tanasoaia
parent 66fd1872ab
commit 01d02caca3
2 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,7 @@ Bottom level categories:
- `countLeadingZeros`
- `countOneBits`
- `countTrailingZeros`
- `exp`
- `floor`
- Eager release of GPU resources comes from device.trackers. By @bradwerth in [#5075](https://github.com/gfx-rs/wgpu/pull/5075)
- `wgpu-types`'s `trace` and `replay` features have been replaced by the `serde` feature. By @KirmesBude in [#5149](https://github.com/gfx-rs/wgpu/pull/5149)

View File

@ -904,6 +904,9 @@ impl<'a> ConstantEvaluator<'a> {
.expect("bit count overflowed 32 bits, somehow!?")])
})
}
crate::MathFunction::Exp => {
component_wise_float!(self, span, [arg], |e| { Ok([e.exp()]) })
}
crate::MathFunction::Floor => {
component_wise_float!(self, span, [arg], |e| { Ok([e.floor()]) })
}