Ignore:
Timestamp:
Jul 20, 2016, 2:48:37 PM (3 years ago)
Author:
cameron
Message:

Clean out hard-coded circular buffer

File:
1 edited

Legend:

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

    r5102 r5103  
    4040    for (auto sSet : mStreamSetInputs) {
    4141        mScalarInputs.push_back(ScalarBinding{PointerType::get(sSet.ssType.getStreamSetBlockType(), 0), sSet.ssName + basePtrSuffix});
    42         mScalarInputs.push_back(ScalarBinding{iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix});
    43         //Or possibly add as internal state, with code in init function:  addScalar(iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix);
    4442    }
    4543    for (auto sSet : mStreamSetOutputs) {
    4644        mScalarInputs.push_back(ScalarBinding{PointerType::get(sSet.ssType.getStreamSetBlockType(), 0), sSet.ssName + basePtrSuffix});
    47         mScalarInputs.push_back(ScalarBinding{iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix});
    48         //Or possibly add as internal state, with code in init function:  addScalar(iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix);
    4945    }
    5046    for (auto binding : mScalarInputs) {
     
    190186    }
    191187    iBuilder->restoreIP(savePoint);
    192     //doSegmentFunction->dump();
    193 }
    194 
    195 
     188}
    196189
    197190Value * KernelBuilder::getScalarIndex(std::string fieldName) {
     
    222215}
    223216
    224 Value * KernelBuilder::getCircularBufferBlockPointer(Value * self, std::string streamName, Value * blockNo) {
    225     Value * bufferBase = getScalarField(self, streamName + basePtrSuffix);
    226     Value * blockMask = getScalarField(self, streamName + blkMaskSuffix);
    227     return iBuilder->CreateGEP(bufferBase, iBuilder->CreateAnd(blockNo, blockMask));
    228 }
    229 
    230 
    231 
     217
Note: See TracChangeset for help on using the changeset viewer.