torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PlacerHeuristicBase.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief Header for the Placer class.
18 
19 #ifndef TORC_PLACER_PLACERHEURISTICBASE_HPP
20 #define TORC_PLACER_PLACERHEURISTICBASE_HPP
21 
22 #include "torc/physical/Design.hpp"
24 #include <boost/timer.hpp>
25 
26 namespace torc {
27 namespace placer {
28 
29  /// \brief Simulated annealing algorithm class.
31  protected:
32  //types
34  typedef boost::uint32_t uint32;
36 
39 
42  //COOLING SCHEDULE
43  //MOVE SELECTION PROBABILTY FOR TYPES
44 
45  public:
46  // the heuristic may be the site mapping structure...
47  // heuristic should contain most of the numeric constants here
48  // probably functions for cooling schedule and such as well
49  // in fact, the heuristic may wrap the placement entirely... as we do in routing
51  : mDevice(inDevice), mDesign(inDesign),
53 
54  // crawl the design to extract RPMS and create corresponding site types.
55  /*InstanceSharedPtrVector::iterator p = mDesign->instancesBegin();
56  InstanceSharedPtrVector::iterator e = mDesign->instancesEnd();
57  for ( ; p != e; p++) {
58  InstanceSharedPtr instance = *p;
59  uint32 typeIndex = mDevice.mTypeMapping.getTypeIndex(instance->getType());
60  instance->setAnnotation(ePlacerInstanceTypeIndex, typeIndex);
61 
62  mAllInstances.push_back(instance);
63  mAllInstancesByType[typeIndex].push_back(instance);
64  }*/
65 
66 
67 
68  }
69 
71 
74  uint32 updateTemperature() { return 0; }
75 
76  void updateCostFull() {}
77  void updateCostRemovePair() {} // remove a pair of instance from cost
78  void updateCostAddPair() {} // add a pair of instances from cost
79 
80  }; // class PlacerHeuristicBase
81 } // namespace placer
82 } // namespace torc
83 
84 #endif // TORC_PLACER_PLACERHEURISTICBASE_HPP
torc::physical::DesignSharedPtr DesignSharedPtr
Simulated annealing algorithm class.
Device database, including complete wiring and logic support.
Definition: DDB.hpp:42
Wrapper of the device database for placing the design.
Header for the Design class.
PlacerHeuristicBase(DeviceWrapper &inDevice, DesignSharedPtr inDesign)
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
Header for the DeviceWrapper class.