repa-3.2.3.3: High performance, regular, shape polymorphic parallel arrays.

Safe Haskell | None

Data.Array.Repa.Repr.ByteString

Synopsis

- data B
- fromByteString :: Shape sh => sh -> ByteString -> Array B sh Word8
- toByteString :: Array B sh Word8 -> ByteString

# Documentation

data B Source

Strict ByteStrings arrays are represented as ForeignPtr buffers of Word8

Instances

Source B Word8 | Read elements from a `ByteString`.
Structured B Word8 b |
Read sh => Read (Array B sh Word8) |
Show sh => Show (Array B sh Word8) |

fromByteString :: Shape sh => sh -> ByteString -> Array B sh Word8 Source

O(1). Wrap a `ByteString` as an array.

toByteString :: Array B sh Word8 -> ByteString Source

O(1). Unpack a `ByteString` from an array.