| commit | 78ee3d6261ec6971fcd8fdda6ee040962edde1dc | [log] [tgz] |
|---|---|---|
| author | Antonio Sanchez <cantonios@google.com> | Thu Mar 25 12:37:25 2021 -0700 |
| committer | Antonio Sánchez <cantonios@google.com> | Tue Mar 30 18:01:27 2021 +0000 |
| tree | 77cdb5976e9dc4a8ec7630ed235ac37a8b561b36 | |
| parent | af1247fbc160868d124f7f1047a62026eb785d68 [diff] |
Fix CUDA constexpr issues for numeric_limits. Some CUDA/HIP constants fail on device with `constexpr` since they internally rely on non-constexpr functions, e.g. ``` \#define CUDART_INF_F __int_as_float(0x7f800000) ``` This fails for cuda-clang (though passes with nvcc). These constants are currently used by `device::numeric_limits`. For portability, we need to remove `constexpr` from the affected functions. For C++11 or higher, we should be able to rely on the `std::numeric_limits` versions anyways, since the methods themselves are now `constexpr`, so should be supported on device (clang/hipcc natively, nvcc with `--expr-relaxed-constexpr`).
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.