Add XMVectorRound half away from zero alternative
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics, performance
Research direction
Start by reading XMVectorRound and the SSE4 _mm_round_ps and ARMv8 NEON vrndnq_f32 paths mentioned in the issue. Determine the alternative API and verify that halfway values round away from zero consistently across supported SIMD implementations; done means the new behavior is available without changing XMVectorRound's existing semantics.
Written by the indexing model from the issue text.
Description
The current XMVectorRound uses round-to-nearest (even) a.k.a. banker's rounding. This matches the implementation of the _mm_round_ps (SSE4) and vrndnq_f32 (ARMv8 NEON) intrinsics rounding behavior, so it can be implemented in a single instruction.
Many users, however, expect it to match roundf which C99 defines as handling half-way values by rounding away from zero a.k.a. commercial rounding. It might therefore be useful to provide an alternative version of XMVectorRound that supports half away-from-zero rounding instead of round-to-nearest (even).
See Wikipedia
- Dominant language
- C++
- Stars
- 1.8k
- Forks
- 262
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectXMath
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
microsoft/DirectXMath#346 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/DirectXMath#342 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/DirectXMath#328 ·
-
simplemath
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/DirectXMath#327 · 1 comment ·
-
Project feedback Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoft/DirectXMath#326 · 2 comments ·
All issues in microsoft/DirectXMath
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·