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

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

Partial removal of BlockNo?

File size: 1.4 KB
RevLine 
[5216]1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
[5219]5#ifndef RADIX64_H
6#define RADIX64_H
[5216]7
8#include "kernel.h"
9
10namespace llvm { class Module; }
[5260]11namespace llvm { class Value; }
[5216]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 
[5283]21class expand3_4Kernel : public SegmentOrientedKernel {
[5285]22public:   
[5261]23    expand3_4Kernel(IDISA::IDISA_Builder * iBuilder);
[5216]24private:
[5292]25    void generateDoSegmentMethod(llvm::Value *doFinal, const std::vector<llvm::Value *> &producerPos) override final;
[5216]26};
27
[5283]28class radix64Kernel : public BlockOrientedKernel {
[5219]29public:
[5261]30    radix64Kernel(IDISA::IDISA_Builder * iBuilder);
[5219]31private:
[5297]32    virtual void generateDoBlockMethod() override final;
33    virtual void generateFinalBlockMethod(llvm::Value * remainingBytes) override final;
[5288]34    llvm::Value* processPackData(llvm::Value* packData) const;
[5219]35};
[5216]36
[5283]37class base64Kernel : public BlockOrientedKernel {
[5219]38public:
[5285]39    base64Kernel(IDISA::IDISA_Builder * iBuilder);
[5219]40private:
[5297]41    virtual void generateDoBlockMethod() override final;
42    virtual void generateFinalBlockMethod(llvm::Value * remainingBytes) override final;
[5288]43    llvm::Value* processPackData(llvm::Value* packData) const;
[5219]44};
45
[5216]46}
47#endif
Note: See TracBrowser for help on using the repository browser.