source: icGREP/icgrep-devel/icgrep/kernels/p2s_kernel.h @ 5102

Last change on this file since 5102 was 5102, checked in by cameron, 3 years ago

Kernel system restructuring progress

File size: 2.8 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 P2S_KERNEL_H
6#define P2S_KERNEL_H
7
8#include "streamset.h"
9#include "interface.h"
10#include "kernel.h"
11
12namespace llvm { class Module; }
13
14namespace IDISA { class IDISA_Builder; }
15
16namespace kernel {
17
18
19//    void generateP2SKernel(llvm::Module *, IDISA::IDISA_Builder * iBuilder, KernelBuilder * kBuilder);
20
21//    void generateP2S_16Kernel(llvm::Module *, IDISA::IDISA_Builder * iBuilder, KernelBuilder * kBuilder);
22
23//    void generateP2S_16_withCompressedOutputKernel(llvm::Module *, IDISA::IDISA_Builder * iBuilder, KernelBuilder * kBuilder);
24   
25   
26class p2sKernel : public KernelBuilder {
27public:
28    p2sKernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& byteStream) :
29    KernelBuilder(iBuilder, "p2s",
30                  {StreamSetBinding{basisBits, "basisBits"}},
31                  {StreamSetBinding{byteStream, "byteStream"}},
32                  {}, {}, {}) {}
33   
34private:
35    void generateDoBlockMethod() override;
36   
37};
38
39class p2sKernel_withCompressedOutput : public KernelBuilder {
40public:
41    p2sKernel_withCompressedOutput(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& deletionCounts, parabix::StreamSetBuffer& byteStream) :
42    KernelBuilder(iBuilder, "p2s_compress",
43                  {StreamSetBinding{basisBits, "basisBits"}, StreamSetBinding{deletionCounts, "deletionCounts"}},
44                  {StreamSetBinding{byteStream, "byteStream"}},
45                  {}, {}, {}) {}
46   
47private:
48    void prepareKernel() override;
49    void generateDoBlockMethod() override;
50};
51   
52
53class p2s_16Kernel : public KernelBuilder {
54public:
55    p2s_16Kernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& i16Stream) :
56    KernelBuilder(iBuilder, "p2s_16",
57                  {StreamSetBinding{basisBits, "basisBits"}},
58                  {StreamSetBinding{i16Stream, "i16Stream"}},
59                  {}, {}, {}) {}
60   
61private:
62    void generateDoBlockMethod() override;
63   
64};
65
66   
67class p2s_16Kernel_withCompressedOutput : public KernelBuilder {
68public:
69    p2s_16Kernel_withCompressedOutput(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& basisBits, parabix::StreamSetBuffer& deletionCounts, parabix::StreamSetBuffer& i16Stream) :
70    KernelBuilder(iBuilder, "p2s_16_compress",
71                  {StreamSetBinding{basisBits, "basisBits"}, StreamSetBinding{deletionCounts, "deletionCounts"}},
72                  {StreamSetBinding{i16Stream, "i16Stream"}},
73                  {}, {}, {}) {}
74       
75private:
76    void prepareKernel() override;
77    void generateDoBlockMethod() override;
78};
79   
80}
81
82#endif
Note: See TracBrowser for help on using the repository browser.