Changeset 6079


Ignore:
Timestamp:
Jun 11, 2018, 10:39:01 AM (9 days ago)
Author:
cameron
Message:

StreamExpandKernel?: eliminate kernel state: rely on PopcountOf? attribute

File:
1 edited

Legend:

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

    r6078 r6079  
    151151, mSelectedStreamBase(selectedStreamBase)
    152152, mSelectedStreamCount(selectedStreamCount) {
    153     for (unsigned i = 0; i < mSelectedStreamCount; i++) {
    154         addScalar(kb->getBitBlockType(), "pendingSourceBlock_" + std::to_string(mSelectedStreamBase + i));
    155     }
    156153}
    157154
     
    178175    std::vector<Value *> pendingData(mSelectedStreamCount);
    179176    for (unsigned i = 0; i < mSelectedStreamCount; i++) {
    180         pendingData[i] = b->getScalarField("pendingSourceBlock_" + std::to_string(mSelectedStreamBase + i));
     177        pendingData[i] = b->loadInputStreamBlock("source", b->getInt32(mSelectedStreamBase + i), ZERO);
    181178    }
    182179   
     
    261258   
    262259    b->SetInsertPoint(expansionDone);
    263     // Update kernel state.
    264     for (unsigned i = 0; i < mSelectedStreamCount; i++) {
    265         b->setScalarField("pendingSourceBlock_" + std::to_string(mSelectedStreamBase + i), b->bitCast(pendingDataPhi[i]));
    266     }
    267260}
    268261
Note: See TracChangeset for help on using the changeset viewer.