Ignore:
Timestamp:
Apr 29, 2013, 6:56:17 AM (6 years ago)
Author:
cameron
Message:

Use template type for string base; remove Bytedata dependency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pabloSupport.hpp

    r3087 r3093  
    118118}
    119119
    120 IDISA_ALWAYS_INLINE BitBlock pablo_blk_match(uint8_t bytedata[], const char match_str[], BitBlock v, int len) {
     120template <typename T> IDISA_ALWAYS_INLINE BitBlock pablo_blk_match(T bytedata[], const T match_str[], BitBlock v, int len) {
    121121        union {BitBlock bitblock; ScanWord elems[sizeof(BitBlock)/sizeof(ScanWord)];} u;
    122122        u.bitblock = v;
     
    129129                        t = s;
    130130                        s = s & (s - 1); // clear rightmost bit
    131                         if (memcmp((void *) &bytedata[pos], (void *) match_str, len)) {
     131                        if (memcmp((void *) &bytedata[pos], (void *) match_str, len * sizeof(T))) {
    132132                                // Strings do not match; filter the result.
    133133                                bit = s ^ t;
Note: See TracChangeset for help on using the changeset viewer.