repa: fromVector

Don Stewart dons00 at gmail.com
Thu May 19 17:52:25 CEST 2011


It doesn't do any copying.

On Thu, May 19, 2011 at 3:27 AM, Christian Höner zu Siederdissen
<choener at tbi.univie.ac.at> wrote:
> Hi,
>
> I'd like to use repa in a rather perverted mode, I guess:
>
> for my programs I need to be able to update arrays in place and
> repeatedly perform operations on them.
> Right now, it basically works like this (in ST):
>
> - create unboxed space using "primitive" (same as unboxed vectors)
> - unsafefreeze unboxed space
> - perform calculations on frozen, immutable space
> - write result into mutable space (which is shared with the unsafefrozen
>  space)
>
> - In principle, this should work with repa as well, I think. The
>  question is: does "Repa.Internals.Base.fromVector" any copying, or
>  does it just use the unboxed vector as-is internally?
>
> should I expect any problems? ;-)
>
> Gruss,
> Christian
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
>



More information about the Glasgow-haskell-users mailing list