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/wc.cpp

    r5435 r5436  
    1717#include <cc/cc_compiler.h>
    1818#include <pablo/pablo_kernel.h>
    19 #include <IR_Gen/idisa_builder.h>
     19#include <kernels/kernel_builder.h>
    2020#include <IR_Gen/idisa_target.h>
    2121#include <kernels/streamset.h>
     
    8484class WordCountKernel final: public pablo::PabloKernel {
    8585public:
    86     WordCountKernel(const std::unique_ptr<IDISA::IDISA_Builder> & b);
     86    WordCountKernel(const std::unique_ptr<kernel::KernelBuilder> & b);
    8787    bool isCachable() const override { return true; }
    8888    bool moduleIDisSignature() const override { return true; }
    89     void prepareKernel() override;
     89protected:
     90    void generatePabloMethod() override;
    9091};
    9192
    92 WordCountKernel::WordCountKernel (const std::unique_ptr<IDISA::IDISA_Builder> & b)
     93WordCountKernel::WordCountKernel (const std::unique_ptr<kernel::KernelBuilder> & b)
    9394: PabloKernel(b, "wc",
    9495    {Binding{b->getStreamSetTy(8, 1), "u8bit"}},
     
    99100}
    100101
    101 void WordCountKernel::prepareKernel() {
     102void WordCountKernel::generatePabloMethod() {
    102103
    103104    //  input: 8 basis bit streams
     
    133134        pb.createAssign(cc, pb.createCount(u8Begin));
    134135    }
    135     pablo_function_passes(this);
    136     PabloKernel::prepareKernel();
    137136}
    138137
Note: See TracChangeset for help on using the changeset viewer.