Ignore:
Timestamp:
Apr 28, 2018, 3:54:43 PM (12 months ago)
Author:
nmedfort
Message:

Added temporary buffer functionality to the pipeline for single stream source buffers. Fixed memory leak from UCD::UnicodeBreakRE()

File:
1 edited

Legend:

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

    r5985 r5998  
    8787}
    8888
    89 void StreamSetBuffer::setBaseAddress(IDISA::IDISA_Builder * const /* b */, Value * /* handle */, Value * /* addr */) const {
     89void StreamSetBuffer::setBaseAddress(IDISA::IDISA_Builder * const /* b */, Value * /* addr */, Value * /* handle */) const {
    9090    report_fatal_error("setBaseAddress is not supported by this buffer type");
    9191}
     
    535535}
    536536
    537 //Value * DynamicBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const b, Value * const handle, Value * fromPosition, Value * availItems, bool reverse) const {
    538 //    Value * const bufferSize = getBufferedSize(b, handle);
    539 //    assert (bufferSize->getType() == fromPosition->getType());
    540 //    Value * itemsFromBase = b->CreateURem(fromPosition, bufferSize);
    541 //    if (reverse) {
    542 //        Value * bufAvail = b->CreateSelect(b->CreateIsNull(itemsFromBase), bufferSize, itemsFromBase);
    543 //        return b->CreateSelect(b->CreateICmpULT(bufAvail, availItems), bufAvail, availItems);
    544 //    } else {
    545 //        Constant * const overflow = ConstantInt::get(bufBlocks->getType(), mOverflowBlocks * b->getBitBlockWidth() - 1);
    546 //        Value * const linearSpace = b->CreateAdd(bufferSize, overflow);
    547 //        Value * remaining = b->CreateSub(linearSpace, itemsFromBase);
    548 //        return b->CreateSelect(b->CreateICmpULT(availItems, remaining), availItems, remaining);
    549 //    }
    550 //}
    551 
    552 //Value * DynamicBuffer::getLinearlyWritableItems(IDISA::IDISA_Builder * const b, Value * const handle, Value * fromPosition, Value * consumed, bool reverse) const {
    553 //    Value * const bufferSize = getBufferedSize(b, handle);
    554 //    assert (bufferSize->getType() == fromPosition->getType());
    555 //    Value * bufRem = b->CreateURem(fromPosition, bufferSize);
    556 //    if (reverse) {
    557 //        return b->CreateSelect(b->CreateIsNull(bufRem), bufferSize, bufRem);
    558 //    }
    559 //    Constant * const overflow = ConstantInt::get(bufBlocks->getType(), mOverflowBlocks * b->getBitBlockWidth() - 1);
    560 //    Value * const linearSpace = b->CreateAdd(bufferSize, overflow);
    561 //    return b->CreateSub(linearSpace, bufRem);
    562 //}
    563 
    564537Value * DynamicBuffer::getLinearlyAccessibleItems(IDISA::IDISA_Builder * const b, Value * const handle, Value * fromPosition, Value * availItems, bool reverse) const {
    565538    Value * const bufferSize = getBufferedSize(b, handle);
     
    594567    return b->CreateSub(limit, fromPosition);
    595568}
    596 
    597 
    598569
    599570Value * DynamicBuffer::getBufferedSize(IDISA::IDISA_Builder * const b, Value * const handle) const {
Note: See TracChangeset for help on using the changeset viewer.