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

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

Update u8u16 to use new kernel infrastructure

File size: 1.9 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) :
29    KernelBuilder(iBuilder, "p2s",
30                  {StreamSetBinding{StreamSetType(8, 1), "basisBits"}},
31                  {StreamSetBinding{StreamSetType(1, 8), "byteStream"}},
32                  {}, {}, {}) {}
33   
34    void generateKernel() override;
35   
36};
37
38class p2s_16Kernel : public KernelBuilder {
39public:
40    p2s_16Kernel(IDISA::IDISA_Builder * iBuilder) :
41    KernelBuilder(iBuilder, "p2s_16",
42                  {StreamSetBinding{StreamSetType(16, 1), "basisBits"}},
43                  {StreamSetBinding{StreamSetType(1, 16), "i16Stream"}},
44                  {}, {}, {}) {}
45   
46    void generateKernel() override;
47   
48};
49
50   
51class p2s_16Kernel_withCompressedOutputKernel : public KernelBuilder {
52public:
53    p2s_16Kernel_withCompressedOutputKernel(IDISA::IDISA_Builder * iBuilder) :
54    KernelBuilder(iBuilder, "p2s_16_compress",
55                  {StreamSetBinding{StreamSetType(16, 1), "basisBits"}, StreamSetBinding{StreamSetType(1, 1), "deletionCounts"}},
56                  {StreamSetBinding{StreamSetType(1, 16), "i16Stream"}},
57                  {}, {}, {}) {}
58       
59    void generateKernel() override;
60};
61   
62}
63
64#endif
Note: See TracBrowser for help on using the repository browser.