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

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

Removed 'function' and 'self' parameters from generateXXXMethod() functions.

File size: 1.1 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 : public SegmentOrientedKernel {
17public:
18    StdInKernel(IDISA::IDISA_Builder * iBuilder, unsigned blocksPerSegment = 1, unsigned codeUnitWidth = 8);
19protected:
20    void generateDoSegmentMethod(llvm::Value * doFinal, const std::vector<llvm::Value *> & producerPos) override final;
21private:
22    unsigned mSegmentBlocks;
23    unsigned mCodeUnitWidth;
24};
25   
26
27class FileSource : public SegmentOrientedKernel {
28public:
29    FileSource(IDISA::IDISA_Builder * iBuilder, unsigned blocksPerSegment = 1, unsigned codeUnitWidth = 8);
30protected:
31    void generateInitMethod() override final;
32    void generateDoSegmentMethod(llvm::Value * doFinal, const std::vector<llvm::Value *> & producerPos) override final;
33private:
34    unsigned mSegmentBlocks;
35    unsigned mCodeUnitWidth;
36 
37};
38
39}
40
41#endif
Note: See TracBrowser for help on using the repository browser.