Ignore:
Timestamp:
Jul 1, 2018, 3:53:34 PM (13 months ago)
Author:
xwa163
Message:

Encode BitStream? directly in LZParabix compressed file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/lzparabix/LZParabixCompressorGenerator.cpp

    r6114 r6123  
    1717#include <kernels/stdout_kernel.h>
    1818#include <kernels/kernel_builder.h>
    19 #include <kernels/lzparabix/LZParabixCompressionKernel.h>
     19#include <kernels/lzparabix/encoder/LZParabixCompressionKernel.h>
    2020
    2121
     
    4343
    4444    parabix::StreamSetBuffer* outputStream = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), this->getInputBufferBlocks(iBuilder));
     45
     46    parabix::StreamSetBuffer* literalByteBuffer = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), this->getInputBufferBlocks(iBuilder));
     47    parabix::StreamSetBuffer* tokenByteBuffer = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), this->getInputBufferBlocks(iBuilder));
     48
     49    parabix::StreamSetBuffer* strToBlockIndex = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 64), HASHNBCELLS4);
     50    parabix::StreamSetBuffer* strToMatchPos = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 32), HASHNBCELLS4);
     51
    4552    Kernel * compressionKernel = mPxDriver.addKernelInstance<LZParabixCompressionKernel>(iBuilder);
    4653    compressionKernel->setInitialArguments({mFileSize});
    47     mPxDriver.makeKernelCall(compressionKernel, {mCompressedByteStream}, {outputStream});
     54    mPxDriver.makeKernelCall(compressionKernel, {mCompressedByteStream, mCompressedBasisBits}, {outputStream, strToBlockIndex, strToMatchPos, literalByteBuffer, tokenByteBuffer});
    4855
    4956    // --------------------------------------------------------
     
    7077    sourceK->setInitialArguments({mInputStream, mFileSize});
    7178    mPxDriver.makeKernelCall(sourceK, {}, {mCompressedByteStream});
    72 //    Kernel * s2pk = mPxDriver.addKernelInstance<S2PKernel>(iBuilder, cc::BitNumbering::LittleEndian);
    73 //    mPxDriver.makeKernelCall(s2pk, {mCompressedByteStream}, {mCompressedBasisBits});
     79    Kernel * s2pk = mPxDriver.addKernelInstance<S2PKernel>(iBuilder, cc::BitNumbering::BigEndian);
     80    mPxDriver.makeKernelCall(s2pk, {mCompressedByteStream}, {mCompressedBasisBits});
    7481
    7582}
Note: See TracChangeset for help on using the changeset viewer.