Ignore:
Timestamp:
Jun 14, 2016, 7:02:17 PM (3 years ago)
Author:
cameron
Message:

scanmatch kernel using new infrastructure

File:
1 edited

Legend:

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

    r4974 r5055  
    66#define SCANMATCHGEN_H
    77
    8 namespace llvm { class Module; }
     8#include "streamset.h"
     9#include "interface.h"
     10
     11namespace llvm { class Module; class Function;}
    912
    1013namespace IDISA { class IDISA_Builder; }
     
    1619void generateScanMatch(llvm::Module * m, IDISA::IDISA_Builder * iBuilder, unsigned scanWordBitWidth, KernelBuilder * kBuilder, bool isNameExpression);
    1720
     21   
     22   
     23class scanMatchKernel : public KernelInterface {
     24public:
     25    scanMatchKernel(IDISA::IDISA_Builder * iBuilder, unsigned scanwordBitWidth, bool isNameExpression) :
     26    KernelInterface(iBuilder, "scanMatch",
     27                    {StreamSetBinding{StreamSetType(2, 1), "matchResults"}},
     28                    {},
     29                    {ScalarBinding{iBuilder->getInt8PtrTy(), "FileBuf"}, ScalarBinding{iBuilder->getInt64Ty(), "FileSize"}, ScalarBinding{iBuilder->getInt64Ty(), "FileIdx"}},
     30                    {},
     31                    {ScalarBinding{iBuilder->getInt64Ty(), "BlockNo"}, ScalarBinding{iBuilder->getInt64Ty(), "LineStart"}, ScalarBinding{iBuilder->getInt64Ty(), "LineNum"}}),
     32
     33    mScanwordBitWidth(scanwordBitWidth),
     34    mIsNameExpression(isNameExpression) {}
     35       
     36    std::unique_ptr<llvm::Module> createKernelModule() override;
     37
     38private:
     39    llvm::Function * generateScanWordRoutine(llvm::Module * m);
     40       
     41    unsigned mScanwordBitWidth;
     42    bool mIsNameExpression;
     43};
    1844}
    1945
Note: See TracChangeset for help on using the changeset viewer.