Ignore:
Timestamp:
May 7, 2017, 4:34:48 PM (2 years ago)
Author:
nmedfort
Message:

Continued refactoring work. PabloKernel? now abstract base type with a 'generatePabloMethod' hook to generate Pablo code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.cpp

    r5435 r5436  
    99#include <re/re_toolchain.h>
    1010#include <pablo/pablo_toolchain.h>
    11 #include <IR_Gen/idisa_builder.h>  // for IDISA_Builder
    12 #include <pablo/builder.hpp>  // for PabloBuilder
     11#include <kernels/kernel_builder.h>
     12#include <pablo/builder.hpp>
    1313#include <pablo/pe_count.h>
    1414
     
    2929}
    3030
    31 ICgrepKernelBuilder::ICgrepKernelBuilder (const std::unique_ptr<IDISA::IDISA_Builder> & iBuilder, RE * const re)
     31ICgrepKernelBuilder::ICgrepKernelBuilder (const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re)
    3232: PabloKernel(iBuilder, "",
    3333              {Binding{iBuilder->getStreamSetTy(8), "basis"}, Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"}},
     
    4444}
    4545
    46 void ICgrepKernelBuilder::prepareKernel() {
     46void ICgrepKernelBuilder::generatePabloMethod() {
    4747    re2pablo_compiler(this, regular_expression_passes(mRE));
    48     pablo_function_passes(this);
    49     PabloKernel::prepareKernel();
    5048}
    5149
     
    5755}
    5856
    59 InvertMatchesKernel::InvertMatchesKernel(const std::unique_ptr<IDISA::IDISA_Builder> & builder)
     57InvertMatchesKernel::InvertMatchesKernel(const std::unique_ptr<kernel::KernelBuilder> & builder)
    6058: BlockOrientedKernel("Invert", {Binding{builder->getStreamSetTy(1, 1), "matchedLines"}, Binding{builder->getStreamSetTy(1, 1), "lineBreaks"}}, {Binding{builder->getStreamSetTy(1, 1), "nonMatches"}}, {}, {}, {}) {
    6159    setNoTerminateAttribute(true);   
     
    6361
    6462
    65 PopcountKernel::PopcountKernel (const std::unique_ptr<IDISA::IDISA_Builder> & iBuilder)
     63PopcountKernel::PopcountKernel (const std::unique_ptr<kernel::KernelBuilder> & iBuilder)
    6664: PabloKernel(iBuilder, "Popcount",
    6765              {Binding{iBuilder->getStreamSetTy(1), "toCount"}},
Note: See TracChangeset for help on using the changeset viewer.