source: icGREP/icgrep-devel/icgrep/kernels/stdin_kernel.h @ 5398

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

Continued work on processing stdin input. Partial integration of ParabixDriver? methods into icgrep and editd. Object cache does not currently work for recursive REs.

File size: 1.2 KB
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef STDIN_KERNEL_H
6#define STDIN_KERNEL_H
7
8#include "streamset.h"
9#include "kernel.h"
10#include <llvm/IR/Type.h>
11
12namespace IDISA { class IDISA_Builder; }
13
14namespace kernel {
15
16class StdInKernel final : public SegmentOrientedKernel {
17public:
18    StdInKernel(IDISA::IDISA_Builder * iBuilder, unsigned blocksPerSegment = 1, unsigned codeUnitWidth = 8);
19    bool moduleIDisSignature() override { return true; }
20protected:
21    void generateDoSegmentMethod(llvm::Value * doFinal, const std::vector<llvm::Value *> & producerPos) override;
22private:
23    unsigned mSegmentBlocks;
24    unsigned mCodeUnitWidth;
25};
26
27class FileSourceKernel final : public SegmentOrientedKernel {
28public:
29    FileSourceKernel(IDISA::IDISA_Builder * iBuilder, llvm::Type * fileSourceTy, unsigned blocksPerSegment = 1, unsigned codeUnitWidth = 8);
30    bool moduleIDisSignature() override { return true; }
31protected:
32    void generateInitMethod() override;
33    void generateDoSegmentMethod(llvm::Value * doFinal, const std::vector<llvm::Value *> & producerPos) override;
34private:
35    unsigned mSegmentBlocks;
36    unsigned mCodeUnitWidth;
37  };
38
39}
40
41#endif
Note: See TracBrowser for help on using the repository browser.