Ignore:
Timestamp:
Apr 2, 2017, 4:17:51 PM (2 years ago)
Author:
nmedfort
Message:

Minor changes in preparation of incorporating a consumed stream set position into select kernels.

File:
1 edited

Legend:

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

    r5386 r5390  
    3838    void createInstance() override;
    3939
    40     virtual llvm::Value * getProcessedItemCount(llvm::Value * instance, const std::string & name) const override;
    41 
    42     virtual void setProcessedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const;
    43 
    44     llvm::Value * getProducedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * doFinal) const;
    45 
    46     llvm::Value * getProducedItemCount(llvm::Value * instance, const std::string & name) const;
    47 
    48     virtual void setProducedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const;
     40    llvm::Value * getProducedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * doFinal = nullptr) const final;
     41
     42    void setProducedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const final;
     43
     44    llvm::Value * getConsumedItemCount(llvm::Value * instance, const std::string & name) const final;
     45
     46    void setConsumedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const final;
     47
     48    llvm::Value * getProcessedItemCount(llvm::Value * instance, const std::string & name) const final;
     49
     50    void setProcessedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const final;
    4951
    5052    virtual void reserveBytes(llvm::Value * instance, const std::string & name, llvm::Value * requested) const;
     
    5254    bool hasNoTerminateAttribute() { return mNoTerminateAttribute;}
    5355   
    54     llvm::Value * getTerminationSignal(llvm::Value * instance) const override final;
    55 
    56     void setTerminationSignal(llvm::Value * instance) const override final;
     56    llvm::Value * getTerminationSignal(llvm::Value * instance) const final;
     57
     58    void setTerminationSignal(llvm::Value * instance) const final;
    5759
    5860    // Get the value of a scalar field for a given instance.
     
    208210    }
    209211
     212    inline llvm::Value * getProducedItemCount(const std::string & name) const {
     213        return getProducedItemCount(getSelf(), name);
     214    }
     215
     216    inline void setProducedItemCount(const std::string & name, llvm::Value * value) const {
     217        setProducedItemCount(getSelf(), name, value);
     218    }
     219
     220    inline llvm::Value * getConsumedItemCount(const std::string & name) const {
     221        return getConsumedItemCount(getSelf(), name);
     222    }
     223
     224    inline void setConsumedItemCount(const std::string & name, llvm::Value * value) const {
     225        setConsumedItemCount(getSelf(), name, value);
     226    }
     227
    210228    inline llvm::Value * getProcessedItemCount(const std::string & name) const {
    211229        return getProcessedItemCount(getSelf(), name);
     
    214232    inline void setProcessedItemCount(const std::string & name, llvm::Value * value) const {
    215233        setProcessedItemCount(getSelf(), name, value);
    216     }
    217 
    218     inline llvm::Value * getProducedItemCount(const std::string & name) const {
    219         return getProducedItemCount(getSelf(), name);
    220     }
    221 
    222     inline void setProducedItemCount(const std::string & name, llvm::Value * value) const {
    223         setProducedItemCount(getSelf(), name, value);
    224234    }
    225235
Note: See TracChangeset for help on using the changeset viewer.