Ignore:
Timestamp:
Jun 21, 2017, 2:54:32 PM (2 years ago)
Author:
lindanl
Message:

cache editd kernel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/editd/editd.cpp

    r5514 r5523  
    4646static cl::opt<int> optPosition("opt-pos", cl::desc("Optimize position"), cl::init(8));
    4747static cl::opt<int> stepSize("step-size", cl::desc("Step Size"), cl::init(3));
    48 static cl::opt<int> prefixLen("prefix", cl::desc("Prefix length"), cl::init(4));
     48static cl::opt<int> prefixLen("prefix", cl::desc("Prefix length"), cl::init(3));
    4949static cl::opt<bool> ShowPositions("display", cl::desc("Display the match positions."), cl::init(false));
    5050
     
    163163public:
    164164    PatternKernel(const std::unique_ptr<kernel::KernelBuilder> & b, const std::vector<std::string> & patterns);
     165    std::string makeSignature(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
     166    bool isCachable() const override { return true;}
    165167protected:
    166168    void generatePabloMethod() override;
     
    170172
    171173PatternKernel::PatternKernel(const std::unique_ptr<kernel::KernelBuilder> & b, const std::vector<std::string> & patterns)
    172 : PabloKernel(b, "editd", {{b->getStreamSetTy(4), "pat"}}, {{b->getStreamSetTy(editDistance + 1), "E"}})
     174: PabloKernel(b, std::string(patterns[0]), {{b->getStreamSetTy(4), "pat"}}, {{b->getStreamSetTy(editDistance + 1), "E"}})
    173175, mPatterns(patterns) {
     176}
     177
     178std::string PatternKernel::makeSignature(const std::unique_ptr<kernel::KernelBuilder> &) {
     179    return getName();
    174180}
    175181
Note: See TracChangeset for help on using the changeset viewer.