3
3
static void print_region (FILE* fp, Region region);
4
4
static void print_partition (FILE* fp, Partition part);
5
5
static void print_partition_region (FILE* fp, PartitionRegion pr);
6
- static void print_constraints (FILE* fp, VprConstraints constraints, int num_parts );
6
+ static void print_constraints (FILE* fp, VprConstraints constraints);
7
7
8
8
void print_region (FILE* fp, Region region) {
9
9
vtr::Rect<int > rect = region.get_region_rect ();
@@ -42,10 +42,14 @@ void print_partition_region(FILE* fp, PartitionRegion pr) {
42
42
}
43
43
}
44
44
45
- void print_constraints (FILE* fp, VprConstraints constraints, int num_parts ) {
45
+ void print_constraints (FILE* fp, VprConstraints constraints) {
46
46
Partition temp_part;
47
47
std::vector<AtomBlockId> atoms;
48
48
49
+ int num_parts = constraints.get_num_partitions ();
50
+
51
+ fprintf (fp, " \n Number of partitions is %d \n " , num_parts);
52
+
49
53
for (int i = 0 ; i < num_parts; i++) {
50
54
PartitionId part_id (i);
51
55
@@ -71,14 +75,11 @@ void echo_constraints(char* filename, VprConstraints constraints) {
71
75
FILE* fp;
72
76
fp = vtr::fopen (filename, " w" );
73
77
74
- int num_of_parts = constraints.get_num_partitions ();
75
-
76
78
fprintf (fp, " --------------------------------------------------------------\n " );
77
79
fprintf (fp, " Constraints\n " );
78
80
fprintf (fp, " --------------------------------------------------------------\n " );
79
81
fprintf (fp, " \n " );
80
- fprintf (fp, " \n Number of partitions is %d \n " , num_of_parts);
81
- print_constraints (fp, constraints, num_of_parts);
82
+ print_constraints (fp, constraints);
82
83
83
84
fclose (fp);
84
85
}
0 commit comments