@@ -373,20 +373,20 @@ static bool driven_by_moved_block(const ClusterNetId net);
373
373
374
374
static void comp_td_costs (const PlaceDelayModel& delay_model, double * timing_cost);
375
375
376
- static e_swap_result assess_swap (float delta_c, float t);
376
+ static e_swap_result assess_swap (double delta_c, double t);
377
377
378
378
static bool find_to (t_type_ptr type, float rlim, const t_pl_loc from, t_pl_loc& to);
379
379
380
380
static void get_non_updateable_bb (ClusterNetId net_id, t_bb* bb_coord_new);
381
381
382
382
static void update_bb (ClusterNetId net_id, t_bb* bb_coord_new, t_bb* bb_edge_new, int xold, int yold, int xnew, int ynew);
383
383
384
- static int find_affected_nets_and_update_costs (e_place_algorithm place_algorithm, const PlaceDelayModel& delay_model, float & bb_delta_c, float & timing_delta_c);
384
+ static int find_affected_nets_and_update_costs (e_place_algorithm place_algorithm, const PlaceDelayModel& delay_model, double & bb_delta_c, double & timing_delta_c);
385
385
386
386
static void record_affected_net (const ClusterNetId net, int & num_affected_nets);
387
387
388
388
static void update_net_bb (const ClusterNetId net, int iblk, const ClusterBlockId blk, const ClusterPinId blk_pin);
389
- static void update_td_delta_costs (const PlaceDelayModel& delay_model, const ClusterNetId net, const ClusterPinId pin, float & delta_timing_cost);
389
+ static void update_td_delta_costs (const PlaceDelayModel& delay_model, const ClusterNetId net, const ClusterPinId pin, double & delta_timing_cost);
390
390
391
391
static float get_net_cost (ClusterNetId net_id, t_bb* bb_ptr);
392
392
@@ -1723,9 +1723,9 @@ static e_swap_result try_swap(float t,
1723
1723
/* I'm using negative values of temp_net_cost as a flag, so DO NOT *
1724
1724
* use cost functions that can go negative. */
1725
1725
1726
- float delta_c = 0 ; /* Change in cost due to this swap. */
1727
- float bb_delta_c = 0 ;
1728
- float timing_delta_c = 0 ;
1726
+ double delta_c = 0 ; /* Change in cost due to this swap. */
1727
+ double bb_delta_c = 0 ;
1728
+ double timing_delta_c = 0 ;
1729
1729
1730
1730
/* Pick a random block to be swapped with another random block. */
1731
1731
ClusterBlockId b_from = pick_from_block ();
@@ -1881,7 +1881,7 @@ static ClusterBlockId pick_from_block() {
1881
1881
// and updates their bounding box.
1882
1882
//
1883
1883
// Returns the number of affected nets.
1884
- static int find_affected_nets_and_update_costs (e_place_algorithm place_algorithm, const PlaceDelayModel& delay_model, float & bb_delta_c, float & timing_delta_c) {
1884
+ static int find_affected_nets_and_update_costs (e_place_algorithm place_algorithm, const PlaceDelayModel& delay_model, double & bb_delta_c, double & timing_delta_c) {
1885
1885
VTR_ASSERT_SAFE (bb_delta_c == 0 .);
1886
1886
VTR_ASSERT_SAFE (timing_delta_c == 0 .);
1887
1887
auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -1968,7 +1968,7 @@ static void update_net_bb(const ClusterNetId net, int iblk, const ClusterBlockId
1968
1968
}
1969
1969
}
1970
1970
1971
- static void update_td_delta_costs (const PlaceDelayModel& delay_model, const ClusterNetId net, const ClusterPinId pin, float & delta_timing_cost) {
1971
+ static void update_td_delta_costs (const PlaceDelayModel& delay_model, const ClusterNetId net, const ClusterPinId pin, double & delta_timing_cost) {
1972
1972
auto & cluster_ctx = g_vpr_ctx.clustering ();
1973
1973
1974
1974
if (cluster_ctx.clb_nlist .pin_type (pin) == PinType::DRIVER) {
@@ -2133,7 +2133,7 @@ static bool find_to(t_type_ptr type, float rlim, const t_pl_loc from, t_pl_loc&
2133
2133
return true ;
2134
2134
}
2135
2135
2136
- static e_swap_result assess_swap (float delta_c, float t) {
2136
+ static e_swap_result assess_swap (double delta_c, double t) {
2137
2137
/* Returns: 1 -> move accepted, 0 -> rejected. */
2138
2138
if (delta_c <= 0 ) {
2139
2139
return ACCEPTED;
@@ -2144,7 +2144,7 @@ static e_swap_result assess_swap(float delta_c, float t) {
2144
2144
}
2145
2145
2146
2146
float fnum = vtr::frand ();
2147
- float prob_fac = exp (-delta_c / t);
2147
+ float prob_fac = std:: exp (-delta_c / t);
2148
2148
if (prob_fac > fnum) {
2149
2149
return ACCEPTED;
2150
2150
}
0 commit comments