Ignore:
Timestamp:
May 4, 2017, 10:16:15 AM (2 years ago)
Author:
cameron
Message:

getLinearlyWritableItems/Blocks includes buffer space plus overflow blocks; more processing rate functions

File:
1 edited

Legend:

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

    r5433 r5434  
    3434    enum class ProcessingRateKind : uint8_t { FixedRatio, RoundUp, Add1, MaxRatio, Unknown };
    3535    ProcessingRateKind getKind() const {return mKind;}
     36    bool isFixedRatio() const {return mKind == ProcessingRateKind::FixedRatio;}
     37    bool isMaxRatio() const {return mKind == ProcessingRateKind::MaxRatio;}
    3638    bool isExact() const {return (mKind == ProcessingRateKind::FixedRatio)||(mKind == ProcessingRateKind::RoundUp)||(mKind == ProcessingRateKind::Add1) ;}
    37     bool isUnknown() const { return !isExact(); }
     39    bool isUnknownRate() const { return mKind == ProcessingRateKind::Unknown; }
    3840    llvm::Value * CreateRatioCalculation(IDISA::IDISA_Builder * b, llvm::Value * principalInputItems, llvm::Value * doFinal = nullptr) const;
    39     llvm::Value * CreateMaxReferenceItemsCalculation(IDISA::IDISA_Builder * b, llvm::Value * outputItems, llvm::Value * doFinal) const;
     41    llvm::Value * CreateMaxReferenceItemsCalculation(IDISA::IDISA_Builder * b, llvm::Value * outputItems, llvm::Value * doFinal = nullptr) const;
    4042    friend ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems, std::string && referenceStreamSet);
    4143    friend ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems, std::string && referenceStreamSet);
     
    4345    friend ProcessingRate Add1(std::string && referenceStreamSet);
    4446    friend ProcessingRate UnknownRate();
     47    uint16_t getRatioNumerator() const { return mRatioNumerator;}
     48    uint16_t getRatioDenominator() const { return mRatioDenominator;}
    4549    std::string referenceStreamSet() const { return mReferenceStreamSet;}
    4650protected:
Note: See TracChangeset for help on using the changeset viewer.