Skip to content

Commit

Permalink
[matching] Fix a typo in the preprocessor used to detect SSE support
Browse files Browse the repository at this point in the history
- This L2 distance specialization is only used for floating point based descriptors.
- So the impact will be visible only if you are using AKAZE_FLOAT.
- Fast experiments show that SSE distance can be up to 40% faster.
  • Loading branch information
pmoulon committed Jul 1, 2016
1 parent cbf1519 commit ab2938d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openMVG/matching/metric.hpp
Expand Up @@ -69,7 +69,7 @@ struct L2_Vectorized
}
};

#ifdef OPENVMG_USE_SSE
#ifdef OPENMVG_USE_SSE

namespace optim_ss2{

Expand All @@ -83,7 +83,7 @@ namespace optim_ss2{
};

// Euclidean distance (SSE method) (squared result)
inline float l2_sse(float * b1, float * b2, int size)
inline float l2_sse(const float * b1, const float * b2, int size)
{
float* b1Pt = (float*)b1;
float* b2Pt = (float*)b2;
Expand Down Expand Up @@ -131,7 +131,7 @@ struct L2_Vectorized<float>
}
};

#endif // OPENVMG_USE_SSE
#endif // OPENMVG_USE_SSE

} // namespace matching
} // namespace openMVG
Expand Down

0 comments on commit ab2938d

Please sign in to comment.