Changes between Version 31 and Version 32 of WikiStart
- Timestamp:
- Jun 14, 2011, 12:24:24 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v31 v32 30 30 Q: How to I map a function across all slices in an array? [[br]] 31 31 A: This is not possible in general because we can't guarantee that the worker function will return a slice with the same shape as the original. If the slices only contain a few elements (up to six) then your best bet is to use an array of tuples and use the regular `map` function to apply the worker to all the tuples. This approach is limited to 6-tuples because that's the maximum the `Data.Vector` library currently supports, and `Repa` uses `Data.Vector` to store manifest arrays. See #22 for discussion. 32 33 Q: Why is my program so slow? [[br]] 34 A: Probably because you haven't forced your source arrays before traversing them, or haven't added enough INLINE pragmas. Read [http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Repa_Tutorial#Optimising_Repa_programs the optimisation section] in the tutorial, then [http://stackoverflow.com/questions/6300428/poor-performance-with-transpose-and-cumulative-sum-in-repa This Answer] on Stack Overflow. If that doesn't help then continue to the next question. 32 35 33 36 Q: Where do I ask further questions? [[br]]