Hello all,
By the way, is there any reason to prefer package 'vector' over package
'array'? Do they just provide different interfaces to similar
functionnalities or are there real performance stakes?
I personnaly prefer Data.Array, since:
- It gives the possibility to index with something else
Yes, the differences between
* vector
* array
* repa
were discussed this week on Stack Overflow:
http://stackoverflow.com/questions/6006304/what-haskell-representation-is-recommended-for-2d-unboxed-pixel-arrays-with-mill
The reason to prefer vectors of arrays are:
* flexible interface
On Tue, May 17, 2011 at 8:30 PM, Don Stewart don...@gmail.com wrote:
* vector
* array
* repa
Don, do you think that repa is as recommended as vector for
production applications? I'm asking so because it is my understanding
that accelerate still isn't mature enough to be used in production
Well, repa doesn't have a GPU backend. So if you need GPU stuff, you
probably do need to look at accelerate.
I think Repa is in beta now, the API might change a little (e.g.
we're discussing making the stuff under the hood Storable class
friendly). It also only has a small number of users, while
I also recently implemented a Fisher-Yates shuffle in mutable vectors.
I probably should have used Gen (from mwc-random) in ST, but I already
had a GenIO hanging around for other reasons.
--
import
There is vector-algorithms [1] which has lots of mutable code. Note
that it uses 'PrimMonad m = m ...', which means that the code may
work on ST or IO.
Cheers,
[1] http://hackage.haskell.org/package/vector-algorithms
--
Felipe.
___
Haskell-Cafe
brad clawsie clawsie at fastmail.fm writes:
hi all
i was wondering if anyone could post some minimal examples on using
mutable Vectors in the ST monad. i've been digging around in the usual
places but haven't been able to find anything to get me over the hump
thanks in advance
brad
hi all
i was wondering if anyone could post some minimal examples on using
mutable Vectors in the ST monad. i've been digging around in the usual
places but haven't been able to find anything to get me over the hump
thanks in advance
brad
___
In my tutorial on using vectors,
http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial
There's some examples:
http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial#Impure_Arrays
that work in IO, and should work equally well in ST (as vectors are
parameterized by
Hi Brad
I think all you can do with an ST array is covered by the MArray class
and its derived operations - note the class is exported opaquely from
Data.Array.MArray - it has these two members that aren't exported so
aren't documented:
unsafeRead :: Ix i = a i e - Int - m e
unsafeWrite :: Ix
On Friday 22 April 2011 20:14:38, Stephen Tetley wrote:
Hi Brad
I think all you can do with an ST array is covered by the MArray class
and its derived operations - note the class is exported opaquely from
Data.Array.MArray - it has these two members that aren't exported so
aren't
11 matches
Mail list logo