mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
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:
+8
-1
@@ -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
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user