Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tmep_placer_class
Browse files Browse the repository at this point in the history
  • Loading branch information
soheilshahrouz committed Nov 27, 2024
2 parents b760d03 + c246f54 commit b1c296a
Show file tree
Hide file tree
Showing 37 changed files with 964 additions and 765 deletions.
9 changes: 5 additions & 4 deletions libs/libvtrutil/src/vtr_ndmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class NdMatrixProxy {
* @param dim_stride: The stride of this dimension (i.e. how many element in memory between indicies of this dimension)
* @param start: Pointer to the start of the sub-matrix this proxy represents
*/
NdMatrixProxy<T, N>(const size_t* dim_sizes, const size_t* dim_strides, T* start)
NdMatrixProxy(const size_t* dim_sizes, const size_t* dim_strides, T* start)
: dim_sizes_(dim_sizes)
, dim_strides_(dim_strides)
, start_(start) {}

NdMatrixProxy<T, N>& operator=(const NdMatrixProxy<T, N>& other) = delete;
NdMatrixProxy& operator=(const NdMatrixProxy& other) = delete;

///@brief const [] operator
const NdMatrixProxy<T, N - 1> operator[](size_t index) const {
Expand Down Expand Up @@ -76,12 +76,12 @@ class NdMatrixProxy<T, 1> {
* @param dim_stride: The stride of this dimension (i.e. how many element in memory between indicies of this dimension)
* @param start: Pointer to the start of the sub-matrix this proxy represents
*/
NdMatrixProxy<T, 1>(const size_t* dim_sizes, const size_t* dim_stride, T* start)
NdMatrixProxy(const size_t* dim_sizes, const size_t* dim_stride, T* start)
: dim_sizes_(dim_sizes)
, dim_strides_(dim_stride)
, start_(start) {}

NdMatrixProxy<T, 1>& operator=(const NdMatrixProxy<T, 1>& other) = delete;
NdMatrixProxy& operator=(const NdMatrixProxy& other) = delete;

///@brief const [] operator
const T& operator[](size_t index) const {
Expand Down Expand Up @@ -407,3 +407,4 @@ using Matrix = NdMatrix<T, 2>;

} // namespace vtr
#endif

1 change: 0 additions & 1 deletion vpr/src/base/SetupVPR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ void SetupPackerOpts(const t_options& Options,

//TODO: document?
PackerOpts->global_clocks = true; /* DEFAULT */
PackerOpts->hill_climbing_flag = false; /* DEFAULT */

PackerOpts->allow_unrelated_clustering = Options.allow_unrelated_clustering;
PackerOpts->connection_driven = Options.connection_driven_clustering;
Expand Down
1 change: 0 additions & 1 deletion vpr/src/base/ShowSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ static void ShowPackerOpts(const t_packer_opts& PackerOpts) {
}
VTR_LOG("PackerOpts.connection_driven: %s", (PackerOpts.connection_driven ? "true\n" : "false\n"));
VTR_LOG("PackerOpts.global_clocks: %s", (PackerOpts.global_clocks ? "true\n" : "false\n"));
VTR_LOG("PackerOpts.hill_climbing_flag: %s", (PackerOpts.hill_climbing_flag ? "true\n" : "false\n"));
VTR_LOG("PackerOpts.inter_cluster_net_delay: %f\n", PackerOpts.inter_cluster_net_delay);
VTR_LOG("PackerOpts.timing_driven: %s", (PackerOpts.timing_driven ? "true\n" : "false\n"));
VTR_LOG("PackerOpts.target_external_pin_util: %s", vtr::join(PackerOpts.target_external_pin_util, " ").c_str());
Expand Down
1 change: 0 additions & 1 deletion vpr/src/base/vpr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,6 @@ struct t_packer_opts {
std::string sdc_file_name;
std::string output_file;
bool global_clocks;
bool hill_climbing_flag;
bool timing_driven;
enum e_cluster_seed cluster_seed_type;
float alpha;
Expand Down
1 change: 1 addition & 0 deletions vpr/src/pack/attraction_groups.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "attraction_groups.h"
#include "globals.h"

AttractionInfo::AttractionInfo(bool attraction_groups_on) {
const auto& floorplanning_ctx = g_vpr_ctx.floorplanning();
Expand Down
7 changes: 3 additions & 4 deletions vpr/src/pack/attraction_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

#include "vtr_strong_id.h"
#include "vtr_vector.h"
#include "atom_netlist.h"
#include "globals.h"
#include "atom_netlist_fwd.h"

/**
* @file
Expand Down Expand Up @@ -78,7 +77,7 @@ class AttractionInfo {

void add_attraction_group(const AttractionGroup& group_info);

int num_attraction_groups();
int num_attraction_groups() const;

int get_att_group_pulls() const;

Expand Down Expand Up @@ -118,7 +117,7 @@ inline void AttractionInfo::set_atom_attraction_group(const AtomBlockId atom_id,
attraction_groups[group_id].group_atoms.push_back(atom_id);
}

inline int AttractionInfo::num_attraction_groups() {
inline int AttractionInfo::num_attraction_groups() const {
return attraction_groups.size();
}

Expand Down
7 changes: 7 additions & 0 deletions vpr/src/pack/cluster_legalizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ class ClusterLegalizer {
return cluster.pr;
}

/// @brief Gets the current number of molecules in the cluster.
inline size_t get_num_molecules_in_cluster(LegalizationClusterId cluster_id) const {
VTR_ASSERT_SAFE(cluster_id.is_valid() && (size_t)cluster_id < legalization_clusters_.size());
const LegalizationCluster& cluster = legalization_clusters_[cluster_id];
return cluster.molecules.size();
}

/// @brief Gets the ID of the cluster that contains the given atom block.
inline LegalizationClusterId get_atom_cluster(AtomBlockId blk_id) const {
VTR_ASSERT_SAFE(blk_id.is_valid() && (size_t)blk_id < atom_cluster_.size());
Expand Down
Loading

0 comments on commit b1c296a

Please sign in to comment.