message: Defer to Eigen for mod & fmod functors and cost estimates.
diff: @@ -426,7 +426,7 @@ struct google_floor_fmod {
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T operator()(const T& x,
  const T& y) const {
  // EIGEN_STATIC_ASSERT(NUMERIC_TYPE_MUST_BE_REAL);
  - T trunc_mod = std::fmod(x, y);
  + T trunc_mod = scalar_fmod_op<T>()(x, y);
  return trunc_mod != T(0) && (y < T(0) != trunc_mod < T(0)) ? trunc_mod + y
  : trunc_mod;
  }
  @@ -435,8 +435,8 @@ struct google_floor_fmod {
  template <typename Scalar>
  struct functor_traits<google_floor_fmod<Scalar>> {
  enum {
  - Cost = 2 * Eigen::internal::scalar_div_cost<Scalar, false>::value +
  - 2 * NumTraits<Scalar>::AddCost,
  + Cost = functor_traits<Eigen::internal::scalar_fmod_op<Scalar>>::Cost +
  + NumTraits<Scalar>::AddCost,
  PacketAccess = false
  };
  };
  @@ -447,7 +447,7 @@ struct google_floor_mod {
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T operator()(const T& x,
  const T& y) const {
  // EIGEN_STATIC_ASSERT(!NUMERIC_TYPE_MUST_BE_REAL);
  - T trunc_mod = x % y;
  + T trunc_mod = Eigen::internal::scalar_mod2_op<T>()(x, y);
  return trunc_mod != T(0) && (y < T(0) != trunc_mod < T(0)) ? trunc_mod + y
  : trunc_mod;
  }
  @@ -456,8 +456,8 @@ struct google_floor_mod {
  template <typename Scalar>
  struct functor_traits<google_floor_mod<Scalar>> {
  enum {
  - Cost = 2 * Eigen::internal::scalar_div_cost<Scalar, false>::value +
  - 2 * NumTraits<Scalar>::AddCost,
  + Cost = functor_traits<Eigen::internal::scalar_mod2_op<Scalar>>::Cost +
  + NumTraits<Scalar>::AddCost,
  PacketAccess = false
  };
  };
  