Skip to content

Commit 90f959a

Browse files
committed
Fix graph500-bfs
1 parent c9fb1b1 commit 90f959a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/bench/graph500-bfs.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
238238
}
239239
}
240240

241-
let mut i = 0u;
241+
let mut i = 0;
242242
while par::any(colors, is_gray) {
243243
// Do the BFS.
244244
log(info, fmt!("PBFS iteration %?", i));
245-
i += 1u;
245+
i += 1;
246246
let old_len = colors.len();
247247

248248
let color = arc::ARC(colors);
@@ -264,7 +264,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
264264
let mut color = white;
265265

266266
do neighbors.each() |k| {
267-
if is_gray(colors[*k]) {
267+
if is_gray(&colors[*k]) {
268268
color = gray(*k);
269269
false
270270
}
@@ -370,11 +370,11 @@ fn validate(edges: ~[(node_id, node_id)],
370370
371371
let status = do par::alli(tree) |u, v| {
372372
let u = u as node_id;
373-
if v == -1i64 || u == root {
373+
if *v == -1i64 || u == root {
374374
true
375375
}
376376
else {
377-
edges.contains(&(u, v)) || edges.contains(&(v, u))
377+
edges.contains(&(u, *v)) || edges.contains(&(*v, u))
378378
}
379379
};
380380

0 commit comments

Comments
 (0)