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

Last change on this file since 5204 was 5204, checked in by nmedfort, 3 years ago

More 32-bit fixes.

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