Changeset 3215


Ignore:
Timestamp:
May 29, 2013, 6:36:09 AM (6 years ago)
Author:
cameron
Message:

Fix scan masks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock_iterator.hpp

    r3207 r3215  
    4343        IDISA_ALWAYS_INLINE int init(const BitBlock *s) {
    4444                remaining._bitblock = *s;
    45                 mask = hsimd<FW>::signmask(simd<FW>::sub(simd<1>::constant<0>(), remaining._bitblock));
     45                mask = hsimd<FW>::signmask(simd_not(simd<FW>::eq(simd<1>::constant<0>(), remaining._bitblock)));
    4646        }
    4747
     
    114114        IDISA_ALWAYS_INLINE void load_block(BitBlock b, int i) {
    115115                remaining._bitblock[i] = b;
    116                 BitBlock mask_i = simd<sizeof(scanfield_t)*8>::sub(simd<1>::constant<0>(), b);
    117                 mask |= hsimd<sizeof(scanfield_t)*8>::signmask(mask_i) << (i * sizeof(bitblock_t)/sizeof(scanfield_t));
     116                BitBlock mask_i = simd_not(simd<sizeof(scanfield_t)*8>::eq(simd<1>::constant<0>(), b));
     117                mask |= ((scanblock_t) hsimd<sizeof(scanfield_t)*8>::signmask(mask_i)) << (i * sizeof(bitblock_t)/sizeof(scanfield_t));
    118118        }
    119119
Note: See TracChangeset for help on using the changeset viewer.