test: Fix modes in the benchmarks.
This commit is contained in:
parent
85d9409b20
commit
d20e63ab65
8 changed files with 12 additions and 17 deletions
|
@ -273,7 +273,7 @@ fn pbfs(graph: &arc::ARC<graph>, key: node_id) -> bfs_result {
|
|||
colors = do par::mapi(*color_vec) {
|
||||
let colors = arc::clone(&color);
|
||||
let graph = arc::clone(graph);
|
||||
let result: ~fn(+x: uint, +y: &color) -> color = |i, c| {
|
||||
let result: ~fn(x: uint, y: &color) -> color = |i, c| {
|
||||
let colors = arc::get(&colors);
|
||||
let graph = arc::get(&graph);
|
||||
match *c {
|
||||
|
@ -395,7 +395,7 @@ fn validate(edges: ~[(node_id, node_id)],
|
|||
|
||||
let status = do par::alli(tree) {
|
||||
let edges = copy edges;
|
||||
let result: ~fn(+x: uint, v: &i64) -> bool = |u, v| {
|
||||
let result: ~fn(x: uint, v: &i64) -> bool = |u, v| {
|
||||
let u = u as node_id;
|
||||
if *v == -1i64 || u == root {
|
||||
true
|
||||
|
|
|
@ -45,10 +45,7 @@ fn init() -> (pipe,pipe) {
|
|||
}
|
||||
|
||||
|
||||
fn thread_ring(i: uint,
|
||||
count: uint,
|
||||
+num_chan: pipe,
|
||||
+num_port: pipe) {
|
||||
fn thread_ring(i: uint, count: uint, num_chan: pipe, num_port: pipe) {
|
||||
let mut num_chan = Some(num_chan);
|
||||
let mut num_port = Some(num_port);
|
||||
// Send/Receive lots of messages.
|
||||
|
|
|
@ -35,8 +35,8 @@ macro_rules! move_out (
|
|||
|
||||
fn thread_ring(i: uint,
|
||||
count: uint,
|
||||
+num_chan: ring::client::num,
|
||||
+num_port: ring::server::num) {
|
||||
num_chan: ring::client::num,
|
||||
num_port: ring::server::num) {
|
||||
let mut num_chan = Some(num_chan);
|
||||
let mut num_port = Some(num_port);
|
||||
// Send/Receive lots of messages.
|
||||
|
|
|
@ -46,10 +46,7 @@ fn init() -> (pipe,pipe) {
|
|||
}
|
||||
|
||||
|
||||
fn thread_ring(i: uint,
|
||||
count: uint,
|
||||
+num_chan: pipe,
|
||||
+num_port: pipe) {
|
||||
fn thread_ring(i: uint, count: uint, num_chan: pipe, num_port: pipe) {
|
||||
let mut num_chan = Some(num_chan);
|
||||
let mut num_port = Some(num_port);
|
||||
// Send/Receive lots of messages.
|
||||
|
|
|
@ -117,8 +117,9 @@ pub fn spawn_service_recv<T:Owned,Tb:Owned>(
|
|||
client
|
||||
}
|
||||
|
||||
fn switch<T:Owned,Tb:Owned,U>(+endp: core::pipes::RecvPacketBuffered<T, Tb>,
|
||||
f: &fn(+v: Option<T>) -> U) -> U {
|
||||
fn switch<T:Owned,Tb:Owned,U>(endp: core::pipes::RecvPacketBuffered<T, Tb>,
|
||||
f: &fn(v: Option<T>) -> U)
|
||||
-> U {
|
||||
f(core::pipes::try_recv(endp))
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ fn parse_opts(argv: ~[~str]) -> Config {
|
|||
}
|
||||
}
|
||||
|
||||
fn stress_task(&&id: int) {
|
||||
fn stress_task(id: int) {
|
||||
let mut i = 0;
|
||||
loop {
|
||||
let n = 15;
|
||||
|
|
|
@ -46,7 +46,7 @@ fn grandchild_group(num_tasks: uint) {
|
|||
// Master grandchild task exits early.
|
||||
}
|
||||
|
||||
fn spawn_supervised_blocking(myname: &str, +f: ~fn()) {
|
||||
fn spawn_supervised_blocking(myname: &str, f: ~fn()) {
|
||||
let mut res = None;
|
||||
let mut builder = task::task();
|
||||
builder.future_result(|r| res = Some(r));
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn f(&&n: uint) {
|
||||
fn f(n: uint) {
|
||||
let mut i = 0u;
|
||||
while i < n {
|
||||
task::try(|| g() );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue