Changes between Version 31 and Version 32 of WikiStart


Ignore:
Timestamp:
Jun 14, 2011, 12:24:24 PM (13 years ago)
Author:
Ben Lippmeier
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v31 v32  
    3030Q: How to I map a function across all slices in an array? [[br]]
    3131A: 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
     33Q: Why is my program so slow? [[br]]
     34A: 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.
    3235
    3336Q: Where do I ask further questions? [[br]]