aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-11-27 10:17:09 -0800
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-11-27 10:17:09 -0800
commitea51a9eace7e4f0ea839e61eb2df85ccfb94aee8 (patch)
tree16bd8229c448330ae39aab05fb35fa49f38703fb /Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
parent5a3ebda36b17f8de0efd0459515f4fa1050184ec (diff)
Add missing EIGEN_DEVICE_FUNC attribute to template specializations for pexp to fix GPU build.
Diffstat (limited to 'Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h')
-rw-r--r--Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
index 8054e537a..2b69512e3 100644
--- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
+++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
@@ -235,7 +235,7 @@ Packet pexp_float(const Packet _x)
// make it the default path for scalar float
template<>
-inline float pexp(const float& a) { return pexp_float(a); }
+EIGEN_DEVICE_FUNC inline float pexp(const float& a) { return pexp_float(a); }
template <typename Packet>
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
@@ -307,7 +307,7 @@ Packet pexp_double(const Packet _x)
// make it the default path for scalar double
template<>
-inline double pexp(const double& a) { return pexp_double(a); }
+EIGEN_DEVICE_FUNC inline double pexp(const double& a) { return pexp_double(a); }
// The following code is inspired by the following stack-overflow answer:
// https://stackoverflow.com/questions/30463616/payne-hanek-algorithm-implementation-in-c/30465751#30465751