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

Last change on this file since 6184 was 6184, checked in by nmedfort, 9 months ago

Initial version of PipelineKernel? + revised StreamSet? model.

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/kernel.h>
9
10namespace llvm { class Module; }
11
12namespace IDISA { class IDISA_Builder; }
13
14namespace kernel {
15
16class editdCPUKernel : public BlockOrientedKernel {
17public:
18
19    editdCPUKernel(const std::unique_ptr<kernel::KernelBuilder> & b,
20                   const unsigned patternLen, const unsigned groupSize,
21                   Scalar * const pattStream,
22                   StreamSet * const CCStream, StreamSet * const ResultStream);
23   
24
25private:
26    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & idb) override;
27    void generateFinalBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & idb, llvm::Value * remainingBytes) override;
28    void bitblock_advance_ci_co(const std::unique_ptr<KernelBuilder> & idb, llvm::Value * val, unsigned shift, llvm::Value * stideCarryArr, unsigned carryIdx, std::vector<std::vector<llvm::Value *>> & adv, std::vector<std::vector<int>> & calculated, int i, int j) const;
29    void reset_to_zero(std::vector<std::vector<int>> & calculated);
30    unsigned mEditDistance;
31    unsigned mPatternLen;
32    unsigned mGroupSize;
33   
34};
35
36   
37
38}
39#endif
Note: See TracBrowser for help on using the repository browser.