Changeset 3334


Ignore:
Timestamp:
Jun 19, 2013, 8:30:47 AM (6 years ago)
Author:
cameron
Message:

Enable static assert checking (requires -std=gnu++0x compiler flag)

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock_iterator.hpp

    r3274 r3334  
    103103        /* Make sure that the number of bits in the mask at least equals
    104104           the number of scanblocks. */
    105         /* Requires flag -std=gnu++0x
     105        /* Requires flag -std=gnu++0x */
    106106        static_assert(sizeof(scanblock_t) * 8 >= bitblock_count * sizeof(bitblock_t)/sizeof(scanfield_t),
    107107                      "Too many bitblocks for a single scanword mask");
    108         */
     108
    109109
    110110        BitStreamScanner() {}
     
    116116                BitBlock mask_i = simd_not(simd<sizeof(scanfield_t)*8>::eq(simd<1>::constant<0>(), b));
    117117                mask |= ((scanblock_t) hsimd<sizeof(scanfield_t)*8>::signmask(mask_i)) << (i * sizeof(bitblock_t)/sizeof(scanfield_t));
    118                 printf("mask_%i = %lx\n", i, mask);
    119118        }
    120119
  • trunk/lib/pabloSupport.hpp

    r3093 r3334  
    4242        BitBlock half_block_shifted = esimd<BLOCK_SIZE/2>::mergel(strm, pending_in);
    4343        rslt = simd_or(simd<BLOCK_SIZE/2>::srli<(BLOCK_SIZE/2)-n>(half_block_shifted),
     44                       simd<BLOCK_SIZE/2>::slli<n>(strm));
     45        return strm;
     46}
     47
     48template <int fw, int n> IDISA_ALWAYS_INLINE BitBlock pablo_blk_Advance_n_(BitBlock strm, BitBlock pending_in, BitBlock & rslt) {
     49        BitBlock shifted = mvmd<fw>::dslli<1>(strm, pending_in);
     50        rslt = simd_or(simd<BLOCK_SIZE/2>::srli<fw-n>(shifted),
    4451                       simd<BLOCK_SIZE/2>::slli<n>(strm));
    4552        return strm;
Note: See TracChangeset for help on using the changeset viewer.