Skip to content

Commit 2b71a25

Browse files
committed
---
yaml --- r: 15951 b: refs/heads/try c: 037a166 h: refs/heads/master i: 15949: 0976d73 15947: 008a8a9 15943: 7e7c3f6 15935: 4869420 v: v3
1 parent 1848425 commit 2b71a25

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: b62d92c993b9206b05be30ae7722adc6bdf91946
5+
refs/heads/try: 037a166ea749f9ab03aafb27b8e20cad0218b4b6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/test/bench/graph500-bfs.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn create_queue<T: send>() -> queue<T> {
3838
let p = port();
3939
let c = chan(p);
4040

41-
impl<T: send> of queue<T> for repr<T> {
41+
impl<T: copy send> of queue<T> for repr<T> {
4242
fn add_back(x : T) {
4343
let x = x;
4444
send(self.c, x);
@@ -524,7 +524,8 @@ const min_granularity : uint = 1024u;
524524
525525
This is used to build most of the other parallel vector functions,
526526
like map or alli."]
527-
fn map_slices<A: send, B: send>(xs: [A], f: fn~(uint, [const A]/&) -> B)
527+
fn map_slices<A: copy send, B: copy send>(xs: [A],
528+
f: fn~(uint, [const A]/&) -> B)
528529
-> [B] {
529530

530531
let len = xs.len();
@@ -577,14 +578,14 @@ fn map_slices<A: send, B: send>(xs: [A], f: fn~(uint, [const A]/&) -> B)
577578
}
578579

579580
#[doc="A parallel version of map."]
580-
fn map<A: send, B: send>(xs: [A], f: fn~(A) -> B) -> [B] {
581+
fn map<A: copy send, B: copy send>(xs: [A], f: fn~(A) -> B) -> [B] {
581582
vec::concat(map_slices(xs) {|_base, slice|
582583
vec::map(slice, f)
583584
})
584585
}
585586

586587
#[doc="A parallel version of mapi."]
587-
fn mapi<A: send, B: send>(xs: [A], f: fn~(uint, A) -> B) -> [B] {
588+
fn mapi<A: copy send, B: copy send>(xs: [A], f: fn~(uint, A) -> B) -> [B] {
588589
let slices = map_slices(xs) {|base, slice|
589590
vec::mapi(slice) {|i, x|
590591
f(i + base, x)
@@ -597,7 +598,7 @@ fn mapi<A: send, B: send>(xs: [A], f: fn~(uint, A) -> B) -> [B] {
597598
}
598599

599600
#[doc="Returns true if the function holds for all elements in the vector."]
600-
fn alli<A: send>(xs: [A], f: fn~(uint, A) -> bool) -> bool {
601+
fn alli<A: copy send>(xs: [A], f: fn~(uint, A) -> bool) -> bool {
601602
vec::all(map_slices(xs) {|base, slice|
602603
vec::alli(slice) {|i, x|
603604
f(i + base, x)
@@ -606,7 +607,7 @@ fn alli<A: send>(xs: [A], f: fn~(uint, A) -> bool) -> bool {
606607
}
607608

608609
#[doc="Returns true if the function holds for any elements in the vector."]
609-
fn any<A: send>(xs: [A], f: fn~(A) -> bool) -> bool {
610+
fn any<A: copy send>(xs: [A], f: fn~(A) -> bool) -> bool {
610611
vec::any(map_slices(xs) {|_base, slice|
611612
vec::any(slice, f)
612613
}) {|x| x }

0 commit comments

Comments
 (0)