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

Last change on this file since 6089 was 6089, checked in by cameron, 10 months ago

Little-endian/big-endian bit number options, default to little-endian

File size: 2.2 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 <cc/alphabet.h>
9#include "kernel.h"  // for KernelBuilder
10
11namespace IDISA { class IDISA_Builder; }
12
13namespace kernel {
14
15class P2SKernel final : public BlockOrientedKernel {
16public:
17    P2SKernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
18    bool isCachable() const override { return true; }
19    bool hasSignature() const override { return false; }
20private:
21    cc::BitNumbering mBasisSetNumbering;
22    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
23};
24
25class P2SKernelWithCompressedOutput final : public BlockOrientedKernel {
26public:
27    P2SKernelWithCompressedOutput(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
28    bool isCachable() const override { return true; }
29    bool hasSignature() const override { return false; }
30private:
31    cc::BitNumbering mBasisSetNumbering;
32    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
33};
34
35class P2S16Kernel final : public BlockOrientedKernel {
36public:
37    P2S16Kernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
38    bool isCachable() const override { return true; }
39    bool hasSignature() const override { return false; }
40private:
41    cc::BitNumbering mBasisSetNumbering;
42    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
43};
44   
45class P2S16KernelWithCompressedOutput final : public BlockOrientedKernel {
46public:
47    P2S16KernelWithCompressedOutput(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
48    bool isCachable() const override { return true; }
49    bool hasSignature() const override { return false; }
50private:
51    cc::BitNumbering mBasisSetNumbering;
52    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
53};
54   
55}
56
57#endif
Note: See TracBrowser for help on using the repository browser.