diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2018-05-16 09:49:24 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2018-05-16 09:49:24 -0700 |
commit | 812480baa340f2d8b0bc21b3f2d227168280ad06 (patch) | |
tree | c489a6dee8aa4544fde47032c5bae183d4897997 /unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | |
parent | afec3021f731d053254fe64983fc0623fff507f9 (diff) |
Rename scalar_clip_op to scalar_clip2_op to prevent collision with existing functor in TensorFlow.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h index 4cee38339..adadb5afc 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h @@ -488,8 +488,8 @@ struct functor_traits<GaussianGenerator<T, Index, NumDims> > { }; template <typename Scalar> -struct scalar_clip_op { - EIGEN_DEVICE_FUNC inline scalar_clip_op(const Scalar& _min, const Scalar& _max) : m_min(_min), m_max(_max) {} +struct scalar_clip2_op { + EIGEN_DEVICE_FUNC inline scalar_clip2_op(const Scalar& _min, const Scalar& _max) : m_min(_min), m_max(_max) {} EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const { return numext::mini(numext::maxi(x, m_min), m_max); @@ -503,7 +503,7 @@ struct scalar_clip_op { const Scalar m_max; }; template<typename Scalar> -struct functor_traits<scalar_clip_op<Scalar> > +struct functor_traits<scalar_clip2_op<Scalar> > { enum { Cost = 2 * NumTraits<Scalar>::AddCost, PacketAccess = (packet_traits<Scalar>::HasMin && packet_traits<Scalar>::HasMax)}; }; } // end namespace internal |