Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote and round operations #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mazimkhan
Copy link
Member

@mazimkhan mazimkhan commented Nov 18, 2024

Adding additional rounding variants of promotion and demotion operations for arm_sve-inl.h and generic_ops-inl.h:

  • DemoteCeilTo rounds each element up before converting the rounded value to half-width a signed or unsigned integer.
  • DemoteFloorTo rounds each element down before converting the rounded value to half-width a signed or unsigned integer.
  • PromoteCeilTo rounds each element up before converting the rounded value to a signed or unsigned integer.
  • PromoteFloorTo rounds each element down before converting the rounded value to a signed or unsigned integer.
  • PromoteToNearestInt rounds each element towards the nearest integer, with ties to even, and converts the rounded value to a signed or unsigned integer.
  • MaskedDemoteToOrZero demotes each element where the mask is set and returns zero for each inactive lane.
  • MaskedPromoteToOrZero promotes each element where the mask is set and returns zero for each inactive lane.

Tests have been added for the operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant