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

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

Multi-threading support for PabloAST / PabloCompiler?. Requires unique LLVM Context / Module for each thread.

File size: 827 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() override;
27    void generateFinalBlockMethod() override;
28    void generateDoSegmentMethod() override;
29   
30};
31}
32
33#endif
Note: See TracBrowser for help on using the repository browser.