From 3a9bf2811dfb648e446942441edee6ca4ce82236 Mon Sep 17 00:00:00 2001 From: Paul Ojanen Date: Sun, 5 Apr 2015 03:57:19 -0400 Subject: [PATCH] fix doc for AccArray invariants The length of each payload array should be the _product_ of it array's dimensions, not the sum. --- backend-kit/Data/Array/Accelerate/BackendKit/IRs/SimpleAcc.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-kit/Data/Array/Accelerate/BackendKit/IRs/SimpleAcc.hs b/backend-kit/Data/Array/Accelerate/BackendKit/IRs/SimpleAcc.hs index 5b7679c..afff191 100644 --- a/backend-kit/Data/Array/Accelerate/BackendKit/IRs/SimpleAcc.hs +++ b/backend-kit/Data/Array/Accelerate/BackendKit/IRs/SimpleAcc.hs @@ -550,7 +550,7 @@ findFree Prog{progBinds} = S.difference allFreeVars $ S.intersection allFreeVars -- -- Invariant: all payload arrays should be the same length, and: -- --- > sum (arrDim a) == length (arrPayloads a !! i) +-- > product (arrDim a) == length (arrPayloads a !! i) -- -- The array dimensions are stored from the "inner" to the "outer" dimension. -- That is, if you do a fold, the first element of the list is the dimension