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

Last change on this file since 5255 was 5246, checked in by nmedfort, 3 years ago

Code clean up to enforce proper calling order of KernelBuilder? methods

File size: 845 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   
23private:
24    unsigned mCodeUnitWidth;
25 
26    void generateDoBlockMethod() const override;
27    void generateFinalBlockMethod() const override;
28    void generateDoSegmentMethod() const override;
29   
30};
31}
32
33#endif
Note: See TracBrowser for help on using the repository browser.