From cf09c5f687c171d2e8b760358a4d48da1c010ce0 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Tue, 21 Oct 2014 20:40:09 +0200 Subject: [PATCH] Prevent CUDA `calling a __host__ function from a __host__ __device__ function is not allowed` error. --- Eigen/src/Core/MathFunctions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 071c234c2..4c5fc1cae 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -596,7 +596,7 @@ template EIGEN_DEVICE_FUNC inline T mini(const T& x, const T& y) { - using std::min; + EIGEN_USING_STD_MATH(min); return min EIGEN_NOT_A_MACRO (x,y); } @@ -604,7 +604,7 @@ template EIGEN_DEVICE_FUNC inline T maxi(const T& x, const T& y) { - using std::max; + EIGEN_USING_STD_MATH(max); return max EIGEN_NOT_A_MACRO (x,y); }