Ticket #22 (closed defect: fixed)
IndexScalar does not produce the correct value when it is used in the default value expression of scan and fold
| Reported by: | seanl | Owned by: | seanl |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | CUDA backend | Version: | 0.7.1.0 |
| Keywords: | Cc: |
Description (last modified by seanl) (diff)
IndexScalar does not produce the correct value when it is used in the default value expressions of scan and fold.
For example,
foo :: Vector Word32 -> Acc (Vector Word32)
foo xs
= let
xs' = use xs
in
Prelude.fst $ Acc.scanl const (xs' Acc.! constant 4) xs'
main :: IO ()
main = do
let input = fromList 10 [0..] :: Vector (Word32)
r <- CUDA.run $ foo input2
putStrLn $ show r
is meant to produce
Array 10 [4,4,4,4,4,4,4,4,4,4]
but it produces
Array 10 [0,0,0,0,0,0,0,0,0,0]
Change History
Note: See
TracTickets for help on using
tickets.
