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

Last change on this file since 5267 was 5267, checked in by nmedfort, 2 years ago

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

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 "grep_type.h"  // for GrepType
9#include "kernel.h"     // for KernelBuilder
10namespace IDISA { class IDISA_Builder; }  // lines 16-16
11namespace llvm { class Function; }  // lines 14-14
12namespace llvm { class Module; }  // lines 14-14
13
14namespace kernel {
15   
16class ScanMatchKernel : public KernelBuilder {
17public:
18    ScanMatchKernel(IDISA::IDISA_Builder * iBuilder, GrepType grepType) :
19    KernelBuilder(iBuilder, "scanMatch",
20                  {Binding{iBuilder->getStreamSetTy(2, 1), "matchResults"}},
21                    {}, 
22                    {Binding{iBuilder->getInt8PtrTy(), "FileBuf"}, Binding{iBuilder->getSizeTy(), "FileSize"}, Binding{iBuilder->getSizeTy(), "FileIdx"}}, 
23                    {}, 
24                    {Binding{iBuilder->getSizeTy(), "BlockNo"}, Binding{iBuilder->getSizeTy(), "LineStart"}, Binding{iBuilder->getSizeTy(), "LineNum"}}),
25
26    mGrepType(grepType) {}
27       
28private:
29
30    void generateDoBlockMethod() const override;
31
32    llvm::Function * generateScanWordRoutine(llvm::Module * m) const;
33
34private:
35    GrepType mGrepType;
36};
37}
38
39#endif // SCANMATCHGEN_H
Note: See TracBrowser for help on using the repository browser.