Ignore:
Timestamp:
Apr 6, 2017, 4:14:34 PM (2 years ago)
Author:
cameron
Message:

Uniquify kernel names with buffer types/sizes; update u8u16 to use ParabixDriver?

File:
1 edited

Legend:

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

    r5390 r5395  
    303303SwizzledCopybackBuffer::SwizzledCopybackBuffer(IDISA::IDISA_Builder * b, Type * type, size_t bufferBlocks, size_t overflowBlocks, unsigned fieldwidth, unsigned AddressSpace)
    304304: StreamSetBuffer(BufferKind::SwizzledCopybackBuffer, b, type, resolveStreamSetType(b, type), bufferBlocks, AddressSpace), mOverflowBlocks(overflowBlocks), mFieldWidth(fieldwidth) {
    305    
     305    mUniqueID = "SW" + std::to_string(fieldwidth) + ":" + std::to_string(bufferBlocks);
     306    if (mOverflowBlocks != 1) mUniqueID += "_" + std::to_string(mOverflowBlocks);
     307    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
     308
    306309}
    307310
     
    461464SingleBlockBuffer::SingleBlockBuffer(IDISA::IDISA_Builder * b, Type * type)
    462465: StreamSetBuffer(BufferKind::BlockBuffer, b, type, resolveStreamSetType(b, type), 1, 0) {
     466    mUniqueID = "S";
    463467
    464468}
     
    466470ExternalFileBuffer::ExternalFileBuffer(IDISA::IDISA_Builder * b, Type * type, unsigned AddressSpace)
    467471: StreamSetBuffer(BufferKind::ExternalFileBuffer, b, type, resolveStreamSetType(b, type), 0, AddressSpace) {
    468 
     472    mUniqueID = "E";
     473    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
    469474}
    470475
    471476ExtensibleBuffer::ExtensibleBuffer(IDISA::IDISA_Builder * b, Type * type, size_t bufferBlocks, unsigned AddressSpace)
    472477: StreamSetBuffer(BufferKind::ExtensibleBuffer, b, type, StructType::get(b->getSizeTy(), resolveStreamSetType(b, type)->getPointerTo(), nullptr), bufferBlocks, AddressSpace) {
    473 
     478    mUniqueID = "XT" + std::to_string(bufferBlocks);
     479    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
    474480}
    475481
    476482CircularBuffer::CircularBuffer(IDISA::IDISA_Builder * b, Type * type, size_t bufferBlocks, unsigned AddressSpace)
    477483: StreamSetBuffer(BufferKind::CircularBuffer, b, type, resolveStreamSetType(b, type), bufferBlocks, AddressSpace) {
     484    mUniqueID = "C" + std::to_string(bufferBlocks);
     485    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
    478486
    479487}
     
    481489CircularCopybackBuffer::CircularCopybackBuffer(IDISA::IDISA_Builder * b, Type * type, size_t bufferBlocks, size_t overflowBlocks, unsigned AddressSpace)
    482490: StreamSetBuffer(BufferKind::CircularCopybackBuffer, b, type, resolveStreamSetType(b, type), bufferBlocks, AddressSpace), mOverflowBlocks(overflowBlocks) {
    483 
     491    mUniqueID = "CC" + std::to_string(bufferBlocks);
     492    if (mOverflowBlocks != 1) mUniqueID += "_" + std::to_string(mOverflowBlocks);
     493    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
    484494}
    485495
     
    487497: StreamSetBuffer(BufferKind::ExpandableBuffer, b, type, resolveExpandableStreamSetType(b, type), bufferBlocks, AddressSpace)
    488498, mInitialCapacity(type->getArrayNumElements()) {
    489 
     499    mUniqueID = "XP" + std::to_string(bufferBlocks);
     500    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
    490501}
    491502
Note: See TracChangeset for help on using the changeset viewer.