Ignore:
Timestamp:
Apr 9, 2017, 3:59:17 PM (2 years ago)
Author:
nmedfort
Message:

Updated all projects to use ParabixDriver?. Deprecated original pipeline generation methods. Enabled LLVM optimizations, IR and ASM printing for Kernel modules. Enabled object cache by default. Begun work on moving consumed position information back to producing kernels.

File:
1 edited

Legend:

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

    r5398 r5401  
    3939
    4040struct ProcessingRate  {
    41     enum ProcessingRateKind : uint8_t {Fixed, RoundUp, Max, Add1, Unknown};
    42     ProcessingRate() {}
     41    enum class ProcessingRateKind : uint8_t { Fixed, RoundUp, Add1, Max, Unknown };
    4342    ProcessingRateKind getKind() const {return mKind;}
    44     bool isExact() const {return (mKind == Fixed)||(mKind == RoundUp)||(mKind == Add1) ;}
     43    bool isExact() const {return (mKind == ProcessingRateKind::Fixed)||(mKind == ProcessingRateKind::RoundUp)||(mKind == ProcessingRateKind::Add1) ;}
    4544    bool isUnknown() const { return !isExact(); }
    4645    llvm::Value * CreateRatioCalculation(IDISA::IDISA_Builder * b, llvm::Value * principalInputItems, llvm::Value * doFinal = nullptr) const;
    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);
     46    friend ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems, std::string && referenceStreamSet);
     47    friend ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems, std::string && referenceStreamSet);
     48    friend ProcessingRate RoundUpToMultiple(unsigned itemMultiple, std::string && referenceStreamSet);
     49    friend ProcessingRate Add1(std::string && referenceStreamSet);
    5150    friend ProcessingRate UnknownRate();
    5251    std::string referenceStreamSet() const { return mReferenceStreamSet;}
    5352protected:
    54     ProcessingRate(ProcessingRateKind k, unsigned numerator, unsigned denominator, std::string referenceStreamSet)
     53    ProcessingRate(ProcessingRateKind k, unsigned numerator, unsigned denominator, std::string && referenceStreamSet)
    5554    : mKind(k), mRatioNumerator(numerator), mRatioDenominator(denominator), mReferenceStreamSet(referenceStreamSet) {}
    5655private:
    57     ProcessingRateKind mKind;
    58     uint16_t mRatioNumerator;
    59     uint16_t mRatioDenominator;
    60     std::string mReferenceStreamSet;
     56    const ProcessingRateKind mKind;
     57    const uint16_t mRatioNumerator;
     58    const uint16_t mRatioDenominator;
     59    const std::string mReferenceStreamSet;
    6160};
    6261
    63 ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1, std::string referenceStreamSet = "");
    64 ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1, std::string referenceStreamSet = "");
    65 ProcessingRate RoundUpToMultiple(unsigned itemMultiple, std::string referenceStreamSet = "");
    66 ProcessingRate Add1(std::string referenceStreamSet = "");
     62ProcessingRate FixedRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1, std::string && referenceStreamSet = "");
     63ProcessingRate MaxRatio(unsigned strmItemsPer, unsigned perPrincipalInputItems = 1, std::string && referenceStreamSet = "");
     64ProcessingRate RoundUpToMultiple(unsigned itemMultiple, std::string &&referenceStreamSet = "");
     65ProcessingRate Add1(std::string && referenceStreamSet = "");
    6766ProcessingRate UnknownRate();
    6867
     
    7069    Binding(llvm::Type * type, const std::string & name, ProcessingRate r = FixedRatio(1))
    7170    : type(type), name(name), rate(r) { }
    72     llvm::Type *        type;
    73     std::string         name;
    74     ProcessingRate      rate;
     71    llvm::Type * const        type;
     72    const std::string         name;
     73    const ProcessingRate      rate;
    7574};
    7675
Note: See TracChangeset for help on using the changeset viewer.