Ignore:
Timestamp:
Oct 5, 2015, 11:49:45 AM (4 years ago)
Author:
nmedfort
Message:

Added ability to limit the size of candidate multiplexing sets and choose a sample of the possible combinations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/optimizers/pablo_automultiplexing.hpp

    r4775 r4822  
    4040    using TopologicalMap = boost::container::flat_map<const Statement *, TopologicalVertex>;
    4141public:
    42     static bool optimize(PabloFunction & function);
     42    static bool optimize(PabloFunction & function, const unsigned limit = std::numeric_limits<unsigned>::max(), const unsigned maxSelections = 100);
    4343protected:
    4444    bool initialize(PabloFunction & function);
     
    4848    bool notTransitivelyDependant(const ConstraintVertex i, const ConstraintVertex j) const;
    4949    bool generateCandidateSets(RNG & rng);
    50     void addCandidateSet(const VertexVector & S);
     50    void addCandidateSet(const VertexVector & S, RNG & rng);
    5151    void selectMultiplexSets(RNG &);
    5252    void applySubsetConstraints();
     
    5656    static TopologicalVertex getVertex(Statement * expr, TopologicalGraph & G, TopologicalMap & M);
    5757
    58     inline AutoMultiplexing()
    59     : mVariables(0)
     58    inline AutoMultiplexing(const unsigned limit, const unsigned maxSelections)
     59    : mLimit(limit)
     60    , mMaxSelections(maxSelections)
     61    , mVariables(0)
    6062    , mConstraintGraph(0)
    6163    {
    6264    }
     65
    6366private:
    6467
     
    7982private:
    8083    DdManager *                 mManager;
     84    const unsigned              mLimit;
     85    const unsigned              mMaxSelections;
    8186    unsigned                    mVariables;
    8287    CharacterizationMap         mCharacterizationMap;
Note: See TracChangeset for help on using the changeset viewer.