Changeset 2874 for trunk


Ignore:
Timestamp:
Jan 31, 2013, 6:21:44 AM (6 years ago)
Author:
cameron
Message:

Support for pablo.Lookahead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pabloSupport.hpp

    r2795 r2874  
    3636                       simd<BLOCK_SIZE/2>::slli<n>(strm));
    3737        return strm;
     38}
     39
     40/*  Support for pablo.Lookahead.  2 translation modes:
     41    (a) pablo.Lookahead(ss.strm, n) ==> pablo_Lookahead_n_<n>(ss_curblock.strm, ss_nxtblock.strm);
     42    (b) pablo.Lookahead(ss.strm, n) ==> pablo_Lookahead_n_<n>(ss[0].strm, ss[1].strm);
     43*/
     44template <int n> IDISA_ALWAYS_INLINE BitBlock pablo_Lookahead_n_(BitBlock strm, BitBlock lookahead) {
     45        BitBlock half_block_shifted = esimd<BLOCK_SIZE/2>::mergel(lookahead, strm);
     46        return simd_or(simd<BLOCK_SIZE/2>::slli<(BLOCK_SIZE/2)-n>(half_block_shifted),
     47                       simd<BLOCK_SIZE/2>::srli<n>(strm));
    3848}
    3949
Note: See TracChangeset for help on using the changeset viewer.