Changeset 1863 for proto/parabix2


Ignore:
Timestamp:
Jan 20, 2012, 2:37:41 PM (8 years ago)
Author:
cameron
Message:

simplify matching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/src/TagMatcher.hpp

    r1859 r1863  
    6969      /* full 16 byte match */
    7070
    71       if (hsimd128<8>::signmask(simd<8>::eq(bitblock::load_unaligned((BitBlock*)&s1[i]), bitblock::load_unaligned((BitBlock*)&s2[i])))) {
     71      if (bitblock::any(simd_xor(bitblock::load_unaligned((BitBlock*)&s1[i]),
     72                                 bitblock::load_unaligned((BitBlock*)&s2[i])))) {
     73                return 0;
     74      }
     75      else {
    7276                lgth -= sizeof(BitBlock);
    7377                i +=sizeof(BitBlock);
    7478      }
    75       else {
    76                 return 0;
    77       }
    7879    }
    7980
     
    8182                                                  bitblock::load_unaligned((BitBlock*)&s2[i])));
    8283
    83         if(temp > 0) {
    84         if (lgth > scan_forward_zeroes(temp)){
    85                 return 0;
    86                 }
    87         }
    88     else {
    89                 return 1;
    90         }
     84        return lgth <= scan_forward_zeroes(temp);
    9185}
    9286
Note: See TracChangeset for help on using the changeset viewer.