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

Last change on this file since 5298 was 5297, checked in by nmedfort, 2 years ago

Partial removal of BlockNo?

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 SegmentOrientedKernel {
22public:   
23    expand3_4Kernel(IDISA::IDISA_Builder * iBuilder);
24private:
25    void generateDoSegmentMethod(llvm::Value *doFinal, const std::vector<llvm::Value *> &producerPos) override final;
26};
27
28class radix64Kernel : public BlockOrientedKernel {
29public:
30    radix64Kernel(IDISA::IDISA_Builder * iBuilder);
31private:
32    virtual void generateDoBlockMethod() override final;
33    virtual void generateFinalBlockMethod(llvm::Value * remainingBytes) override final;
34    llvm::Value* processPackData(llvm::Value* packData) const;
35};
36
37class base64Kernel : public BlockOrientedKernel {
38public:
39    base64Kernel(IDISA::IDISA_Builder * iBuilder);
40private:
41    virtual void generateDoBlockMethod() override final;
42    virtual void generateFinalBlockMethod(llvm::Value * remainingBytes) override final;
43    llvm::Value* processPackData(llvm::Value* packData) const;
44};
45
46}
47#endif
Note: See TracBrowser for help on using the repository browser.