Changeset 4033


Ignore:
Timestamp:
Aug 17, 2014, 3:48:48 AM (5 years ago)
Author:
cameron
Message:

Import updated file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/include/simd-lib/bitblock_iterator.hpp

    r3850 r4033  
    109109    /* Make sure that the number of bits in the mask at least equals the number of scanblocks. */
    110110    /* Requires flag -std=gnu++0x  */
    111 //    static_assert(sizeof(scanblock_t) * 8 >= bitblock_count * sizeof(bitblock_t)/sizeof(scanfield_t),
    112 //    "Too many bitblocks for a single scanword mask");
     111    static_assert(sizeof(scanblock_t) * 8 >= bitblock_count * sizeof(bitblock_t)/sizeof(scanfield_t),
     112    "Too many bitblocks for a single scanword mask");
    113113       
    114114        BitStreamScanner() {}
     
    165165    }
    166166    if ((bitblock_count & 1) != 0) {  // Should be compiled out if bitblock_count is even.
    167         sum8 = simd<8>::add(sum8, simd<8>::popcount(remaining._bitblock[bitblock_count]));
     167        sum8 = simd<8>::add(sum8, simd<8>::popcount(remaining._bitblock[bitblock_count-1]));
    168168    }
    169169    ct = mvmd<32>::extract<0>(simd<128>::add_hl(simd<64>::add_hl(simd<32>::add_hl(simd<16>::add_hl(sum8)))));
Note: See TracChangeset for help on using the changeset viewer.