Changeset 3835


Ignore:
Timestamp:
Apr 18, 2014, 2:36:59 AM (3 years ago)
Author:
ksherdy
Message:

Added experimental runtime.hpp support.

Location:
trunk/lib
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pabloSupport.hpp

    r3519 r3835  
    125125}
    126126
     127// KH: expects bitblock::any(v)
     128IDISA_ALWAYS_INLINE uint64_t pablo_blk_IndexOf(BitBlock v, int block_base) {
     129    union {BitBlock bitblock; ScanWord elems[sizeof(BitBlock)/sizeof(ScanWord)];} u;
     130        u.bitblock = v;   
     131    int pos;
     132    ScanWord s, t, bit;
     133    for (unsigned int i = 0; i < sizeof(BitBlock)/sizeof(ScanWord); i++) {
     134        s = u.elems[i];
     135        if (s != 0) {
     136            int bitpos = scan_forward_zeroes(s);
     137            int pos = block_base + (i * sizeof(ScanWord) * 8) + bitpos;
     138        }
     139    }
     140   
     141        return pos;
     142}
    127143
    128144template <typename T> IDISA_ALWAYS_INLINE BitBlock pablo_blk_match(T bytedata[], const T match_str[], BitBlock v, int len) {
Note: See TracChangeset for help on using the changeset viewer.