Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/4ti2/files: 4ti2-1.3.2-gcc47.patch
Date: Fri, 22 Jun 2012 12:39:52
Message-Id: 20120622123927.14F342004C@flycatcher.gentoo.org
1 jlec 12/06/22 12:39:27
2
3 Added: 4ti2-1.3.2-gcc47.patch
4 Log:
5 sci-mathematics/4ti2: Fix for gcc-4.7, #422785
6
7 (Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sci-mathematics/4ti2/files/4ti2-1.3.2-gcc47.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/4ti2/files/4ti2-1.3.2-gcc47.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/4ti2/files/4ti2-1.3.2-gcc47.patch?rev=1.1&content-type=text/plain
14
15 Index: 4ti2-1.3.2-gcc47.patch
16 ===================================================================
17 src/groebner/CircuitMatrixAlgorithm.tpp | 28 +++++++++++-----------
18 src/groebner/CircuitSupportAlgorithm.tpp | 36 +++++++++++++++---------------
19 src/groebner/RayMatrixAlgorithm.tpp | 14 +++++-----
20 src/groebner/RaySupportAlgorithm.tpp | 14 +++++-----
21 4 files changed, 46 insertions(+), 46 deletions(-)
22
23 diff --git a/src/groebner/CircuitMatrixAlgorithm.tpp b/src/groebner/CircuitMatrixAlgorithm.tpp
24 index 9bb650f..48b2103 100644
25 --- a/src/groebner/CircuitMatrixAlgorithm.tpp
26 +++ b/src/groebner/CircuitMatrixAlgorithm.tpp
27 @@ -152,23 +152,23 @@ CircuitMatrixAlgorithm<IndexSet>::compute1(
28 )
29
30 // Find the next column.
31 - Index next_col = next_column(vs, remaining);
32 + Index next_col = this->next_column(vs, remaining);
33
34 int start = 0; int end = vs.get_number(); int middle;
35 // We sort the vectors into nonzeros and then zeros.
36 - sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle);
37 + this->sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle);
38 int nonzero_start = start, nonzero_end = middle;
39 //int zero_start = middle, zero_end = end;
40 // We sort the nonzeros into rays and circuits.
41 - sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle);
42 + this->sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle);
43 int ray_start = nonzero_start, ray_end = middle;
44 int cir_start = middle, cir_end = nonzero_end;
45 // We sort the rays into positives and then negatives.
46 - sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle);
47 + this->sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle);
48 int pos_ray_start = ray_start, pos_ray_end = middle;
49 int neg_ray_start = middle, neg_ray_end = ray_end;
50 // We sort the circuits into positives and then negatives.
51 - sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle);
52 + this->sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle);
53 int pos_cir_start = cir_start, pos_cir_end = middle;
54 int neg_cir_start = middle, neg_cir_end = cir_end;
55
56 @@ -185,8 +185,8 @@ CircuitMatrixAlgorithm<IndexSet>::compute1(
57
58 // Switch the positive and negative supports, so that it is as if all
59 // vectors have a positive entry in the next column.
60 - switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
61 - switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
62 + this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
63 + this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
64
65 matrix = orig_matrix;
66 int remaining_row = upper_triangle(matrix, remaining, 0);
67 @@ -212,15 +212,15 @@ CircuitMatrixAlgorithm<IndexSet>::compute1(
68 rays.insert(rays.end(), vs.get_number()-previous_size, false);
69
70 // Switch back the positive and negative supports.
71 - switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
72 - switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
73 + this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
74 + this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
75
76 // Update the supp vectors for the next_col.
77 - update_supports(supps, next_col, nonzero_start, nonzero_end);
78 - update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end);
79 - update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end);
80 - update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end);
81 - update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end);
82 + this->update_supports(supps, next_col, nonzero_start, nonzero_end);
83 + this->update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end);
84 + this->update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end);
85 + this->update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end);
86 + this->update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end);
87
88 *out << "\r";
89 *out << " Left = " << std::setw(3) << num_remaining;
90 diff --git a/src/groebner/CircuitSupportAlgorithm.tpp b/src/groebner/CircuitSupportAlgorithm.tpp
91 index 07de9aa..e956417 100644
92 --- a/src/groebner/CircuitSupportAlgorithm.tpp
93 +++ b/src/groebner/CircuitSupportAlgorithm.tpp
94 @@ -188,23 +188,23 @@ CircuitSupportAlgorithm<IndexSet>::compute1(
95 )
96
97 // Find the next column.
98 - Index next_col = next_column(vs, remaining);
99 + Index next_col = this->next_column(vs, remaining);
100
101 int start = 0; int end = vs.get_number(); int middle;
102 // We sort the vectors into nonzeros and then zeros.
103 - sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle);
104 + this->sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle);
105 int nonzero_start = start, nonzero_end = middle;
106 //int zero_start = middle, zero_end = end;
107 // We sort the nonzeros into rays and circuits.
108 - sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle);
109 + this->sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle);
110 int ray_start = nonzero_start, ray_end = middle;
111 int cir_start = middle, cir_end = nonzero_end;
112 // We sort the rays into positives and then negatives.
113 - sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle);
114 + this->sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle);
115 int pos_ray_start = ray_start, pos_ray_end = middle;
116 int neg_ray_start = middle, neg_ray_end = ray_end;
117 // We sort the circuits into positives and the negatives.
118 - sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle);
119 + this->sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle);
120 int pos_cir_start = cir_start, pos_cir_end = middle;
121 int neg_cir_start = middle, neg_cir_end = cir_end;
122
123 @@ -233,8 +233,8 @@ CircuitSupportAlgorithm<IndexSet>::compute1(
124
125 // Switch the positive and negative supports, so that it is as if all
126 // vectors have a positive entry in the next column.
127 - switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
128 - switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
129 + this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
130 + this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
131
132 //DEBUG_4ti2(*out << "Remaining row " << remaining_row << "\n";)
133 int previous_size = vs.get_number();
134 @@ -258,19 +258,19 @@ CircuitSupportAlgorithm<IndexSet>::compute1(
135 rays.insert(rays.end(), vs.get_number()-previous_size, false);
136
137 // Switch back the positive and negative supports.
138 - switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
139 - switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
140 + this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps);
141 + this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps);
142
143 // Update the supp vectors for the next_col.
144 - update_supports(supps, next_col, nonzero_start, nonzero_end);
145 - update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end);
146 - update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end);
147 - update_supports(pos_supps, col_map[next_col], neg_ray_start, neg_ray_end);
148 - update_supports(pos_supps, col_map[next_col], neg_cir_start, neg_cir_end);
149 - update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end);
150 - update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end);
151 - update_supports(neg_supps, col_map[next_col], pos_ray_start, pos_ray_end);
152 - update_supports(neg_supps, col_map[next_col], pos_cir_start, pos_cir_end);
153 + this->update_supports(supps, next_col, nonzero_start, nonzero_end);
154 + this->update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end);
155 + this->update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end);
156 + this->update_supports(pos_supps, col_map[next_col], neg_ray_start, neg_ray_end);
157 + this->update_supports(pos_supps, col_map[next_col], neg_cir_start, neg_cir_end);
158 + this->update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end);
159 + this->update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end);
160 + this->update_supports(neg_supps, col_map[next_col], pos_ray_start, pos_ray_end);
161 + this->update_supports(neg_supps, col_map[next_col], pos_cir_start, pos_cir_end);
162
163 *out << "\r";
164 *out << " Left = " << std::setw(3) << num_remaining;
165 diff --git a/src/groebner/RayMatrixAlgorithm.tpp b/src/groebner/RayMatrixAlgorithm.tpp
166 index 346248e..75c202a 100644
167 --- a/src/groebner/RayMatrixAlgorithm.tpp
168 +++ b/src/groebner/RayMatrixAlgorithm.tpp
169 @@ -865,7 +865,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
170 DEBUG_4ti2(unsigned long long int num_checks = 0;)
171 // Find the next column.
172 int next_positive_count, next_negative_count, next_zero_count;
173 - Index next_col = next_column(vs, remaining,
174 + Index next_col = this->next_column(vs, remaining,
175 next_positive_count,
176 next_negative_count,
177 next_zero_count);
178 @@ -880,7 +880,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
179 )
180
181 // We sort the vectors into zeros, positives, then negatives.
182 - sort(vs, supports, next_col, next_zero_count, next_positive_count,
183 + RayImplementation<IndexSet>::sort(vs, supports, next_col, next_zero_count, next_positive_count,
184 next_negative_count);
185
186 DEBUG_4ti2(*out << "Rays:\n" << vs << "\n";)
187 @@ -944,7 +944,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
188 IndexSet::set_difference(supports[r2], r1_supp, temp_diff);
189 if (temp_diff.power_of_2())
190 {
191 - create_new_vector(vs, supports, r1, r2, next_col,
192 + this->create_new_vector(vs, supports, r1, r2, next_col,
193 next_positive_count, next_negative_count,
194 temp, temp_supp);
195 DEBUG_4ti2(++num_one_diff_added;)
196 @@ -959,7 +959,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
197 IndexSet::set_difference(r1_supp, supports[r2], temp_diff);
198 if (temp_diff.power_of_2())
199 {
200 - create_new_vector(vs, supports, r1, r2, next_col,
201 + this->create_new_vector(vs, supports, r1, r2, next_col,
202 next_positive_count, next_negative_count,
203 temp, temp_supp);
204 DEBUG_4ti2(++num_one_diff_added;)
205 @@ -984,7 +984,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
206 IndexSet::set_difference(r1_supp, supports[r2], temp_diff2);
207 if (temp_diff2.power_of_2())
208 {
209 - create_new_vector(vs, supports, r1, r2, next_col,
210 + this->create_new_vector(vs, supports, r1, r2, next_col,
211 next_positive_count, next_negative_count,
212 temp, temp_supp);
213 DEBUG_4ti2(++num_one_diff_added;)
214 @@ -996,7 +996,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
215 DEBUG_4ti2(++num_checks;)
216 if (rank_check(matrix, temp_matrix, temp_diff, r1_rows))
217 {
218 - create_new_vector(vs, supports, r1, r2, next_col,
219 + this->create_new_vector(vs, supports, r1, r2, next_col,
220 next_positive_count, next_negative_count,
221 temp, temp_supp);
222 DEBUG_4ti2(++num_added;)
223 @@ -1012,7 +1012,7 @@ RayMatrixAlgorithm<IndexSet>::compute3(
224 IndexSet::set_difference(supports[r2], r1_supp, temp_diff);
225 if (temp_diff.power_of_2())
226 {
227 - create_new_vector(vs, supports, r1, r2, next_col,
228 + this->create_new_vector(vs, supports, r1, r2, next_col,
229 next_positive_count, next_negative_count,
230 temp, temp_supp);
231 DEBUG_4ti2(++num_one_diff_added;)
232 diff --git a/src/groebner/RaySupportAlgorithm.tpp b/src/groebner/RaySupportAlgorithm.tpp
233 index 0b31647..2b17957 100644
234 --- a/src/groebner/RaySupportAlgorithm.tpp
235 +++ b/src/groebner/RaySupportAlgorithm.tpp
236 @@ -773,7 +773,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
237
238 // Find the next column.
239 int next_positive_count, next_negative_count, next_zero_count;
240 - Index next_col = next_column(vs, remaining,
241 + Index next_col = this->next_column(vs, remaining,
242 next_positive_count,
243 next_negative_count,
244 next_zero_count);
245 @@ -788,7 +788,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
246 )
247
248 // We sort the vectors into zeros, positives, then negatives.
249 - sort(vs, supports, next_col, next_zero_count, next_positive_count,
250 + RayImplementation<IndexSet>::sort(vs, supports, next_col, next_zero_count, next_positive_count,
251 next_negative_count);
252
253 int original_size = vs.get_number();
254 @@ -852,7 +852,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
255 IndexSet::set_difference(supports[r2], r1_supp, temp_diff);
256 if (temp_diff.power_of_2())
257 {
258 - create_new_vector(vs, supports, r1, r2, next_col,
259 + this->create_new_vector(vs, supports, r1, r2, next_col,
260 next_positive_count, next_negative_count,
261 temp, temp_supp);
262 DEBUG_4ti2(++num_added;)
263 @@ -866,7 +866,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
264 IndexSet::set_difference(r1_supp, supports[r2], temp_diff);
265 if (temp_diff.power_of_2())
266 {
267 - create_new_vector(vs, supports, r1, r2, next_col,
268 + this->create_new_vector(vs, supports, r1, r2, next_col,
269 next_positive_count, next_negative_count,
270 temp, temp_supp);
271 DEBUG_4ti2(++num_one_diff_added;)
272 @@ -885,7 +885,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
273 zero_supp.set_union(supports[index]);
274 if (index >= r2_index && index < r2_finish)
275 {
276 - create_new_vector(vs, supports, r1, index, next_col,
277 + this->create_new_vector(vs, supports, r1, index, next_col,
278 next_positive_count, next_negative_count,
279 temp, temp_supp);
280 DEBUG_4ti2(++num_added;)
281 @@ -905,7 +905,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
282 IndexSet::set_difference(r1_supp, supports[r2], temp_diff2);
283 if (temp_diff2.power_of_2())
284 {
285 - create_new_vector(vs, supports, r1, r2, next_col,
286 + this->create_new_vector(vs, supports, r1, r2, next_col,
287 next_positive_count, next_negative_count,
288 temp, temp_supp);
289 DEBUG_4ti2(++num_one_diff_added;)
290 @@ -918,7 +918,7 @@ RaySupportAlgorithm<IndexSet>::compute3(
291 DEBUG_4ti2(++num_checks;)
292 if (!tree.dominated(temp_supp, r1, r2))
293 {
294 - create_new_vector(vs, supports, r1, r2, next_col,
295 + this->create_new_vector(vs, supports, r1, r2, next_col,
296 next_positive_count, next_negative_count,
297 temp, temp_supp);
298 DEBUG_4ti2(++num_added;)