1

Closed

Book Errata

description

This issue is designed for tracking errata in the book text. Things like minor typos.
 
Added as comments below...
Closed Oct 19, 2012 at 3:47 AM by AdeMiller
All these comments have been moved to the errata page on O'Reilly's site.http://www.oreillynet.com/oreilly/authors/errata.csp?b=0790145310507

comments

AdeMiller wrote May 12, 2011 at 2:42 PM

There is an in Considerations for Small Loop Bodies section of fourth chapter:

When you have small loop bodies, you can apply the techniques that were described in Chapter 3, "Parallel Loops" in the "Special Handling of Small Loop Bodies" section.

But Parallel Loops is not the third chapter but second.

wrote May 12, 2011 at 2:44 PM

jsh003guardz63 wrote Jul 19, 2011 at 4:09 PM

Minor typo - page 72. "that implied data flow" should be "than implied data flow".

jsh003guardz63 wrote Jul 19, 2011 at 4:10 PM

Minor typo - page 131. "proved by the Concurrency Runtime" should be "provided by the Concurrency Runtime ".

jsh003guardz63 wrote Jul 19, 2011 at 4:14 PM

Page 120 – “could cause bugs” is incorrect. This “is a defect in the design and/or implementation” or “might result in unintended behaviour”, but it doesn’t “cause bugs”.

jsh003guardz63 wrote Jul 19, 2011 at 4:17 PM

Minor typo – page 115. “use patterns” should be “usage patterns” or “patterns of use”.

jsh003guardz63 wrote Jul 19, 2011 at 4:20 PM

The explanation of performance characteristics of pipelines on p96 needs clarification and possibly correction.

In particular, “If there are enough available cores, and if all stages of a pipeline take an equal amount of time, the execution time for the pipeline as a whole is the same as the time for just one stage”, would appear to be incorrect.

If:
S = the number of stages in figure 4 (= 4)
N = the number of images in figure 4 (= 6)
T = the duration to process one stage for one image (= t1 - t0 = t2 – t1)
Then:
The elapsed time for a completely parallel and completely efficient pipeline is (S+N-1) * T.
The elapsed time taken for one stage = N * T.
But:
(S+N-1) x T is only equal to N * T when S = 1.
If the sidebar on p96 is referring to the case where S = 1, the phrasing of that sidebar needs changing, as it currently implies that (S+N-1) x T = N * T for any S. If the sidebar isn't referring to the case where S = 1, it needs re-wording as its intended meaning is unclear and/or incorrect. Possibly, it's trying to say that each core has an equal execution time, but I don't think that's the intended meaning... it’s hard to be sure what it is trying to say.

jsh003guardz63 wrote Jul 19, 2011 at 4:22 PM

Page 91 - given the text about CreateSentencesAgent, it's odd that the corresponding code block is not shown on this page.

Niels_Dekker wrote Sep 1, 2011 at 3:15 PM

Chapter 2, Parallel Loops, shows four calls to Concurrency::parallel_for<_Index_type,_Function>, each of them having an unsigned int ('0u') as first argument, and either a size_t or a vector::size_type as second argument. This causes compile errors when the target platform is x64:

error C2782: 'void Concurrency::parallel_for(_Index_type,_Index_type,const _Function &)' : template parameter '_Index_type' is ambiguous

I would suggest to explicitly specify the first template argument:
Find what: 'parallel_for(0u'
Replace with: 'parallel_for<size_t>(0u'

Niels_Dekker wrote Sep 1, 2011 at 3:44 PM

Chapter 2, Parallel Loops, p15 (http://msdn.microsoft.com/en-us/library/gg663527.aspx) says: 'replace the for_each keyword with a call to the parallel_for_each method'. However, 'for_each' is not a keyword. (At least, not according the C++ Standard.) So instead, I would suggest: 'replace the for_each call with a call to the parallel_for_each method'.

Niels_Dekker wrote Sep 22, 2011 at 10:17 AM

Chapter 4, Parallel Aggregation (msdn.microsoft.com/en-us/library/gg663540.aspx) page 46 ends with:

combinable<int> count( { return 0; });

I think it's worth noting that the default-constructor of combinable<int> also takes care of having its thread-private (local) values zero-initialized. So in this case, it's not really necessary to explicitly specify an initialization function; the following also does the job:

combinable<int> count; // Default constructed.

wrote Oct 19, 2012 at 3:47 AM

wrote Feb 14, 2013 at 2:03 AM

wrote May 16, 2013 at 7:30 AM