Boost logo

Boost Users :

Subject: Re: [Boost-users] [mapreduce] Prim Calculator
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-08-22 12:18:56


Hi Craig,

I also have rewritten the prime_calculator. I never like that the fact
that the reduce key type was std::size_t. It should be bool. is_prime
is now returning a boolean. I also have changed map value type from
std::pair<std::size_t,std::size_t> to just std::size_t. I hope this is
correct in terms of the mapreduce methodologies.

To adopt the mapreduce problem description notation this is what I want:

map: ( number, number ) -----> list( boolean, number )
reduce: ( boolean, list( number ) ---------> list( number )

Well, it all compiles and runs but the results is empty. I have
intercepted the reduce function and the supplied list is correct.
Meaning all primes are in there. Weird. Dunno what's wrong here.

To make sure we are on the same page, I have added this project to my
subversion on google code. Here is the link:
http://gil-contributions.googlecode.com/svn/trunk/prime_calculator

Regards,
Christian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net