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

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

Optimized Symbol Generation (and fixed potential bug that could allow duplicate names being constructed); made PabloKernel? extend PabloAST (temporarily removed PabloAST::getName() to avoid diamond problem); added an internal scalar to PabloKernel? struct for each Count to avoid InOut? output scalar variable problem; allowed CodeMotionPass? to move code within the same scope but across a branch statement. Began work on separating Kernels into either Block-Oriented or Segment-Oriented kernels.

File size: 991 bytes
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);
19   
20private:
21    unsigned mSegmentBlocks;
22    unsigned mCodeUnitWidth;
23 
24    void generateDoSegmentMethod() const override;
25   
26};
27   
28
29class FileSource : public SegmentOrientedKernel {
30public:
31 
32    FileSource(IDISA::IDISA_Builder * iBuilder, unsigned blocksPerSegment = 1, unsigned codeUnitWidth = 8);
33 
34private:
35 
36    void generateInitMethod() const override;
37    void generateDoSegmentMethod() const override;
38 
39private:
40    unsigned mSegmentBlocks;
41    unsigned mCodeUnitWidth;
42 
43};
44}
45
46#endif
Note: See TracBrowser for help on using the repository browser.