accelerate-io-bytestring-0.1.0.0: Convert between Accelerate and ByteString

Copyright[2010..2020] The Accelerate Team
LicenseBSD3
MaintainerTrevor L. McDonell <trevor.mcdonell@gmail.com>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.IO.Data.ByteString

Description

Conversion between strict ByteStrings and Accelerate Arrays.

Synopsis

Documentation

fromByteStrings :: forall sh e. (Shape sh, Elt e) => sh -> ByteStrings (EltR e) -> Array sh e Source #

O(1). Treat a set of strict ByteStrings as an Accelerate array. The type of the elements e in the output Accelerate array determines the structure of the collection.

Data is considered to be in row-major order. You must ensure that each input contains the right number of bytes (this is not checked).

The input data may not be modified through the ByteStrings afterwards.

since 0.1.0.0

toByteStrings :: forall sh e. (Shape sh, Elt e) => Array sh e -> ByteStrings (EltR e) Source #

O(1). Convert an Accelerate Array into a collection of strict ByteStrings. The element type e will determine the structure of the output collection.

Data is considered to be in row-major order.

since 0.1.0.0