Ignore:
Timestamp:
Jul 20, 2016, 1:15:01 PM (3 years ago)
Author:
cameron
Message:

Kernel system restructuring progress

Location:
icGREP/icgrep-devel/icgrep/kernels
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/interface.h

    r5100 r5102  
    2121
    2222struct StreamSetBinding {
    23     parabix::StreamSetType ssType;
     23    parabix::StreamSetBuffer & ssType;
    2424    std::string ssName;
    2525};
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5100 r5102  
    3939    addScalar(iBuilder->getInt64Ty(), blockNoScalar);
    4040    for (auto sSet : mStreamSetInputs) {
    41         mScalarInputs.push_back(ScalarBinding{PointerType::get(sSet.ssType.getStreamSetBlockType(iBuilder), 0), sSet.ssName + basePtrSuffix});
     41        mScalarInputs.push_back(ScalarBinding{PointerType::get(sSet.ssType.getStreamSetBlockType(), 0), sSet.ssName + basePtrSuffix});
    4242        mScalarInputs.push_back(ScalarBinding{iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix});
    4343        //Or possibly add as internal state, with code in init function:  addScalar(iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix);
    4444    }
    4545    for (auto sSet : mStreamSetOutputs) {
    46         mScalarInputs.push_back(ScalarBinding{PointerType::get(sSet.ssType.getStreamSetBlockType(iBuilder), 0), sSet.ssName + basePtrSuffix});
     46        mScalarInputs.push_back(ScalarBinding{PointerType::get(sSet.ssType.getStreamSetBlockType(), 0), sSet.ssName + basePtrSuffix});
    4747        mScalarInputs.push_back(ScalarBinding{iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix});
    4848        //Or possibly add as internal state, with code in init function:  addScalar(iBuilder->getInt64Ty(), sSet.ssName + blkMaskSuffix);
  • icGREP/icgrep-devel/icgrep/kernels/p2s_kernel.h

    r5079 r5102  
    2626class p2sKernel : public KernelBuilder {
    2727public:
    28     p2sKernel(IDISA::IDISA_Builder * iBuilder) :
     28    p2sKernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& byteStream) :
    2929    KernelBuilder(iBuilder, "p2s",
    30                   {StreamSetBinding{StreamSetType(8, 1), "basisBits"}},
    31                   {StreamSetBinding{StreamSetType(1, 8), "byteStream"}},
     30                  {StreamSetBinding{basisBits, "basisBits"}},
     31                  {StreamSetBinding{byteStream, "byteStream"}},
    3232                  {}, {}, {}) {}
    3333   
     
    3939class p2sKernel_withCompressedOutput : public KernelBuilder {
    4040public:
    41     p2sKernel_withCompressedOutput(IDISA::IDISA_Builder * iBuilder) :
     41    p2sKernel_withCompressedOutput(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& deletionCounts, parabix::StreamSetBuffer& byteStream) :
    4242    KernelBuilder(iBuilder, "p2s_compress",
    43                   {StreamSetBinding{StreamSetType(8, 1), "basisBits"}, StreamSetBinding{StreamSetType(1, 1), "deletionCounts"}},
    44                   {StreamSetBinding{StreamSetType(1, 8), "byteStream"}},
     43                  {StreamSetBinding{basisBits, "basisBits"}, StreamSetBinding{deletionCounts, "deletionCounts"}},
     44                  {StreamSetBinding{byteStream, "byteStream"}},
    4545                  {}, {}, {}) {}
    4646   
     
    5353class p2s_16Kernel : public KernelBuilder {
    5454public:
    55     p2s_16Kernel(IDISA::IDISA_Builder * iBuilder) :
     55    p2s_16Kernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& i16Stream) :
    5656    KernelBuilder(iBuilder, "p2s_16",
    57                   {StreamSetBinding{StreamSetType(16, 1), "basisBits"}},
    58                   {StreamSetBinding{StreamSetType(1, 16), "i16Stream"}},
     57                  {StreamSetBinding{basisBits, "basisBits"}},
     58                  {StreamSetBinding{i16Stream, "i16Stream"}},
    5959                  {}, {}, {}) {}
    6060   
     
    6767class p2s_16Kernel_withCompressedOutput : public KernelBuilder {
    6868public:
    69     p2s_16Kernel_withCompressedOutput(IDISA::IDISA_Builder * iBuilder) :
     69    p2s_16Kernel_withCompressedOutput(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& deletionCounts, parabix::StreamSetBuffer& i16Stream) :
    7070    KernelBuilder(iBuilder, "p2s_16_compress",
    71                   {StreamSetBinding{StreamSetType(16, 1), "basisBits"}, StreamSetBinding{StreamSetType(1, 1), "deletionCounts"}},
    72                   {StreamSetBinding{StreamSetType(1, 16), "i16Stream"}},
     71                  {StreamSetBinding{basisBits, "basisBits"}, StreamSetBinding{deletionCounts, "deletionCounts"}},
     72                  {StreamSetBinding{i16Stream, "i16Stream"}},
    7373                  {}, {}, {}) {}
    7474       
  • icGREP/icgrep-devel/icgrep/kernels/s2p_kernel.cpp

    r5100 r5102  
    171171   
    172172   
    173     Value * byteStreamBlock_ptr = mByteStream.getStreamSetBlockPointer(byteStreamBase_ptr, blockNo);
    174     Value * basisBitsBlock_ptr = mBasisBits.getStreamSetBlockPointer(basisBitsBase_ptr, blockNo);
     173    Value * byteStreamBlock_ptr = mStreamSetInputs[0].ssType.getStreamSetBlockPointer(byteStreamBase_ptr, blockNo);
     174    Value * basisBitsBlock_ptr = mStreamSetOutputs[0].ssType.getStreamSetBlockPointer(basisBitsBase_ptr, blockNo);
    175175   
    176176    Value * s_bytepack[8];
  • icGREP/icgrep-devel/icgrep/kernels/s2p_kernel.h

    r5100 r5102  
    2727    s2pKernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& byteStream, parabix::StreamSetBuffer& basisBits) :
    2828    KernelBuilder(iBuilder, "s2p",
    29                   {StreamSetBinding{parabix::StreamSetType(1, parabix::i8), "byteStream"}},
    30                   {StreamSetBinding{parabix::StreamSetType(8, parabix::i1), "basisBits"}},
    31                   {}, {}, {}), mByteStream(byteStream), mBasisBits(basisBits) {}
     29                  {StreamSetBinding{byteStream, "byteStream"}},
     30                  {StreamSetBinding{basisBits, "basisBits"}},
     31                  {}, {}, {}) {}
    3232   
    3333   
    3434private:
    35     parabix::StreamSetBuffer& mByteStream;
    36     parabix::StreamSetBuffer& mBasisBits;
    3735    void generateDoBlockMethod() override;
    3836    void generateFinalBlockMethod() override;
  • icGREP/icgrep-devel/icgrep/kernels/scanmatchgen.h

    r5100 r5102  
    1717class scanMatchKernel : public KernelBuilder {
    1818public:
    19     scanMatchKernel(IDISA::IDISA_Builder * iBuilder, unsigned scanwordBitWidth, bool isNameExpression) :
     19    scanMatchKernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& matchResults, unsigned scanwordBitWidth, bool isNameExpression) :
    2020    KernelBuilder(iBuilder, "scanMatch",
    21                   {StreamSetBinding{parabix::StreamSetType(2, parabix::i1), "matchResults"}},
     21                  {StreamSetBinding{matchResults, "matchResults"}},
    2222                    {},
    2323                    {ScalarBinding{iBuilder->getInt8PtrTy(), "FileBuf"}, ScalarBinding{iBuilder->getInt64Ty(), "FileSize"}, ScalarBinding{iBuilder->getInt64Ty(), "FileIdx"}},
Note: See TracChangeset for help on using the changeset viewer.