Ignore:
Timestamp:
Apr 24, 2018, 11:11:14 PM (14 months ago)
Author:
nmedfort
Message:

Fix for unexpected merge conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/character_deposit.cpp

    r5985 r5986  
    3434#include <kernels/deletion.h>
    3535#include <kernels/pdep_kernel.h>
    36 #include <kernels/lz4/lz4_multiple_pdep_kernel.h>
    3736
    3837namespace re { class CC; }
     
    8483    }
    8584
    86     const int inputBufferBlocks = codegen::BufferSegments * codegen::ThreadNum * codegen::SegmentSize;
    87     const int outputBufferBlocks = inputBufferBlocks; // * 2;
     85    const auto bufferSize = codegen::ThreadNum * codegen::SegmentSize;
    8886
    8987    ParabixDriver pxDriver("character_deletion");
     
    109107    // GeneratePipeline
    110108    StreamSetBuffer * ByteStream = pxDriver.addBuffer<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8));
    111     StreamSetBuffer * BasisBits = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), inputBufferBlocks);
     109    StreamSetBuffer * BasisBits = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), bufferSize);
    112110
    113111    kernel::Kernel * sourceK = pxDriver.addKernelInstance<MemorySourceKernel>(iBuilder, iBuilder->getInt8PtrTy());
    114112    sourceK->setInitialArguments({inputStream, fileSize});
    115113    pxDriver.makeKernelCall(sourceK, {}, {ByteStream});
    116     Kernel * s2pk = pxDriver.addKernelInstance<S2PKernel>(iBuilder, /*aligned = */ true);
     114    Kernel * s2pk = pxDriver.addKernelInstance<S2PKernel>(iBuilder);
    117115    pxDriver.makeKernelCall(s2pk, {ByteStream}, {BasisBits});
    118116
    119 
    120     StreamSetBuffer * const CharacterMarkerBuffer = pxDriver.addBuffer<DynamicBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 1), inputBufferBlocks);
     117    StreamSetBuffer * const CharacterMarkerBuffer = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 1), bufferSize);
    121118    Kernel * ccK = pxDriver.addKernelInstance<ParabixCharacterClassKernelBuilder>(iBuilder, "extenders", std::vector<re::CC *>{re::makeCC(characterToBeDeposit)}, 8);
    122119    pxDriver.makeKernelCall(ccK, {BasisBits}, {CharacterMarkerBuffer});
    123120
    124121
    125     StreamSetBuffer * u16Swizzle0 = pxDriver.addBuffer<SwizzledCopybackBuffer>(iBuilder, iBuilder->getStreamSetTy(4), inputBufferBlocks, 1);
    126     StreamSetBuffer * u16Swizzle1 = pxDriver.addBuffer<SwizzledCopybackBuffer>(iBuilder, iBuilder->getStreamSetTy(4), inputBufferBlocks, 1);
    127 
    128 //    StreamSetBuffer * u16Swizzle0 = pxDriver.addBuffer<DynamicBuffer>(iBuilder, iBuilder->getStreamSetTy(4), inputBufferBlocks, 1, 2);
    129 //    StreamSetBuffer * u16Swizzle1 = pxDriver.addBuffer<DynamicBuffer>(iBuilder, iBuilder->getStreamSetTy(4), inputBufferBlocks, 1, 2);
    130     Kernel * delK = pxDriver.addKernelInstance<SwizzledDeleteByPEXTkernel>(iBuilder, 64, 8);
     122    StreamSetBuffer * u16Swizzle0 = pxDriver.addBuffer<CircularCopybackBuffer>(iBuilder, iBuilder->getStreamSetTy(4), bufferSize);
     123    StreamSetBuffer * u16Swizzle1 = pxDriver.addBuffer<CircularCopybackBuffer>(iBuilder, iBuilder->getStreamSetTy(4), bufferSize);
     124    Kernel * delK = pxDriver.addKernelInstance<SwizzledDeleteByPEXTkernel>(iBuilder, 8);
    131125    pxDriver.makeKernelCall(delK, {CharacterMarkerBuffer, BasisBits}, {u16Swizzle0, u16Swizzle1});
    132126
    133     StreamSetBuffer * depositedSwizzle0 = pxDriver.addBuffer<SwizzledCopybackBuffer>(iBuilder, iBuilder->getStreamSetTy(4), outputBufferBlocks, 1);
     127    StreamSetBuffer * depositedSwizzle0 = pxDriver.addBuffer<DynamicBuffer>(iBuilder, iBuilder->getStreamSetTy(4), bufferSize, 1);
    134128    Kernel * pdep0K = pxDriver.addKernelInstance<PDEPkernel>(iBuilder, 4, "pdep0");
    135129    pxDriver.makeKernelCall(pdep0K, {CharacterMarkerBuffer, u16Swizzle0}, {depositedSwizzle0});
    136130
     131
     132    StreamSetBuffer * depositedSwizzle1 = pxDriver.addBuffer<DynamicBuffer>(iBuilder, iBuilder->getStreamSetTy(4), bufferSize, 1);
    137133    Kernel * pdep1K = pxDriver.addKernelInstance<PDEPkernel>(iBuilder, 4, "pdep1");
    138     pxDriver.makeKernelCall(pdep1K, {CharacterMarkerBuffer, u16Swizzle1}, {u16Swizzle1});
    139     */
    140 
    141     Kernel * multiplePdepK = pxDriver.addKernelInstance<LZ4MultiplePDEPkernel>(iBuilder, 4, 2, 4);
    142     pxDriver.makeKernelCall(multiplePdepK, {CharacterMarkerBuffer, u16Swizzle0, u16Swizzle1}, {depositedSwizzle0, depositedSwizzle1});
    143 
    144     /*
    145     Kernel * multiplePdepK1 = pxDriver.addKernelInstance<LZ4MultiplePDEPkernel>(iBuilder, 4, 1, 4);
    146     pxDriver.makeKernelCall(multiplePdepK1, {CharacterMarkerBuffer, u16Swizzle0}, {depositedSwizzle0});
    147     Kernel * multiplePdepK2 = pxDriver.addKernelInstance<LZ4MultiplePDEPkernel>(iBuilder, 4, 1, 4);
    148     pxDriver.makeKernelCall(multiplePdepK2, {CharacterMarkerBuffer, u16Swizzle1}, {depositedSwizzle1});
    149     */
     134    pxDriver.makeKernelCall(pdep1K, {CharacterMarkerBuffer, u16Swizzle1}, {depositedSwizzle1});
    150135
    151136    // Produce unswizzled bit streams
    152     StreamSetBuffer * resultbits = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8), outputBufferBlocks);
     137    StreamSetBuffer * resultbits = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8), bufferSize);
    153138    Kernel * unSwizzleK = pxDriver.addKernelInstance<SwizzleGenerator>(iBuilder, 8, 1, 2);
    154139
    155140    pxDriver.makeKernelCall(unSwizzleK, {depositedSwizzle0, depositedSwizzle1}, {resultbits});
    156 //    pxDriver.makeKernelCall(unSwizzleK, {u16Swizzle0, u16Swizzle1}, {resultbits});
    157141
    158     StreamSetBuffer * const ResultBytes = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), outputBufferBlocks);
     142    StreamSetBuffer * const ResultBytes = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), bufferSize);
    159143    Kernel * p2sK = pxDriver.addKernelInstance<P2SKernel>(iBuilder);
    160144    pxDriver.makeKernelCall(p2sK, {resultbits}, {ResultBytes});
    161145
    162     // --------------------------------------------------------
    163     // End
    164 /*
    165     Kernel * outK = pxDriver.addKernelInstance<StdOutKernel>(iBuilder, 8);
    166     pxDriver.makeKernelCall(outK, {DecompressedByteStream}, {});
    167 */
    168146    Kernel * outK = pxDriver.addKernelInstance<FileSink>(iBuilder, 8);
    169147    outK->setInitialArguments({iBuilder->GetString(outputFile)});
Note: See TracChangeset for help on using the changeset viewer.