Array copy primops

Roman Leshchinskiy rl at cse.unsw.edu.au
Wed Jan 26 11:46:45 CET 2011


Johan Tibell wrote:
>
> OK. So we can implement copyByteArray# by FFI importing memcpy and
> using the automatic conversion of ByteArray#s into pointers in the FFI. For
> MutableByteArray#s we need to use an unsafeCoerce# as well.

No. Both ByteArray# and MutableByteArray# can be passed to FFI calls.

Roman






More information about the Cvs-ghc mailing list