dheaton-arm opened PR #3316 from implement-uwiden
to main
:
Implemented
UwidenLow
andUwidenHigh
for the Cranelift interpreter,
doubling the width and halving the number of lanes preserving the low
and high halves respectively. Conversions are performed using unsigned
zero extension.Copyright (c) 2021, Arm Limited
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
dheaton-arm updated PR #3316 from implement-uwiden
to main
.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Could we write this with iterator methods (similar to @afonso360's comment in #3314)? Something like:
let new_vec = extractlanes(...).into_iter().take(new_type.lane_count).map(|lane| lane.convert(...)).collect::<Result<Vec<_>>()?
(note that there is a very convenient trait impl in libstd that lets one
collect
individualResult<T>
items intoResult<Vec<T>>
which takes care of the try operator in the loop!)
dheaton-arm updated PR #3316 from implement-uwiden
to main
.
dheaton-arm updated PR #3316 from implement-uwiden
to main
.
afonso360 submitted PR review.
cfallin submitted PR review.
cfallin merged PR #3316.
Last updated: Nov 22 2024 at 16:03 UTC