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

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

radix64/base64 fixes

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