Ignore:
Timestamp:
Sep 21, 2017, 3:10:34 PM (2 years ago)
Author:
nmedfort
Message:

Minor clean up. Bug fix for object cache when the same cached kernel is used twice in a single run. Improvement to RE Minimizer.

Location:
icGREP/icgrep-devel/icgrep/kernels
Files:
8 edited

Legend:

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

    r5585 r5646  
    177177
    178178
    179 ICGrepKernel::ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re, bool cc, unsigned cc_size)
     179ICGrepKernel::ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re, unsigned numOfCharacterClasses)
    180180: RegularExpressionOptimizer(re)
    181181, PabloKernel(iBuilder,
    182182              "ic" + sha1sum(mSignature),
    183               {Binding{iBuilder->getStreamSetTy(cc ? cc_size : 8), "basis"}, Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"}, Binding{iBuilder->getStreamSetTy(4, 1), "required"}},
     183              {Binding{iBuilder->getStreamSetTy(numOfCharacterClasses), "basis"},
     184               Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"},
     185               Binding{iBuilder->getStreamSetTy(4, 1), "required"}},
     186
    184187              {Binding{iBuilder->getStreamSetTy(1, 1), "matches"}}) {
    185188
     
    191194
    192195void ICGrepKernel::generatePabloMethod() {
    193     re2pablo_compiler(this, mRE);
     196    PabloAST * const match_post = re2pablo_compiler(this, mRE);
     197    PabloBlock * const pb = getEntryBlock();
     198    Var * const output = getOutputStreamVar("matches");
     199    pb->createAssign(pb->createExtract(output, pb->getInteger(0)), match_post);
    194200}
    195201
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.h

    r5585 r5646  
    4242class ICGrepKernel : public RegularExpressionOptimizer, public pablo::PabloKernel {
    4343public:
    44     ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, re::RE * const re_ast, bool cc = false, unsigned cc_size = 0);
     44    ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, re::RE * const re_ast, const unsigned numOfCharacterClasses = 8);
    4545    std::string makeSignature(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    4646    bool isCachable() const override { return true; }
  • icGREP/icgrep-devel/icgrep/kernels/interface.cpp

    r5611 r5646  
    8585}
    8686
    87 unsigned ProcessingRate::calculateMaxReferenceItems(unsigned outputItems, bool doFinal) const {
     87unsigned ProcessingRate::calculateMaxReferenceItems(const unsigned outputItems, const bool doFinal) const {
    8888    if (mKind == ProcessingRate::ProcessingRateKind::FixedRatio || mKind == ProcessingRate::ProcessingRateKind::MaxRatio) {
    8989        if (mRatioNumerator == mRatioDenominator) {
     
    9696    }
    9797    if (mKind == ProcessingRate::ProcessingRateKind::Add1) {
    98         return doFinal ? outputItems - 1 : outputItems;
     98        return outputItems - (doFinal ? 1 : 0);
    9999    }
    100100    report_fatal_error("Inverse processing rate calculation attempted for unknown rate.");
  • icGREP/icgrep-devel/icgrep/kernels/interface.h

    r5620 r5646  
    106106    }
    107107
     108    unsigned getNumOfStreamInputs() const {
     109        return mStreamSetInputs.size();
     110    }
     111
    108112    const std::vector<Binding> & getStreamOutputs() const {
    109113        return mStreamSetOutputs;
     114    }
     115
     116    unsigned getNumOfStreamOutputs() const {
     117        return mStreamSetOutputs.size();
    110118    }
    111119
     
    155163    }
    156164
    157     unsigned getLookAhead() const {
    158         return mLookAheadPositions;
    159     }
    160 
    161     void setLookAhead(const unsigned lookAheadPositions) {
    162         mLookAheadPositions = lookAheadPositions;
     165    unsigned getLookAhead(const unsigned i) const {
     166        assert (i < mStreamSetInputLookahead.size());
     167        return mStreamSetInputLookahead[i];
     168    }
     169
     170    void setLookAhead(const unsigned i, const unsigned lookAheadPositions) {
     171        assert (i < mStreamSetInputLookahead.size());
     172        mStreamSetInputLookahead[i] = lookAheadPositions;
    163173    }
    164174
     
    180190    , mModule(nullptr)
    181191    , mKernelStateType(nullptr)
    182     , mLookAheadPositions(0)
    183192    , mKernelName(kernelName)
    184193    , mStreamSetInputs(stream_inputs)
     194    , mStreamSetInputLookahead(mStreamSetInputs.size(), 0)
    185195    , mStreamSetOutputs(stream_outputs)
    186196    , mScalarInputs(scalar_inputs)
     
    195205    llvm::Module *                          mModule;
    196206    llvm::StructType *                      mKernelStateType;
    197     unsigned                                mLookAheadPositions;
    198207    const std::string                       mKernelName;
    199208    std::vector<llvm::Value *>              mInitialArguments;
    200209    std::vector<Binding>                    mStreamSetInputs;
     210    std::vector<unsigned>                   mStreamSetInputLookahead;
    201211    std::vector<Binding>                    mStreamSetOutputs;
    202212    std::vector<Binding>                    mScalarInputs;
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5641 r5646  
    137137    assert ("KernelBuilder does not have a valid IDISA Builder" && idb);
    138138    if (LLVM_UNLIKELY(mKernelStateType != nullptr)) {
    139         report_fatal_error("Cannot prepare kernel after kernel state finalized");
     139        report_fatal_error(getName() + ": cannot prepare kernel after kernel state finalized");
    140140    }
    141141    const auto blockSize = idb->getBitBlockWidth();
     
    144144        mStride = blockSize;
    145145    }
    146     const auto requiredBlocks = codegen::SegmentSize + ((blockSize + mLookAheadPositions - 1) / blockSize);
    147 
    148146    IntegerType * const sizeTy = idb->getSizeTy();
    149147
     148    assert (mStreamSetInputs.size() == mStreamSetInputBuffers.size());
     149//    assert (mStreamSetInputs.size() == mStreamSetInputLookahead.size());
     150
    150151    for (unsigned i = 0; i < mStreamSetInputs.size(); i++) {
    151         if ((mStreamSetInputBuffers[i]->getBufferBlocks() != 0) && (mStreamSetInputBuffers[i]->getBufferBlocks() < requiredBlocks)) {
    152             //report_fatal_error(getName() + ": " + mStreamSetInputs[i].name + " requires buffer size " + std::to_string(requiredBlocks));
    153         }
     152//        const auto requiredBlocks = codegen::SegmentSize + ((mStreamSetInputLookahead[i] + blockSize - 1) / blockSize);
     153//        if ((mStreamSetInputBuffers[i]->getBufferBlocks() != 0) && (mStreamSetInputBuffers[i]->getBufferBlocks() < requiredBlocks)) {
     154//            report_fatal_error(getName() + ": " + mStreamSetInputs[i].name + " requires buffer size " + std::to_string(requiredBlocks));
     155//        }
    154156        mScalarInputs.emplace_back(mStreamSetInputBuffers[i]->getStreamSetHandle()->getType(), mStreamSetInputs[i].name + BUFFER_PTR_SUFFIX);
    155157        if ((i == 0) || !mStreamSetInputs[i].rate.isExact()) {
     
    157159        }
    158160    }
     161
     162    assert (mStreamSetOutputs.size() == mStreamSetOutputBuffers.size());
    159163
    160164    for (unsigned i = 0; i < mStreamSetOutputs.size(); i++) {
     
    201205    if (LLVM_LIKELY(mKernelStateType == nullptr)) {
    202206        mKernelStateType = StructType::create(idb->getContext(), mKernelFields, getName());
     207        assert (mKernelStateType);
    203208    }
    204209    processingRateAnalysis();
     
    209214    assert ("KernelBuilder does not have a valid IDISA Builder" && idb);
    210215    if (LLVM_UNLIKELY(mKernelStateType != nullptr)) {
    211         report_fatal_error("Cannot prepare kernel after kernel state finalized");
     216        report_fatal_error(getName() + ": cannot prepare kernel after kernel state finalized");
    212217    }
    213218    assert (getModule());
     
    217222        mStride = blockSize;
    218223    }
    219     const auto requiredBlocks = codegen::SegmentSize + ((blockSize + mLookAheadPositions - 1) / blockSize);
    220 
    221224    IntegerType * const sizeTy = idb->getSizeTy();
     225
     226    assert (mStreamSetInputs.size() == mStreamSetInputBuffers.size());
     227//    assert (mStreamSetInputs.size() == mStreamSetInputLookahead.size());
     228
    222229    for (unsigned i = 0; i < mStreamSetInputs.size(); i++) {
    223         if ((mStreamSetInputBuffers[i]->getBufferBlocks() != 0) && (mStreamSetInputBuffers[i]->getBufferBlocks() < requiredBlocks)) {
    224             //report_fatal_error(getName() + ": " + mStreamSetInputs[i].name + " requires buffer size " + std::to_string(requiredBlocks));
    225         }
     230//        const auto requiredBlocks = codegen::SegmentSize + ((mStreamSetInputLookahead[i] + blockSize - 1) / blockSize);
     231//        if ((mStreamSetInputBuffers[i]->getBufferBlocks() != 0) && (mStreamSetInputBuffers[i]->getBufferBlocks() < requiredBlocks)) {
     232//            report_fatal_error(getName() + ": " + mStreamSetInputs[i].name + " requires buffer size " + std::to_string(requiredBlocks));
     233//        }
    226234        mScalarInputs.emplace_back(mStreamSetInputBuffers[i]->getStreamSetHandle()->getType(), mStreamSetInputs[i].name + BUFFER_PTR_SUFFIX);
    227235        if ((i == 0) || !mStreamSetInputs[i].rate.isExact()) {
     
    229237        }
    230238    }
     239
     240    assert (mStreamSetOutputs.size() == mStreamSetOutputBuffers.size());
    231241
    232242    for (unsigned i = 0; i < mStreamSetOutputs.size(); i++) {
     
    248258        addScalar(binding.type, binding.name);
    249259    }
    250 
    251260    Type * const consumerSetTy = StructType::get(sizeTy, sizeTy->getPointerTo()->getPointerTo(), nullptr)->getPointerTo();
    252261    for (unsigned i = 0; i < mStreamSetOutputs.size(); i++) {
    253262        addScalar(consumerSetTy, mStreamSetOutputs[i].name + CONSUMER_SUFFIX);
    254263    }
    255 
    256264    addScalar(sizeTy, LOGICAL_SEGMENT_NO_SCALAR);
    257265    addScalar(idb->getInt1Ty(), TERMINATION_SIGNAL);
    258 
    259266    for (unsigned i = 0; i < mStreamSetOutputs.size(); i++) {
    260267        addScalar(sizeTy, mStreamSetOutputs[i].name + CONSUMED_ITEM_COUNT_SUFFIX);
    261268    }
    262 
    263269    // We compile in a 64-bit CPU cycle counter into every kernel.   It will remain unused
    264270    // in normal execution, but when codegen::EnableCycleCounter is specified, pipelines
    265271    // will be able to add instrumentation to cached modules without recompilation.
    266272    addScalar(idb->getInt64Ty(), CYCLECOUNT_SCALAR);
     273
    267274    mKernelStateType = getModule()->getTypeByName(getName());
    268     assert (mKernelStateType);
     275    if (LLVM_UNLIKELY(mKernelStateType == nullptr)) {
     276        report_fatal_error("Kernel " + getName() + " definition could not be found in the cache object");
     277    }
    269278    processingRateAnalysis();
    270279}
     
    12621271    //kb->GetInsertBlock()->dump();
    12631272    for (unsigned i = 0; i < outputSetCount; i++) {
    1264         requiredOutputBufferSpace[i] = nullptr;
    1265         auto & rate = kernel->getStreamOutput(i).rate;
     1273        const auto & rate = kernel->getStreamOutput(i).rate;
    12661274        if (rate.isUnknownRate()) continue;  // No calculations possible.
    12671275        Kernel::Port port; unsigned ssIdx;
    12681276        std::tie(port, ssIdx) = kernel->getStreamPort(rate.referenceStreamSet());
     1277        Value * base = nullptr;
    12691278        if (port == Kernel::Port::Output) {
    1270             requiredOutputBufferSpace[i] = rate.CreateRatioCalculation(kb.get(), requiredOutputBufferSpace[ssIdx], doFinal);
    1271         }
    1272         else {
    1273             requiredOutputBufferSpace[i] = rate.CreateRatioCalculation(kb.get(), newlyAvailInputItems[ssIdx], doFinal);
    1274         }
     1279            base = requiredOutputBufferSpace[ssIdx]; assert (base);
     1280        } else {
     1281            base = newlyAvailInputItems[ssIdx]; assert (base);
     1282        }
     1283        requiredOutputBufferSpace[i] = rate.CreateRatioCalculation(kb.get(), base, doFinal);
    12751284        if (auto db = dyn_cast<DynamicBuffer>(outputs[i])) {
    12761285            Value * handle = db->getStreamSetHandle();
  • icGREP/icgrep-devel/icgrep/kernels/kernel_builder.cpp

    r5637 r5646  
    132132    Kernel::Port port; unsigned index;
    133133    std::tie(port, index) = mKernel->getStreamPort(name);
     134    const StreamSetBuffer * buf = nullptr;
    134135    if (port == Kernel::Port::Input) {
    135         const StreamSetBuffer * const buf = mKernel->getInputStreamSetBuffer(name);
    136         return buf->getLinearlyAccessibleItems(this, getStreamSetBufferPtr(name), fromPosition);
    137     }
    138     else {
    139         const StreamSetBuffer * const buf = mKernel->getOutputStreamSetBuffer(name);
    140         return buf->getLinearlyAccessibleItems(this, getStreamSetBufferPtr(name), fromPosition);
    141     }
     136        buf = mKernel->getInputStreamSetBuffer(name);
     137        const auto lookAhead = mKernel->getLookAhead(index);
     138        if (LLVM_UNLIKELY(lookAhead != 0)) {
     139            fromPosition = CreateAdd(ConstantInt::get(fromPosition->getType(), lookAhead), fromPosition);
     140        }
     141    } else {
     142        buf = mKernel->getOutputStreamSetBuffer(name);
     143    }
     144    return buf->getLinearlyAccessibleItems(this, getStreamSetBufferPtr(name), fromPosition);
    142145}
    143146
     
    145148    Kernel::Port port; unsigned index;
    146149    std::tie(port, index) = mKernel->getStreamPort(name);
     150    const StreamSetBuffer * buf = nullptr;
    147151    if (port == Kernel::Port::Input) {
    148         const StreamSetBuffer * const buf = mKernel->getInputStreamSetBuffer(name);
    149         return buf->getLinearlyAccessibleBlocks(this, getStreamSetBufferPtr(name), fromBlock);
    150     } else {
    151         const StreamSetBuffer * const buf = mKernel->getOutputStreamSetBuffer(name);
    152         return buf->getLinearlyAccessibleBlocks(this, getStreamSetBufferPtr(name), fromBlock);
    153     }
     152        buf = mKernel->getInputStreamSetBuffer(name);
     153        const auto lookAhead = mKernel->getLookAhead(index);
     154        if (LLVM_UNLIKELY(lookAhead != 0)) {
     155            const auto blocksAhead = (lookAhead + getBitBlockWidth() - 1) / getBitBlockWidth();
     156            fromBlock = CreateAdd(ConstantInt::get(fromBlock->getType(), blocksAhead), fromBlock);
     157        }
     158    } else {
     159        buf = mKernel->getOutputStreamSetBuffer(name);
     160    }
     161    return buf->getLinearlyAccessibleBlocks(this, getStreamSetBufferPtr(name), fromBlock);
    154162}
    155163
  • icGREP/icgrep-devel/icgrep/kernels/streamset.cpp

    r5641 r5646  
    140140}
    141141
    142 Value * StreamSetBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromPosition, bool reverse) const {
     142Value * StreamSetBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromPosition, bool reverse, const unsigned lookAhead) const {
    143143    Constant * bufSize = iBuilder->getSize(mBufferBlocks * iBuilder->getStride());
    144144    Value * bufRem = iBuilder->CreateURem(fromPosition, bufSize);
     
    149149}
    150150
    151 Value * StreamSetBuffer::getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromBlock, bool reverse) const {
     151Value * StreamSetBuffer::getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromBlock, bool reverse, const unsigned lookAhead) const {
    152152    Constant * bufBlocks = iBuilder->getSize(mBufferBlocks);
    153153    Value * bufRem = iBuilder->CreateURem(fromBlock, bufBlocks);
     
    264264}
    265265
    266 Value * SourceBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromPosition, bool reverse) const {
     266Value * SourceBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromPosition, bool reverse, const unsigned lookAhead) const {
    267267    if (reverse) report_fatal_error("SourceBuffer cannot be accessed in reverse");
    268268    return iBuilder->CreateSub(getCapacity(iBuilder, self), fromPosition);
    269269}
    270270
    271 Value * SourceBuffer::getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromBlock, bool reverse) const {
     271Value * SourceBuffer::getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, Value * self, Value * fromBlock, bool reverse, const unsigned lookAhead) const {
    272272    if (reverse) report_fatal_error("SourceBuffer cannot be accessed in reverse");
    273273    return iBuilder->CreateSub(iBuilder->CreateUDiv(getCapacity(iBuilder, self), iBuilder->getSize(iBuilder->getBitBlockWidth())), fromBlock);
     
    301301}
    302302
    303 Value * ExternalBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const, Value *, Value *, bool reverse) const {
     303Value * ExternalBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const, Value *, Value *, bool, const unsigned) const {
    304304    report_fatal_error("External buffers: getLinearlyAccessibleItems is not supported.");
    305305}
     
    591591}
    592592
    593 Value * ExpandableBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, Value * self, Value *, bool reverse) const {
     593Value * ExpandableBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const, Value *, Value *, bool, const unsigned) const {
    594594    report_fatal_error("Expandable buffers: getLinearlyAccessibleItems is not supported.");
    595595}
     
    682682
    683683
    684 Value * DynamicBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const b, Value * handle, Value * fromPosition, bool reverse) const {
     684Value * DynamicBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const b, Value * handle, Value * fromPosition, bool reverse, const unsigned lookAhead) const {
    685685    Constant * blockSize = b->getSize(b->getBitBlockWidth());
    686686    Value * const bufBlocks = b->CreateLoad(b->CreateGEP(handle, {b->getInt32(0), b->getInt32(int(Field::WorkingBlocks))}));
     
    690690        return b->CreateSelect(b->CreateICmpEQ(bufRem, b->getSize(0)), bufSize, bufRem);
    691691    }
    692     else return b->CreateSub(bufSize, bufRem, "linearItems");
     692    return b->CreateSub(bufSize, bufRem, "linearItems");
    693693}
    694694
     
    699699}
    700700
    701 Value * DynamicBuffer::getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const b, Value * handle, Value * fromBlock, bool reverse) const {
     701Value * DynamicBuffer::getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const b, Value * handle, Value * fromBlock, bool reverse, const unsigned lookAhead) const {
    702702    Value * const bufBlocks = b->CreateLoad(b->CreateGEP(handle, {b->getInt32(0), b->getInt32(int(Field::WorkingBlocks))}));
    703703    Value * bufRem = b->CreateURem(fromBlock, bufBlocks);
     
    705705        return b->CreateSelect(b->CreateICmpEQ(bufRem, b->getSize(0)), bufBlocks, bufRem);
    706706    }
    707     else return b->CreateSub(bufBlocks, bufRem, "linearBlocks");
     707    return b->CreateSub(bufBlocks, bufRem, "linearBlocks");
    708708}
    709709
  • icGREP/icgrep-devel/icgrep/kernels/streamset.h

    r5641 r5646  
    8383   
    8484    // The number of items that cam be linearly accessed from a given logical stream position.
    85     virtual llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false) const;
    86    
    87     virtual llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock, bool reverse = false) const;
     85    virtual llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false, const unsigned lookAhead = 0) const;
     86   
     87    virtual llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock, bool reverse = false, const unsigned lookAhead = 0) const;
    8888   
    8989    void createBlockCopy(IDISA::IDISA_Builder * const iBuilder, llvm::Value * targetBlockPtr, llvm::Value * sourceBlockPtr, llvm::Value * blocksToCopy) const;
     
    163163    llvm::Value * getCapacity(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self) const override;
    164164   
    165     llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false) const override;
    166    
    167     llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock, bool reverse = false) const override;
     165    llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false, const unsigned lookAhead = 0) const override;
     166   
     167    llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock, bool reverse = false, const unsigned lookAhead = 0) const override;
    168168
    169169    llvm::Type * getStreamSetBlockType() const override;
     
    191191    ExternalBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, llvm::Type * type, llvm::Value * addr, unsigned AddressSpace = 0);
    192192
    193     llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false) const override;
     193    llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false, const unsigned lookAhead = 0) const override;
    194194
    195195    void allocateBuffer(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
     
    291291    llvm::Value * getStreamPackPtr(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * streamIndex, llvm::Value * blockIndex, llvm::Value * packIndex, const bool readOnly) const override;
    292292
    293     llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false) const override;
     293    llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false, const unsigned lookAhead = 0) const override;
    294294
    295295    llvm::Value * getStreamSetCount(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self) const override;
     
    322322    DynamicBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, llvm::Type * type, size_t initialCapacity, size_t overflowBlocks = 0, unsigned swizzleFactor = 1, unsigned addrSpace = 0);
    323323   
    324     llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const b, llvm::Value * handle, llvm::Value * fromPosition, bool reverse = false) const override;
    325    
    326     llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock, bool reverse = false) const override;
     324    llvm::Value * getLinearlyAccessibleItems(IDISA::IDISA_Builder * const b, llvm::Value * handle, llvm::Value * fromPosition, bool reverse = false, const unsigned lookAhead = 0) const override;
     325   
     326    llvm::Value * getLinearlyAccessibleBlocks(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromBlock, bool reverse = false, const unsigned lookAhead = 0) const override;
    327327
    328328    llvm::Value * getLinearlyWritableItems(IDISA::IDISA_Builder * const iBuilder, llvm::Value * self, llvm::Value * fromPosition, bool reverse = false) const override;
Note: See TracChangeset for help on using the changeset viewer.