From 19876ced76bd1730008e02fc4c43c2228faed38a Mon Sep 17 00:00:00 2001 From: Ilya Tokar Date: Mon, 16 Dec 2019 16:00:35 -0500 Subject: 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). --- doc/snippets/Cwise_rint.cpp | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/snippets/Cwise_rint.cpp (limited to 'doc/snippets') 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; -- cgit v1.2.3