Add truncation op

Reference issue

What does this implement/fix?

While we do have the other std:: nearest integer functions:

  • floor (to negative infinity),
  • ceil (to positive infinity),
  • round (to nearest with ties away from zero), and
  • rint (whatever the current rounding mode is)

We were inexplicably missing trunc (to zero). I needed this for something I was working on.

In addition to adding the various packet ops, I cleaned and consolidated the generic implementations used by SSE2 and NEON, including adding a generic implementation for pround.

Additional information

Edited by Charles Schlosser

Merge request reports

Loading