-
Notifications
You must be signed in to change notification settings - Fork 415
Pack malloc to new #2084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pack malloc to new #2084
Changes from all commits
ef74b79
8e99ecd
8108924
ca9a728
ef28b6e
45f4a29
d80a8b3
2d11144
1b6daed
f0becd3
03af3f5
40d6557
6da52ed
caf0b82
bbb5356
9d0d3c2
80d639d
10135ae
fc15b62
e202d6e
9031bd4
1cb521d
047c641
16b891b
697d0b1
a2df349
439e202
569d73b
47a0818
8048f9c
271c73d
c5506ea
d05df70
6c37a2c
2b35adb
f4ba119
05ac251
057b77b
aa4bbbb
8cda78a
466c717
e691124
7cbddc7
c31469a
2ab89a1
5366e76
4be872f
5f46eb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,8 +189,9 @@ std::map<t_logical_block_type_ptr, size_t> do_clustering(const t_packer_opts& pa | |
get_max_cluster_size_and_pb_depth(helper_ctx.max_cluster_size, max_pb_depth); | ||
|
||
if (packer_opts.hill_climbing_flag) { | ||
clustering_data.hill_climbing_inputs_avail = (int*)vtr::calloc(helper_ctx.max_cluster_size + 1, | ||
sizeof(int)); | ||
clustering_data.hill_climbing_inputs_avail = new int[helper_ctx.max_cluster_size + 1]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be doable; another issue to file Jennifer since I think we should land this PR first. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll be honest, I don't know why + 1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't recall either; indexed up to max_cluster_size presumably but I'd have to look at the code to see why. |
||
for (int i = 0; i < helper_ctx.max_cluster_size + 1; i++) | ||
clustering_data.hill_climbing_inputs_avail[i] = 0; | ||
} else { | ||
clustering_data.hill_climbing_inputs_avail = nullptr; /* if used, die hard */ | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these lists look like hand-implemented linked lists.
It might be a consideration to implement them with
std::list
orstd::forward_list
.(should be a consideration in a potential separate future PR). Here for now: only important to remove the parenthesis from the
delete
calls.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree: Jennifer please file a follow-up issue to track this.