Changeset 6029


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

Init checkin for bitstream_pdep_kernel

Location:
icGREP/icgrep-devel/icgrep
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r6028 r6029  
    102102add_library(UCDlib UCD/CaseFolding.cpp utf8_encoder.cpp utf16_encoder.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
    103103add_library(GrepEngine  ${GREP_CORE_SRC} grep/grep_engine.cpp kernels/cc_kernel.cpp kernels/cc_scan_kernel.cpp kernels/charclasses.cpp kernels/streams_merge.cpp kernels/until_n.cpp kernels/UCD_property_kernel.cpp kernels/grapheme_kernel.cpp)
    104 add_library(LZ4_Lib lz4FrameDecoder.cpp kernels/cc_kernel.cpp kernels/lz4/lz4_deposit_uncompressed.cpp kernels/lz4/lz4_generate_deposit_stream.cpp kernels/pdep_kernel.cpp lz4/LZ4Generator.cpp kernels/lz4/lz4_block_decoder.cpp kernels/lz4/lz4_index_builder.cpp lz4/LZ4GrepEngine.cpp kernels/lz4/lz4_swizzled_match_copy_kernel.cpp kernels/swizzled_multiple_pdep_kernel.cpp)
     104add_library(LZ4_Lib lz4FrameDecoder.cpp kernels/cc_kernel.cpp kernels/lz4/lz4_deposit_uncompressed.cpp kernels/lz4/lz4_generate_deposit_stream.cpp kernels/pdep_kernel.cpp lz4/LZ4Generator.cpp kernels/lz4/lz4_block_decoder.cpp kernels/lz4/lz4_index_builder.cpp lz4/LZ4GrepEngine.cpp kernels/lz4/lz4_swizzled_match_copy_kernel.cpp kernels/bitstream_pdep_kernel.cpp kernels/swizzled_multiple_pdep_kernel.cpp)
    105105
    106106
  • icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_index_builder.cpp

    r6022 r6029  
    257257        iBuilder->setTerminationSignal(isTerminal);
    258258
    259         //TODO use memset to clear output buffer for extract marker
    260 
    261259        BasicBlock* exitBlock = iBuilder->CreateBasicBlock("processCompressedExitBlock");
    262260
  • 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.