Update the NumTraits for Jets

1. Use AVX if EIGEN_VECTORIZE_AVX is defined.
2. Make the cost of division same as the cost of multiplication.

These are updates to the original numtraits update needed for eigen 3.3
that Shaheen Gandhi sent out.

Change-Id: Ic1e3ed7d05a659c7badc79a894679b2dd61c51b9
This commit is contained in:
Sameer Agarwal
2016-08-31 05:50:58 -07:00
parent 4b6ad5d88e
commit 44044e25b1
+8 -1
View File
@@ -836,8 +836,15 @@ struct NumTraits<ceres::Jet<T, N> > {
template<bool Vectorized>
struct Div {
enum {
#if defined(EIGEN_VECTORIZE_AVX)
AVX = true,
#else
AVX = false,
Cost = 1
#endif
// Assuming that for Jets, division is as expensive as
// multiplication.
Cost = 3
};
};
};