Ignore:
Timestamp:
Jul 17, 2016, 11:12:34 AM (3 years ago)
Author:
cameron
Message:

Simplify kernel DoBlock? interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r5064 r5096  
    6363    mCarryManager->initializeCodeGen(mKernelBuilder, mSelf);
    6464     
    65     Value * inputSet_ptr = mKernelBuilder->getParameter(doBlockFunction, "inputs");
     65    Value * blockNo = mKernelBuilder->getScalarField(mSelf, blockNoScalar);
     66    Value * inputSet_ptr = mKernelBuilder->getCircularBufferBlockPointer(mSelf, "inputs", blockNo);
    6667   
    6768    Value * outputSet_ptr = nullptr;
    6869    if (mPabloFunction->getNumOfResults() > 0) {
    69         outputSet_ptr = mKernelBuilder->getParameter(doBlockFunction, "outputs");
     70        outputSet_ptr = mKernelBuilder->getCircularBufferBlockPointer(mSelf, mKernelBuilder->mStreamSetOutputs[0].ssName, blockNo);
    7071    }
    7172    for (unsigned j = 0; j < mPabloFunction->getNumOfParameters(); ++j) {
    7273        Value * inputVal = iBuilder->CreateGEP(inputSet_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
    73         //Value * inputVal = iBuilder->CreateBlockAlignedLoad(inputSet_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
    7474        const Var * const var = mPabloFunction->getParameter(j);
    7575        if (DebugOptionIsSet(DumpTrace)) {
     
    8888        iBuilder->CreateBlockAlignedStore(f->second, outputSet_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
    8989    }
    90     mKernelBuilder->setScalarField(mSelf, "BlockNo", iBuilder->CreateAdd(mKernelBuilder->getScalarField(mSelf, "BlockNo"), iBuilder->getInt64(1)));
    9190    iBuilder->CreateRetVoid();
    9291
Note: See TracChangeset for help on using the changeset viewer.