Ignore:
Timestamp:
Jul 2, 2017, 10:00:26 AM (2 years ago)
Author:
cameron
Message:

Ensure size of dynamic buffers is a multiple of cache line size

File:
1 edited

Legend:

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

    r5542 r5543  
    631631    const auto fieldWidth = mBaseType->getArrayElementType()->getScalarSizeInBits();
    632632    Value * bufSize = b->getSize((mBufferBlocks + mOverflowBlocks) * b->getBitBlockWidth() * numStreams * fieldWidth/8);
     633    bufSize = b->CreateRoundUp(bufSize, b->getSize(b->getCacheAlignment()));
    633634    Value * bufBasePtrField = b->CreateGEP(handle, {b->getInt32(0), b->getInt32(int(DynamicBuffer::Field::BaseAddress))});
    634635    Value * bufPtr = b->CreatePointerCast(b->CreateCacheAlignedMalloc(bufSize), bufBasePtrField->getType()->getPointerElementType());
Note: See TracChangeset for help on using the changeset viewer.