Skip to content

Commit

Permalink
fix shootout-mandelbrot to make it pass the shootout test
Browse files Browse the repository at this point in the history
  • Loading branch information
TeXitoi committed Oct 11, 2014
1 parent 4d031d7 commit 6165875
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/test/bench/shootout-mandelbrot.rs
Expand Up @@ -126,7 +126,15 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
Future::spawn(proc () {
let mut res: Vec<u8> = Vec::with_capacity((chunk_size * w) / 8);
let init_r_slice = vec_init_r.as_slice();
for &init_i in vec_init_i.slice(i * chunk_size, (i + 1) * chunk_size).iter() {

let start = i * chunk_size;
let end = if i == (WORKERS - 1) {
start + last_chunk_size
} else {
(i + 1) * chunk_size
};

for &init_i in vec_init_i.slice(start, end).iter() {
write_line(init_i, init_r_slice, &mut res);
}

Expand Down

5 comments on commit 6165875

@bors
Copy link
Contributor

@bors bors commented on 6165875 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at TeXitoi@6165875

@bors
Copy link
Contributor

@bors bors commented on 6165875 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging TeXitoi/rust/fix-mandelbrot = 6165875 into auto

@bors
Copy link
Contributor

@bors bors commented on 6165875 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeXitoi/rust/fix-mandelbrot = 6165875 merged ok, testing candidate = a0ea210

@bors
Copy link
Contributor

@bors bors commented on 6165875 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 6165875 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = a0ea210

Please sign in to comment.