Ignore:
Timestamp:
Jan 30, 2018, 1:51:06 AM (16 months ago)
Author:
xwa163
Message:
  1. Use MemCpy? instead of streamCpy when handling buffer CopyBack?
  2. Rollback change of kernel_builder
  3. Fix bug of SwizzledDeleteByPEXTkernel when input data file is large
  4. Add large test cases for character_deletion
File:
1 edited

Legend:

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

    r5841 r5852  
    11141114            b->SetInsertPoint(copyBack);
    11151115            Value * const baseAddress = b->getBaseAddress(name);
    1116             const auto copyAlignment = getItemAlignment(mStreamSetOutputs[i]);
    1117             b->CreateStreamCpy(name, baseAddress, ZERO, baseAddress, bufferSize, current, copyAlignment);
     1116            const StreamSetBuffer * const buf = this->getAnyStreamSetBuffer(name);
     1117            const auto numOfStreams = buf->getNumOfStreams();
     1118            const auto itemWidth = getItemWidth(this->getBinding(name));
     1119
     1120            const auto sizeByBit = b->CreateMul(b->CreateMul(b->getSize(itemWidth), bufferSize), b->getSize(numOfStreams));
     1121            const auto sizeByByte = b->CreateUDiv(sizeByBit, b->getSize(8));
     1122            const auto sourcePtr = b->CreateGEP(b->CreatePointerCast(baseAddress, b->getInt8PtrTy()), sizeByByte);
     1123            const auto targetPtr = b->CreatePointerCast(baseAddress, b->getInt8PtrTy());
     1124
     1125            const auto itemsToBeCopyByBit = b->CreateMul(b->CreateMul(b->getSize(itemWidth), current), b->getSize(numOfStreams));
     1126            const auto itemsToBeCopyByByte = b->CreateUDiv(itemsToBeCopyByBit, b->getSize(8));
     1127            b->CreateMemCpy(targetPtr, sourcePtr, itemsToBeCopyByByte, 8);
     1128
    11181129            b->CreateBr(done);
    11191130
Note: See TracChangeset for help on using the changeset viewer.