diff options
author | 2016-03-25 11:13:53 -0700 | |
---|---|---|
committer | 2016-03-25 11:13:53 -0700 | |
commit | 65716e99a5763f536257eb1dd047f34f8172f816 (patch) | |
tree | 1159e83c34245acecd8e8e64dc47fe7607f74dda | |
parent | d94f6ba9659f8c953caaff854552070ce149958b (diff) |
Improved the cost estimate of the quotient op
-rw-r--r-- | Eigen/src/Core/functors/BinaryFunctors.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/Core/functors/BinaryFunctors.h b/Eigen/src/Core/functors/BinaryFunctors.h index d04323bb0..e28fecfd0 100644 --- a/Eigen/src/Core/functors/BinaryFunctors.h +++ b/Eigen/src/Core/functors/BinaryFunctors.h @@ -303,9 +303,10 @@ template<typename LhsScalar,typename RhsScalar> struct scalar_quotient_op { }; template<typename LhsScalar,typename RhsScalar> struct functor_traits<scalar_quotient_op<LhsScalar,RhsScalar> > { + typedef typename scalar_quotient_op<LhsScalar,RhsScalar>::result_type result_type; enum { - Cost = (NumTraits<LhsScalar>::MulCost + NumTraits<RhsScalar>::MulCost), // rough estimate! - PacketAccess = scalar_quotient_op<LhsScalar,RhsScalar>::Vectorizable + PacketAccess = scalar_quotient_op<LhsScalar,RhsScalar>::Vectorizable, + Cost = NumTraits<result_type>::template Div<PacketAccess>::Cost }; }; |