source: icGREP/icgrep-devel/icgrep/kernels/scanmatchgen.h @ 5102

Last change on this file since 5102 was 5102, checked in by cameron, 3 years ago

Kernel system restructuring progress

File size: 1.3 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef SCANMATCHGEN_H
6#define SCANMATCHGEN_H
7
8#include "streamset.h"
9#include "kernel.h"
10
11namespace llvm { class Module; class Function;}
12
13namespace IDISA { class IDISA_Builder; }
14
15namespace kernel {
16   
17class scanMatchKernel : public KernelBuilder {
18public:
19    scanMatchKernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& matchResults, unsigned scanwordBitWidth, bool isNameExpression) :
20    KernelBuilder(iBuilder, "scanMatch",
21                  {StreamSetBinding{matchResults, "matchResults"}}, 
22                    {}, 
23                    {ScalarBinding{iBuilder->getInt8PtrTy(), "FileBuf"}, ScalarBinding{iBuilder->getInt64Ty(), "FileSize"}, ScalarBinding{iBuilder->getInt64Ty(), "FileIdx"}}, 
24                    {}, 
25                    {ScalarBinding{iBuilder->getInt64Ty(), "BlockNo"}, ScalarBinding{iBuilder->getInt64Ty(), "LineStart"}, ScalarBinding{iBuilder->getInt64Ty(), "LineNum"}}),
26
27    mScanwordBitWidth(scanwordBitWidth),
28    mIsNameExpression(isNameExpression) {}
29       
30private:
31    void generateDoBlockMethod() override;
32    llvm::Function * generateScanWordRoutine(llvm::Module * m);
33       
34    unsigned mScanwordBitWidth;
35    bool mIsNameExpression;
36};
37}
38
39#endif // SCANMATCHGEN_H
Note: See TracBrowser for help on using the repository browser.