Ticket #23 (closed feature request: fixed)
Support non-identity elements for scan, fold
| Reported by: | seanl | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | CUDA backend | Version: | 0.8.0.0 |
| Keywords: | Cc: |
Description
It seems that the default value is ignored for Prelude.snd $ Acc.scanl. For example
CUDA.run $ Prelude.snd $ Acc.scanl (+) 5 (Acc.use (fromList 10 [0..]) :: Acc (Vector Word32))
should produce
Array () [50]
however, it produces
Array () [45]
which is
0+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
CUDA.run $ Prelude.snd $ Acc.scanl (*) 5 (Acc.use (fromList 10 [1..]) :: Acc (Vector Word32))
should produce
Array () [18144000]
however it produces
Array () [3628800]
which is
1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10
Change History
Note: See
TracTickets for help on using
tickets.
