Copyright | [2010..2011] Sean Seefried [2010..2017] Trevor L. McDonell |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Conversion between strict ByteString
s and Accelerate Array
s.
- type family ByteStrings e
- fromByteStrings :: (Shape sh, Elt e) => sh -> ByteStrings (EltRepr e) -> Array sh e
- toByteStrings :: (Shape sh, Elt e) => Array sh e -> ByteStrings (EltRepr e)
Documentation
type family ByteStrings e Source #
A family of types that represents a collection of ByteString
s. The
structure of the collection depends on the element type e
.
fromByteStrings :: (Shape sh, Elt e) => sh -> ByteStrings (EltRepr 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 1.1.0.0
toByteStrings :: (Shape sh, Elt e) => Array sh e -> ByteStrings (EltRepr 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 1.1.0.0