summaryrefslogtreecommitdiff
path: root/volk
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-01-26 20:07:26 -0500
committerTom Rondeau <trondeau@vt.edu>2012-01-26 20:07:26 -0500
commitd8b02979cef097971bc0656b904f7b51d19b03c9 (patch)
treee9642dc5038ed90254db0bf08db9532c3370b47e /volk
parentd825bb2bc1c7bc4105723ae5f699f283bc4f3c44 (diff)
volk: fix a warning.
Diffstat (limited to 'volk')
-rw-r--r--volk/include/volk/volk_64u_popcnt_a.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/volk/include/volk/volk_64u_popcnt_a.h b/volk/include/volk/volk_64u_popcnt_a.h
index bdaa98643b..4683f1e387 100644
--- a/volk/include/volk/volk_64u_popcnt_a.h
+++ b/volk/include/volk/volk_64u_popcnt_a.h
@@ -10,10 +10,11 @@
static inline void volk_64u_popcnt_a_generic(uint64_t* ret, const uint64_t value) {
- const uint32_t* valueVector = (const uint32_t*)&value;
+ //const uint32_t* valueVector = (const uint32_t*)&value;
// This is faster than a lookup table
- uint32_t retVal = valueVector[0];
+ //uint32_t retVal = valueVector[0];
+ uint32_t retVal = (uint32_t)(value && 0x00000000FFFFFFFF);
retVal = (retVal & 0x55555555) + (retVal >> 1 & 0x55555555);
retVal = (retVal & 0x33333333) + (retVal >> 2 & 0x33333333);
@@ -22,7 +23,8 @@ static inline void volk_64u_popcnt_a_generic(uint64_t* ret, const uint64_t value
retVal = (retVal + (retVal >> 16)) & 0x0000003F;
uint64_t retVal64 = retVal;
- retVal = valueVector[1];
+ //retVal = valueVector[1];
+ retVal = (uint32_t)((value && 0xFFFFFFFF00000000) >> 31);
retVal = (retVal & 0x55555555) + (retVal >> 1 & 0x55555555);
retVal = (retVal & 0x33333333) + (retVal >> 2 & 0x33333333);
retVal = (retVal + (retVal >> 4)) & 0x0F0F0F0F;