Ignore:
Timestamp:
Jun 27, 2016, 9:43:17 AM (3 years ago)
Author:
cameron
Message:

Updates for kernels with variable output length; stdout kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/stdout_kernel.h

    r5007 r5076  
    66#define STDOUT_KERNEL_H
    77
    8 namespace llvm { class Module; }
     8#include "streamset.h"
     9#include "kernel.h"
     10#include <llvm/IR/Type.h>
    911
    1012namespace IDISA { class IDISA_Builder; }
     
    1214namespace kernel {
    1315
    14 class KernelBuilder;
    15 
    16     void generateStdOutKernel(llvm::Module *, IDISA::IDISA_Builder * iBuilder, KernelBuilder * kBuilder, unsigned fw = 8);
     16class stdOutKernel : public KernelBuilder {
     17public:
     18    stdOutKernel(IDISA::IDISA_Builder * iBuilder, unsigned codeUnitWidth) :
     19    KernelBuilder(iBuilder, "stdout",
     20                  {StreamSetBinding{StreamSetType(1, codeUnitWidth), "bufferPtr"}}, {}, {}, {}, {}) {
     21        mStreamType = PointerType::get(StreamSetType(1, codeUnitWidth).getStreamSetBlockType(iBuilder), 0);
     22        mScalarInputs = {ScalarBinding{mStreamType , "bufferBasePtr"}, ScalarBinding{mStreamType, "bufferFinalBlockPtr"}};
     23    }
     24   
     25private:
     26    void prepareKernel() override;
     27    void generateDoBlockMethod() override;
     28    void generateFinalBlockMethod() override;
     29   
     30    llvm::Type * mStreamType;
     31};
    1732}
    1833
Note: See TracChangeset for help on using the changeset viewer.