Ignore:
Timestamp:
Feb 9, 2016, 4:06:24 PM (3 years ago)
Author:
lindanl
Message:

Update kernel builder.

File:
1 edited

Legend:

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

    r4924 r4926  
    2525
    2626using namespace llvm;
    27        
     27
     28typedef Value* valptr;
     29
     30struct Inputs {
     31    std::vector<std::vector<valptr>> streams;
     32    std::vector<valptr> scalars;
     33};
     34
     35struct Outputs {
     36    std::vector<valptr *> streams;
     37    std::vector<valptr> accums;
     38};
     39
    2840class KernelBuilder{
    2941public:
     
    3749        void addKernelInputStream(int fw, std::string name);
    3850        void addKernelInputScalar(Type * t, std::string name);
    39         std::vector<std::vector<Value *>> openDoBlock();
    40         void closeDoBlock(Value * result[][8]);
     51    Function* CreateDoBlockFunction();
     52        struct Inputs openDoBlock();
     53        void closeDoBlock(struct Outputs);
    4154        void finalizeMethods();
    4255        void generateKernelInstance(int buffersize);
     
    4558    int getSegmentBlocks();
    4659
     60    void changeKernelInternalState(int idx, Value * stateValue);
     61    Value * getKernelInternalState(int idx);
     62    Value * getKernelInternalStatePtr(int idx);
     63
     64private:
    4765        Module *                            mMod;
    4866    IDISA::IDISA_Builder *              iBuilder;
Note: See TracChangeset for help on using the changeset viewer.