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

Last change on this file since 5267 was 5267, checked in by nmedfort, 3 years ago

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

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 generateDoBlockMethod() const override;
28    void generateDoSegmentMethod() const override;
29   
30};
31
32class radix64Kernel : public KernelBuilder {
33public:
34   
35    radix64Kernel(IDISA::IDISA_Builder * iBuilder);
36private:
37    virtual void generateDoBlockLogic(llvm::Value * self, llvm::Value * blockNo) const override;
38    virtual void generateDoBlockMethod() const override;
39    virtual void generateFinalBlockMethod() const override;
40};
41
42class base64Kernel : public KernelBuilder {
43public:
44   
45    base64Kernel(IDISA::IDISA_Builder * iBuilder);   
46private:
47    virtual void generateDoBlockLogic(llvm::Value * self, llvm::Value * blockNo) const override;
48    virtual void generateFinalBlockMethod() const override;
49    virtual void generateDoBlockMethod() const override;
50   
51};
52
53}
54#endif
Note: See TracBrowser for help on using the repository browser.