Ignore:
Timestamp:
Aug 14, 2018, 4:40:55 AM (12 months ago)
Author:
xwa163
Message:

Fix bug of multiplexing grep kernel cause by cacheable (Since two multiplexed RE with them same representation “mpx_1” may have different alphabets, while for now GrepKernel? use the string representation of RE AST as cache key)

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

Legend:

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

    r6133 r6147  
    230230: mRE(re_ast)
    231231, mSignature(Printer_RE::PrintRE(mRE)) {
    232    
     232
    233233}
    234234
     
    259259, mExternals(externals)
    260260, mAlphabets(alphabets)
    261 , mBasisSetNumbering(basisSetNumbering) {
     261, mBasisSetNumbering(basisSetNumbering)
     262, mIsCachable(true) {
    262263}
    263264
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.h

    r6133 r6147  
    6464    ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, re::RE * const re_ast, std::vector<std::string> externals, std::vector<cc::Alphabet *> alphabets = {}, cc::BitNumbering basisSetNumbering = cc::BitNumbering::LittleEndian);
    6565    std::string makeSignature(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    66     bool isCachable() const override { return true; }
     66    bool isCachable() const override { return mIsCachable; }
     67    void setCachable(bool c){mIsCachable = c;}
    6768protected:
    6869    void generatePabloMethod() override;
     
    7071    std::vector<cc::Alphabet *> mAlphabets;
    7172    cc::BitNumbering mBasisSetNumbering;
     73private:
     74    bool mIsCachable;
    7275};
    7376
Note: See TracChangeset for help on using the changeset viewer.