Skip to content

Commit

Permalink
Fix scoping issue, PR 405, 469, Issue 386
Browse files Browse the repository at this point in the history
  • Loading branch information
tkircher committed Apr 11, 2021
1 parent c463287 commit b6e3755
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cpp/flann/algorithms/dist.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ struct HammingPopcnt
ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const
{
ResultType result = 0;

//for portability just use unsigned long -- and use the __builtin_popcountll (see docs for __builtin_popcountll)
typedef unsigned long long pop_t;
#if __GNUC__
#if ANDROID && HAVE_NEON
static uint64_t features = android_getCpuFeatures();
Expand All @@ -499,8 +502,6 @@ struct HammingPopcnt
}
else
#endif
//for portability just use unsigned long -- and use the __builtin_popcountll (see docs for __builtin_popcountll)
typedef unsigned long long pop_t;
const size_t modulo = size % sizeof(pop_t);
const pop_t* a2 = reinterpret_cast<const pop_t*> (a);
const pop_t* b2 = reinterpret_cast<const pop_t*> (b);
Expand Down

0 comments on commit b6e3755

Please sign in to comment.