repa-array-4.1.0.1: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Array.Auto.Unpack

Synopsis

Documentation

packForeign Source

Arguments

:: (Packable format, Bulk A (Value format)) 
=> format

Binary format for each element.

-> Array (Value format)

Source elements.

-> Maybe (Array Word8)

Packed binary data.

Pack some array elements into a foreign buffer using the given binary format.

unpackForeign Source

Arguments

:: (Packable format, Target A (Value format)) 
=> format

Binary format for each element.

-> Array Word8

Packed binary data.

-> Maybe (Array (Value format))

Unpacked elements.

Unpack an array of elements from a foreign buffer into their standard in-memory representation.

The binary format of the elements in the buffer is given by the format specififier, while the in-memory representation is chosen automagically based on the type of the elements.