source: icGREP/icgrep-devel/icgrep/kernels/radix64.h @ 5261

Last change on this file since 5261 was 5261, checked in by cameron, 9 months ago

Move responsibility for ProducedItemCount? into doSegment unless overridden

File size: 1.5 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 RADIX64_H
6#define RADIX64_H
7
8#include "streamset.h"
9#include "interface.h"
10#include "kernel.h"
11
12namespace llvm { class Module; }
13namespace llvm { class Value; }
14
15namespace IDISA { class IDISA_Builder; }
16
17namespace kernel {
18
19/*  expand3_4 transforms a byte sequence by duplicating every third byte.
20    Each 3 bytes of the input abc produces a 4 byte output abcc.   
21    This is a useful preparatory transformation in various radix-64 encodings. */
22 
23class expand3_4Kernel : public KernelBuilder {
24public:
25   
26    expand3_4Kernel(IDISA::IDISA_Builder * iBuilder);
27   
28private:
29    void generateDoBlockMethod() const override;
30    void generateDoSegmentMethod() const override;
31   
32};
33
34class radix64Kernel : public KernelBuilder {
35public:
36   
37    radix64Kernel(IDISA::IDISA_Builder * iBuilder);
38private:
39    virtual void generateDoBlockLogic(llvm::Value * self, llvm::Value * blockNo) const override;
40    virtual void generateDoBlockMethod() const override;
41    virtual void generateFinalBlockMethod() const override;
42};
43
44class base64Kernel : public KernelBuilder {
45public:
46   
47    base64Kernel(IDISA::IDISA_Builder * iBuilder);   
48private:
49    virtual void generateDoBlockLogic(llvm::Value * self, llvm::Value * blockNo) const override;
50    virtual void generateFinalBlockMethod() const override;
51    virtual void generateDoBlockMethod() const override;
52   
53};
54
55}
56#endif
Note: See TracBrowser for help on using the repository browser.