From 52e1d19446ceaa63bee7dd6f567a4d34c7a25e27 Mon Sep 17 00:00:00 2001 From: Mahmut Bulut Date: Tue, 12 Nov 2019 02:13:40 +0100 Subject: [PATCH] More consistent example --- bastion/examples/parallel_computation.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bastion/examples/parallel_computation.rs b/bastion/examples/parallel_computation.rs index 8b65506c..06bc86a8 100644 --- a/bastion/examples/parallel_computation.rs +++ b/bastion/examples/parallel_computation.rs @@ -5,7 +5,7 @@ use std::sync::Arc; /// Parallel computation (MapReduce) job example /// /// Prologue: -/// This example maps a range of values([0,1,2,3,4,0,1,2,3,4...]) one by one: +/// This example maps a stream of cycling values([0,1,2,3,4,0,1,2,3,4...]) one by one: /// to 10 workers and every worker compute the double of what they receive and send back. /// /// Then mapper aggregates the doubled values and sum them. @@ -91,8 +91,6 @@ fn main() { fn cycle(x: u64, at_most: u64) -> u64 { let mut x = x; - x ^= (x << 21); - x ^= (x >> 35); - x ^= (x << 4); + x += 1; x % at_most }