Ignore:
Timestamp:
Jan 28, 2017, 3:12:03 PM (2 years ago)
Author:
nmedfort
Message:

Start of work to simplify kernel writing. Removed generateDoBlockLogic method.

File:
1 edited

Legend:

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

    r5283 r5285  
    2020namespace parabix { class StreamSetBuffer; }
    2121
    22 const std::string blockNoScalar = "blockNo";
    2322const std::string logicalSegmentNoScalar = "logicalSegNo";
    2423const std::string processedItemCountSuffix = "_processedItemCount";
     
    198197    // Each kernel builder subtype must provide its own logic for generating
    199198    // doBlock calls.
    200     virtual void generateDoBlockMethod() const = 0;
    201 
    202     virtual void generateDoBlockLogic(llvm::Value * self, llvm::Value * blockNo) const;
     199    virtual void generateDoBlockMethod(llvm::Function * function, llvm::Value * self, llvm::Value * blockNo) const = 0;
    203200
    204201    // Each kernel builder subtypre must also specify the logic for processing the
     
    209206    // not be overridden.
    210207
    211     virtual void generateFinalBlockMethod() const;
     208    virtual void generateFinalBlockMethod(llvm::Function * function, llvm::Value * self, llvm::Value * remainingBytes, llvm::Value * blockNo) const;
    212209
    213210    virtual void generateDoSegmentMethod() const final;
     
    222219
    223220    virtual ~BlockOrientedKernel() { }
     221
     222    llvm::Function * getDoBlockFunction() const;
     223
     224    llvm::Function * getDoFinalBlockFunction() const;
     225
     226private:
     227    void callGenerateDoBlockMethod() const;
     228
     229    void callGenerateDoFinalBlockMethod() const;
    224230};
    225231
    226232class SegmentOrientedKernel : public KernelBuilder {
    227233protected:
     234
    228235    SegmentOrientedKernel(IDISA::IDISA_Builder * builder,
    229236                          std::string && kernelName,
Note: See TracChangeset for help on using the changeset viewer.