[Haskell-cafe] Accelerate package (CUDA). How to actually create an array?

Don Stewart dons00 at gmail.com
Mon May 16 19:05:23 CEST 2011


You might want to read the Repa tutorial:

    http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Repa_Tutorial

e.g.

    fromList (Z :. (3::Int)) [1,2,3]

2011/5/16 Grigory Sarnitskiy <sargrigory at ya.ru>:
>> There's fromIArray and fromList [1].  Does that answer your question?
>
> Huh, yes, thank you! But still I don't get it. Neither
>
> arr1 = fromList 3 [1,2,3] :: Array DIM1 Int
>
> nor
>
> arr1 = fromList (1,3) [1,2,3] :: Array DIM1 Int
>
> works
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list