mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -394,6 +394,17 @@ This also means that, unless specified, if the function \c std::foo is available
|
||||
plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/round">\c std::round </a>; \cpp11</td>
|
||||
<td>SSE4,AVX,ZVector (f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_rint
|
||||
a.\link ArrayBase::rint rint\endlink(); \n
|
||||
\link Eigen::rint rint\endlink(a);
|
||||
</td>
|
||||
<td>nearest integer, \n rounding to nearest even in halfway cases</td>
|
||||
<td>built-in generic implementation using <a href="http://en.cppreference.com/w/cpp/numeric/math/rint">\c std::rint</a>
|
||||
or <a href="http://en.cppreference.com/w/c/numeric/math/rint">\c rintf</a>; </td>
|
||||
<td>SSE4,AVX (f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Floating point manipulation functions</th>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user