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

Last change on this file since 5256 was 5256, checked in by cameron, 11 months ago

noTerminate attribute for stdout kernel

File size: 889 bytes
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 "streamset.h"
9#include "kernel.h"
10#include <llvm/IR/Type.h>
11
12namespace IDISA { class IDISA_Builder; }
13
14namespace kernel {
15
16class StdOutKernel : public KernelBuilder {
17public:
18    StdOutKernel(IDISA::IDISA_Builder * iBuilder, unsigned codeUnitWidth) :
19    KernelBuilder(iBuilder, "stdout",
20                  {Binding{iBuilder->getStreamSetTy(1, codeUnitWidth), "codeUnitBuffer"}}, {}, {}, {}, {}),
21    mCodeUnitWidth(codeUnitWidth) {
22        setNoTerminateAttribute(true);
23    }
24   
25private:
26    unsigned mCodeUnitWidth;
27 
28    void generateDoBlockMethod() const override;
29    void generateFinalBlockMethod() const override;
30    void generateDoSegmentMethod() const override;
31   
32};
33}
34
35#endif
Note: See TracBrowser for help on using the repository browser.