Changeset 3093 for trunk


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

Use template type for string base; remove Bytedata dependency

Location:
trunk/lib
Files:
2 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;
  • trunk/lib/transpose.hpp

    r3088 r3093  
    4040struct Transpose {
    4141  Transpose() {}
    42   void do_block(Bytedata & bytedata, Basis_bits & basis_bits) {
     42  void do_block(char * bytedata, Basis_bits & basis_bits) {
    4343    s2p_do_block((BytePack *) bytedata, basis_bits);
    4444  }
    45   void do_final_block(Bytedata & bytedata, Basis_bits & basis_bits, BitBlock EOF_mask) {
     45  void do_final_block(char * bytedata, Basis_bits & basis_bits, BitBlock EOF_mask) {
    4646    s2p_do_final_block((BytePack *) bytedata, basis_bits, EOF_mask);
    4747  }
Note: See TracChangeset for help on using the changeset viewer.