Bug #1785: Introduce numext::rint.

This provides a new op that matches std::rint and previous behavior of
pround. Also adds corresponding unsupported/../Tensor op.
Performance is the same as e. g. floor (tested SSE/AVX).
This commit is contained in:
Ilya Tokar
2019-12-16 16:00:35 -05:00
parent d0ae052da4
commit 19876ced76
12 changed files with 117 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << rint(v) << endl;