commit | 19876ced76bd1730008e02fc4c43c2228faed38a | [log] [tgz] |
---|---|---|
author | Ilya Tokar <tokarip@google.com> | Mon Dec 16 16:00:35 2019 -0500 |
committer | Ilya Tokar <tokarip@google.com> | Tue Jan 07 21:22:44 2020 +0000 |
tree | 22f999134e79f84f6f9dc0d19bdfa6740db416f0 | |
parent | d0ae052da4ce25a5b4306bfbb5bf8edcd010b663 [diff] [blame] |
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).
diff --git a/doc/snippets/Cwise_rint.cpp b/doc/snippets/Cwise_rint.cpp new file mode 100644 index 0000000..1dc7b2f --- /dev/null +++ b/doc/snippets/Cwise_rint.cpp
@@ -0,0 +1,3 @@ +ArrayXd v = ArrayXd::LinSpaced(7,-2,2); +cout << v << endl << endl; +cout << rint(v) << endl;