From bcc0e9e15ceb2fc90acb64843bd2d6161d5f0c71 Mon Sep 17 00:00:00 2001 From: Akshay Naresh Modi Date: Mon, 6 Apr 2020 23:38:57 +0000 Subject: Add numeric_limits min and max for bool This will allow (among other things) computation of argmax and argmin of bool tensors --- Eigen/src/Core/util/Meta.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Eigen/src/Core/util/Meta.h') diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 301077fab..e9e2f1873 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -359,6 +359,15 @@ template<> struct numeric_limits EIGEN_DEVICE_FUNC static unsigned long long (min)() { return 0; } }; +template<> struct numeric_limits +{ + EIGEN_DEVICE_FUNC + static bool epsilon() { return false; } + EIGEN_DEVICE_FUNC + static bool (max)() { return true; } + EIGEN_DEVICE_FUNC + static bool (min)() { return false; } +}; } -- cgit v1.2.3