Ignore:
Timestamp:
Mar 21, 2017, 11:55:00 AM (2 years ago)
Author:
xuedongx
Message:

Add1 processing rate; pablo Count only up to EOFbit

File:
1 edited

Legend:

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

    r5347 r5370  
    1010#include <vector>  // for vector
    1111namespace IDISA { class IDISA_Builder; }
    12 namespace llvm { class ConstantInt; }
     12//namespace llvm { class ConstantInt; }
     13#include <llvm/IR/Constants.h>
    1314namespace llvm { class Function; }
    1415namespace llvm { class Module; }
     
    3839
    3940struct ProcessingRate  {
    40     enum ProcessingRateKind : uint8_t {Fixed, RoundUp, Max, Unknown};
     41    enum ProcessingRateKind : uint8_t {Fixed, RoundUp, Max, Add1, Unknown};
    4142    ProcessingRate() {}
    4243    ProcessingRateKind getKind() const {return mKind;}
    43     bool isExact() const {return (mKind == Fixed)||(mKind == RoundUp) ;}
     44    bool isExact() const {return (mKind == Fixed)||(mKind == RoundUp)||(mKind == Add1) ;}
     45    llvm::Value * CreateRatioCalculation(IDISA::IDISA_Builder * b, llvm::Value * principalInputItems, llvm::Value * doFinal) const;
    4446    llvm::Value * CreateRatioCalculation(IDISA::IDISA_Builder * b, llvm::Value * principalInputItems) const;
    4547    friend ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems);
    4648    friend ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems);
    47     friend ProcessingRate RoundUpToMultiple(unsigned itemMultiple);
     49    friend ProcessingRate RoundUpToMultiple(unsigned itemMultiple);   
     50    friend ProcessingRate Add1();
    4851    friend ProcessingRate UnknownRate();
    4952   
     
    6063ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1);
    6164ProcessingRate RoundUpToMultiple(unsigned itemMultiple);
     65ProcessingRate Add1();
    6266ProcessingRate UnknownRate();
    6367
     
    115119    virtual void setProcessedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const = 0;
    116120
    117     virtual llvm::Value * getProducedItemCount(llvm::Value * instance, const std::string & name) const = 0;
     121
    118122
    119123    virtual void setProducedItemCount(llvm::Value * instance, const std::string & name, llvm::Value * value) const = 0;
Note: See TracChangeset for help on using the changeset viewer.