Ignore:
Timestamp:
Mar 27, 2017, 9:20:48 PM (2 years ago)
Author:
cameron
Message:

Processing rates can be defined with respect to named stream sets.

File:
1 edited

Legend:

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

    r5370 r5375  
    4545    llvm::Value * CreateRatioCalculation(IDISA::IDISA_Builder * b, llvm::Value * principalInputItems, llvm::Value * doFinal) const;
    4646    llvm::Value * CreateRatioCalculation(IDISA::IDISA_Builder * b, llvm::Value * principalInputItems) const;
    47     friend ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems);
    48     friend ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems);
    49     friend ProcessingRate RoundUpToMultiple(unsigned itemMultiple);   
    50     friend ProcessingRate Add1();
     47    friend ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems, std::string referenceStreamSet);
     48    friend ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems, std::string referenceStreamSet);
     49    friend ProcessingRate RoundUpToMultiple(unsigned itemMultiple, std::string referenceStreamSet);   
     50    friend ProcessingRate Add1(std::string referenceStreamSet);
    5151    friend ProcessingRate UnknownRate();
     52    std::string referenceStreamSet() const { return mReferenceStreamSet;}
    5253   
    5354protected:
    54     ProcessingRate(ProcessingRateKind k, unsigned numerator, unsigned denominator)
    55     : mKind(k), ratio_numerator(numerator), ratio_denominator(denominator) {}
     55    ProcessingRate(ProcessingRateKind k, unsigned numerator, unsigned denominator, std::string referenceStreamSet)
     56    : mKind(k), ratio_numerator(numerator), ratio_denominator(denominator), mReferenceStreamSet(referenceStreamSet) {}
    5657    ProcessingRateKind mKind;
    5758    uint16_t ratio_numerator;
    5859    uint16_t ratio_denominator;
     60    std::string mReferenceStreamSet;
    5961    bool isVariableRate();
    6062};
    6163
    62 ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1);
    63 ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1);
    64 ProcessingRate RoundUpToMultiple(unsigned itemMultiple);
    65 ProcessingRate Add1();
     64ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1, std::string referenceStreamSet = "");
     65ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1, std::string referenceStreamSet = "");
     66ProcessingRate RoundUpToMultiple(unsigned itemMultiple, std::string referenceStreamSet = "");
     67ProcessingRate Add1(std::string referenceStreamSet = "");
    6668ProcessingRate UnknownRate();
    6769
Note: See TracChangeset for help on using the changeset viewer.