source: icGREP/icgrep-devel/icgrep/editd/editd_cpu_kernel.h @ 5212

Last change on this file since 5212 was 5212, checked in by lindanl, 2 years ago

editd for GPU.

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 EDITD_CPU_KERNEL_H
6#define EDITD_CPU_KERNEL_H
7
8#include <kernels/streamset.h>
9#include <kernels/interface.h>
10#include <kernels/kernel.h>
11
12namespace llvm { class Module; }
13
14namespace IDISA { class IDISA_Builder; }
15
16namespace kernel {
17
18class editdCPUKernel : public KernelBuilder {
19public:
20   
21    editdCPUKernel(IDISA::IDISA_Builder * iBuilder, unsigned dist, unsigned pattLen) :
22    KernelBuilder(iBuilder, "editd_cpu",
23                  {Binding{parabix::StreamSetType(iBuilder, 4, 1), "CCStream"}},
24                  {Binding{parabix::StreamSetType(iBuilder, dist+1, 1), "ResultStream"}},
25                  {Binding{PointerType::get(iBuilder->getInt8Ty(), 1), "pattStream"}, 
26                  Binding{PointerType::get(ArrayType::get(iBuilder->getBitBlockType(), pattLen * (dist + 1) * 4), 0), "srideCarry"}},
27                  {},
28                  {Binding{iBuilder->getBitBlockType(), "EOFmask"}}),
29    mEditDistance(dist),
30    mPatternLen(pattLen){}
31   
32   
33private:
34    void generateDoBlockMethod() override;
35    void generateFinalBlockMethod() override;
36    unsigned mEditDistance;
37    unsigned mPatternLen;
38   
39};
40
41   
42
43}
44#endif
Note: See TracBrowser for help on using the repository browser.