Copyright | [2010..2020] The Accelerate Team |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <trevor.mcdonell@gmail.com> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Conversion between strict ByteString
s and Accelerate Array
s.
Synopsis
- type family ByteStrings e where ...
- fromByteStrings :: forall sh e. (Shape sh, Elt e) => sh -> ByteStrings (EltR e) -> Array sh e
- toByteStrings :: forall sh e. (Shape sh, Elt e) => Array sh e -> ByteStrings (EltR e)
Documentation
type family ByteStrings e where ... Source #
A family of types that represents a collection of ByteString
s. The
structure of the collection depends on the element type e
.
ByteStrings () = () | |
ByteStrings Int = ByteString | |
ByteStrings Int8 = ByteString | |
ByteStrings Int16 = ByteString | |
ByteStrings Int32 = ByteString | |
ByteStrings Int64 = ByteString | |
ByteStrings Word = ByteString | |
ByteStrings Word8 = ByteString | |
ByteStrings Word16 = ByteString | |
ByteStrings Word32 = ByteString | |
ByteStrings Word64 = ByteString | |
ByteStrings Half = ByteString | |
ByteStrings Float = ByteString | |
ByteStrings Double = ByteString | |
ByteStrings Bool = ByteString | |
ByteStrings Char = ByteString | |
ByteStrings (Vec n a) = ByteStrings a | |
ByteStrings (a, b) = (ByteStrings a, ByteStrings b) |
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 ByteString
s 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