source: icGREP/icgrep-devel/icgrep/kernels/stdout_kernel.h

Last change on this file was 6241, checked in by nmedfort, 7 months ago

Bug fix for kernel state malloc; minor optimization of pipeline state; grep printing bug fix

File size: 1.2 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 STDOUT_KERNEL_H
6#define STDOUT_KERNEL_H
7
8#include "kernel.h"
9
10namespace IDISA { class IDISA_Builder; }
11
12namespace kernel {
13
14class StdOutKernel final : public SegmentOrientedKernel {
15public:
16    StdOutKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, StreamSet * codeUnitBuffer);
17private:
18    void generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> & b) override;
19    void generateFinalizeMethod(const std::unique_ptr<KernelBuilder> & b) override;
20private:
21    const unsigned mCodeUnitWidth;
22
23};
24
25class FileSink final : public SegmentOrientedKernel {
26public:
27    FileSink(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, Scalar * outputFileName, StreamSet * codeUnitBuffer);
28protected:
29    void generateInitializeMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
30    void generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> & b) override;
31    void generateFinalizeMethod(const std::unique_ptr<KernelBuilder> & b) override;
32private:
33    const unsigned mCodeUnitWidth;
34
35};
36}
37
38
39
40#endif
Note: See TracBrowser for help on using the repository browser.