Navigation Menu

Skip to content

Commit

Permalink
mandelbrot: fix overlapping buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryman committed Jul 13, 2014
1 parent ffd9966 commit 407fe9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/bench/shootout-mandelbrot.rs
Expand Up @@ -64,7 +64,7 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
let chunk_size = h / WORKERS;

// Account for remainders in workload division, e.g. 1000 / 16 = 62.5
let first_chunk_size = if h % WORKERS != 0 {
let last_chunk_size = if h % WORKERS != 0 {
chunk_size + h % WORKERS
} else {
chunk_size
Expand All @@ -87,8 +87,8 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
let mut is = Vec::with_capacity(w / WORKERS);

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

9 comments on commit 407fe9a

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 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 Ryman@407fe9a

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 2014

Choose a reason for hiding this comment

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

merging Ryman/rust/mandelbrot_fix = 407fe9a into auto

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 2014

Choose a reason for hiding this comment

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

Ryman/rust/mandelbrot_fix = 407fe9a merged ok, testing candidate = 4056d583

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 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 Ryman@407fe9a

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 2014

Choose a reason for hiding this comment

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

merging Ryman/rust/mandelbrot_fix = 407fe9a into auto

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 2014

Choose a reason for hiding this comment

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

Ryman/rust/mandelbrot_fix = 407fe9a merged ok, testing candidate = ef352fa

@bors
Copy link
Contributor

@bors bors commented on 407fe9a Jul 18, 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 = ef352fa

Please sign in to comment.