source: icGREP/icgrep-devel/icgrep/editd/editdscan_kernel.h @ 5246

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

Code clean up to enforce proper calling order of KernelBuilder? methods

File size: 1.0 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 EDITDSCAN_KERNEL_H
6#define EDITDSCAN_KERNEL_H
7
8#include <kernels/streamset.h>
9#include <kernels/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 editdScanKernel : public KernelBuilder {
20public:
21    editdScanKernel(IDISA::IDISA_Builder * iBuilder, unsigned dist) :
22    KernelBuilder(iBuilder, "scanMatch",
23                  {Binding{iBuilder->getStreamSetTy(dist + 1), "matchResults"}},
24                  {}, {}, {}, {}),
25    mEditDistance(dist),
26    mScanwordBitWidth(iBuilder->getSizeTy()->getBitWidth()) {}
27       
28private:
29    void generateDoBlockMethod() const override;
30    llvm::Function * generateScanWordRoutine(llvm::Module * m) const;
31       
32    unsigned mEditDistance;
33    unsigned mScanwordBitWidth;
34};
35
36}
37
38#endif // EDITDSCAN_KERNEL_H
Note: See TracBrowser for help on using the repository browser.