Ignore:
Timestamp:
May 11, 2018, 2:37:15 PM (13 months ago)
Author:
xwa163
Message:

Init checkin for bitstream_pdep_kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/lz4/LZ4Generator.cpp

    r6026 r6029  
    2222#include <kernels/lz4/lz4_block_decoder.h>
    2323#include <kernels/lz4/lz4_index_builder.h>
     24#include <kernels/bitstream_pdep_kernel.h>
    2425
    2526namespace re { class CC; }
     
    9091    this->generateExtractAndDepositMarkers(iBuilder);
    9192
    92     auto swizzle = this->generateSwizzleExtractData(iBuilder);
     93    auto swizzle = this->generateSwizzleExtractData(iBuilder); // TODO: use compression kernel instead
     94
     95    StreamSetBuffer * extractedBits = mPxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8), this->getInputBufferBlocks());
     96    Kernel * unSwizzleK = mPxDriver.addKernelInstance<SwizzleGenerator>(iBuilder, 8, 1, 2);
     97    mPxDriver.makeKernelCall(unSwizzleK, {swizzle.first, swizzle.second}, {extractedBits});
     98
     99    StreamSetBuffer * depositedBits = mPxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8), this->getDecompressedBufferBlocks());
     100    Kernel * bitStreamPDEPk = mPxDriver.addKernelInstance<BitStreamPDEPKernel>(iBuilder, 8);
     101    mPxDriver.makeKernelCall(bitStreamPDEPk, {mDepositMarker, extractedBits}, {depositedBits});
     102
     103    /*
    93104
    94105    StreamSetBuffer * depositedSwizzle0 = mPxDriver.addBuffer<CircularCopybackBuffer>(iBuilder, iBuilder->getStreamSetTy(4), this->getInputBufferBlocks(), 1);
     
    99110
    100111    // Produce unswizzled bit streams
    101     StreamSetBuffer * extractedbits = mPxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8), this->getInputBufferBlocks());
     112    StreamSetBuffer * depositedBits = mPxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8), this->getInputBufferBlocks());
    102113    Kernel * unSwizzleK = mPxDriver.addKernelInstance<SwizzleGenerator>(iBuilder, 8, 1, 2);
    103     mPxDriver.makeKernelCall(unSwizzleK, {depositedSwizzle0, depositedSwizzle1}, {extractedbits});
     114    mPxDriver.makeKernelCall(unSwizzleK, {depositedSwizzle0, depositedSwizzle1}, {depositedBits});
     115     */
    104116
    105117    Kernel * p2sK = mPxDriver.addKernelInstance<P2SKernel>(iBuilder);
    106     mPxDriver.makeKernelCall(p2sK, {extractedbits}, {DecompressedByteStream});
     118    mPxDriver.makeKernelCall(p2sK, {depositedBits}, {DecompressedByteStream});
    107119
    108120    // --------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.