Ignore:
Timestamp:
Feb 20, 2017, 11:30:34 AM (2 years ago)
Author:
nmedfort
Message:

Fix for assertion errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/swizzle.cpp

    r5332 r5334  
    1919    , mInputSets(inputSets)
    2020    , mOutputSets(outputSets) {
    21         assert((fieldWidth > 0) && (fieldWidth & (fieldWidth - 1) == 0) && "fieldWidth must be a power of 2");
     21        assert((fieldWidth > 0) && ((fieldWidth & (fieldWidth - 1)) == 0) && "fieldWidth must be a power of 2");
    2222        assert(fieldWidth < iBuilder->getBitBlockWidth() && "fieldWidth must be less than the block width");
    2323        assert(mSwizzleFactor > 1 && "fieldWidth must be less than the block width");
     
    2626        // Maybe the following is unnecessary.
    2727        //assert(inputStreamsPerSet % swizzleFactor == 0 && "input sets must be an exact multiple of the swizzle factor");
    28         assert(outputStreamsPerSet % swizzleFactor == 0 && "output sets must be an exact multiple of the swizzle factor");
     28        assert(outputStreamsPerSet % mSwizzleFactor == 0 && "output sets must be an exact multiple of the swizzle factor");
    2929        for (unsigned i = 0; i < mInputSets; i++) {
    3030            mStreamSetInputs.push_back(Binding{iBuilder->getStreamSetTy(inputStreamsPerSet, 1), "inputGroup" + std::to_string(i)});
Note: See TracChangeset for help on using the changeset viewer.