[commit: dph] master: Add note about behaviour of indicesSS (0132b30)

Ben Lippmeier benl at ouroborus.net
Thu May 12 15:42:52 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/dph

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0132b30ddf4613c52b5f86c0f7f4a8d73632c3e2

>---------------------------------------------------------------

commit 0132b30ddf4613c52b5f86c0f7f4a8d73632c3e2
Author: Ben Lippmeier <benl at ouroborus.net>
Date:   Wed May 11 18:25:19 2011 +1000

    Add note about behaviour of indicesSS

>---------------------------------------------------------------

 dph-base/Data/Array/Parallel/Stream.hs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dph-base/Data/Array/Parallel/Stream.hs b/dph-base/Data/Array/Parallel/Stream.hs
index 3b212e1..93d667d 100644
--- a/dph-base/Data/Array/Parallel/Stream.hs
+++ b/dph-base/Data/Array/Parallel/Stream.hs
@@ -17,8 +17,6 @@
 --       in this module have INLINE_STREAM, and all 'next' functions have
 --       INLINE_INNER? If not we should document the reasons for the special cases.
 --
--- TODO: The behavour of indicesSS looks suspiciously inconsistent.

>---------------------------------------------------------------

 --
 -- Note: [NEVER ENTERED]
 -- ~~~~~~~~~~~~~~~~~~~~~
@@ -509,8 +507,11 @@ divSize Unknown   _ = Unknown
 --  = [4,5,6,0,1,2,3,4,0,1,2,3,4,5,6]
 -- @
 --
--- TODO: Is that correct? Why does the first segment in the result start from 4, 
---       unlike the others?
+-- Note that we can set the starting value of the first segment independently
+-- via the second argument of indicesSS. We use this when distributing arrays
+-- across worker threads, as a thread's chunk may not start exactly at a 
+-- segment boundary, so the index of a thread's first data element may not be
+-- zero.
 --
 indicesSS 
         :: Int





More information about the Cvs-libraries mailing list