Ignore:
Timestamp:
Jan 29, 2017, 12:05:00 PM (2 years ago)
Author:
nmedfort
Message:

Continuation of work to simplify Kernel writing

File:
1 edited

Legend:

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

    r5285 r5286  
    118118    virtual void prepareKernel();
    119119       
    120     virtual void generateInitMethod() const;
    121    
    122     virtual void generateDoSegmentMethod() const = 0;
     120    virtual void generateInitMethod(llvm::Function * initFunction, llvm::Value * self) const;
     121   
     122    virtual void generateDoSegmentMethod(llvm::Function * function, llvm::Value * self, llvm::Value * doFinal, const std::vector<llvm::Value *> & producerPos) const = 0;
    123123   
    124124    // Add an additional scalar field to the KernelState struct.
     
    176176    virtual void setProducedItemCount(llvm::Value * self, const std::string & name, llvm::Value * value) const;
    177177
    178 protected:
    179 
    180178    const parabix::StreamSetBuffer * getStreamSetBuffer(const std::string & name) const;
     179
     180private:
     181
     182    void callGenerateInitMethod() const;
     183
     184    void callGenerateDoSegmentMethod() const;
    181185
    182186protected:
     
    208212    virtual void generateFinalBlockMethod(llvm::Function * function, llvm::Value * self, llvm::Value * remainingBytes, llvm::Value * blockNo) const;
    209213
    210     virtual void generateDoSegmentMethod() const final;
     214    virtual void generateDoSegmentMethod(llvm::Function * function, llvm::Value * self, llvm::Value * doFinal, const std::vector<llvm::Value *> & producerPos) const final;
    211215
    212216    BlockOrientedKernel(IDISA::IDISA_Builder * builder,
Note: See TracChangeset for help on using the changeset viewer.