diff options
author | Ilya Tokar <tokarip@google.com> | 2019-12-16 16:00:35 -0500 |
---|---|---|
committer | Ilya Tokar <tokarip@google.com> | 2020-01-07 21:22:44 +0000 |
commit | 19876ced76bd1730008e02fc4c43c2228faed38a (patch) | |
tree | 22f999134e79f84f6f9dc0d19bdfa6740db416f0 /doc/snippets | |
parent | d0ae052da4ce25a5b4306bfbb5bf8edcd010b663 (diff) |
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).
Diffstat (limited to 'doc/snippets')
-rw-r--r-- | doc/snippets/Cwise_rint.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/snippets/Cwise_rint.cpp b/doc/snippets/Cwise_rint.cpp new file mode 100644 index 000000000..1dc7b2fd1 --- /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; |