Merge branch '2.4'

This commit is contained in:
Andrey Kamaev
2013-04-05 19:52:42 +04:00
154 changed files with 11355 additions and 16795 deletions

View File

@@ -421,7 +421,6 @@ struct Hamming
ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const
{
ResultType result = 0;
#ifdef __GNUC__
#ifdef __ARM_NEON__
{
uint32x4_t bits = vmovq_n_u32(0);
@@ -438,7 +437,7 @@ struct Hamming
result = vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),0);
result += vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),2);
}
#else
#elif __GNUC__
{
//for portability just use unsigned long -- and use the __builtin_popcountll (see docs for __builtin_popcountll)
typedef unsigned long long pop_t;
@@ -458,8 +457,8 @@ struct Hamming
result += __builtin_popcountll(a_final ^ b_final);
}
}
#endif //NEON
#else
#else // NO NEON and NOT GNUC
typedef unsigned long long pop_t;
HammingLUT lut;
result = lut(reinterpret_cast<const unsigned char*> (a),
reinterpret_cast<const unsigned char*> (b), size * sizeof(pop_t));