source: icGREP/icgrep-devel/icgrep/kernels/s2p_kernel.h @ 5100

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

Buffer class hierarchy; s2p kernel demonstrates specialization for different buffer strategies

File size: 1.1 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 S2P_KERNEL_H
6#define S2P_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
18class KernelBuilder;
19
20//void generateS2P_16Kernel(llvm::Module *, IDISA::IDISA_Builder * iBuilder, KernelBuilder * kBuilder);
21
22
23
24class s2pKernel : public KernelBuilder {
25public:
26   
27    s2pKernel(IDISA::IDISA_Builder * iBuilder, parabix::StreamSetBuffer& byteStream, parabix::StreamSetBuffer& basisBits) :
28    KernelBuilder(iBuilder, "s2p",
29                  {StreamSetBinding{parabix::StreamSetType(1, parabix::i8), "byteStream"}},
30                  {StreamSetBinding{parabix::StreamSetType(8, parabix::i1), "basisBits"}},
31                  {}, {}, {}), mByteStream(byteStream), mBasisBits(basisBits) {}
32   
33   
34private:
35    parabix::StreamSetBuffer& mByteStream;
36    parabix::StreamSetBuffer& mBasisBits;
37    void generateDoBlockMethod() override;
38    void generateFinalBlockMethod() override;
39   
40};
41
42   
43
44}
45#endif
Note: See TracBrowser for help on using the repository browser.