aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/functors
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2020-01-09 00:04:26 +0000
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2020-01-09 00:04:26 +0000
commite6fcee995b0083e5652c79957090684a47a727c3 (patch)
treed813abf26dae91513e8c6b26c3ea1ca6a51f9911 /Eigen/src/Core/functors
parent4217a9f09018b1eb3ce800919a69c7c3df47f9cb (diff)
Don't use the rational approximation to the logistic function on GPUs as it appears to be slightly slower.
Diffstat (limited to 'Eigen/src/Core/functors')
-rw-r--r--Eigen/src/Core/functors/UnaryFunctors.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Eigen/src/Core/functors/UnaryFunctors.h b/Eigen/src/Core/functors/UnaryFunctors.h
index 410cc6f58..a07ddaa30 100644
--- a/Eigen/src/Core/functors/UnaryFunctors.h
+++ b/Eigen/src/Core/functors/UnaryFunctors.h
@@ -924,6 +924,7 @@ struct scalar_logistic_op {
}
};
+#ifndef EIGEN_GPU_COMPILE_PHASE
/** \internal
* \brief Template specialization of the logistic function for float.
*
@@ -1007,6 +1008,7 @@ struct scalar_logistic_op<float> {
}
}
};
+#endif // #ifndef EIGEN_GPU_COMPILE_PHASE
template <typename T>
struct functor_traits<scalar_logistic_op<T> > {