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

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

Initial work on adding types to PabloAST and mutable Var objects.

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{parabix::StreamSetType(iBuilder,dist+1, parabix::i1), "matchResults"}},
24                  {}, {}, {}, {}),
25    mEditDistance(dist),
26    mScanwordBitWidth(Triple(llvm::sys::getProcessTriple()).isArch32Bit() ? 32 : 64) {}
27       
28private:
29    void generateDoBlockMethod() override;
30    llvm::Function * generateScanWordRoutine(llvm::Module * m);
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.