| Copyright | [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 |
Data.Array.Accelerate.IO.Data.Vector.Primitive
Documentation
type family Vectors e :: * Source #
A family of types which represent a collection of Primitive Vectors. The
structure of the collection depends on the element type e of the
corresponding Accelerate array.
Instances
| type Vectors Char Source # | |
| type Vectors Double Source # | |
| type Vectors Float Source # | |
| type Vectors Int Source # | |
| type Vectors Int8 Source # | |
| type Vectors Int16 Source # | |
| type Vectors Int32 Source # | |
| type Vectors Int64 Source # | |
| type Vectors Word Source # | |
| type Vectors Word8 Source # | |
| type Vectors Word16 Source # | |
| type Vectors Word32 Source # | |
| type Vectors Word64 Source # | |
| type Vectors () Source # | |
| type Vectors (a, b) Source # | |
toVectors :: (Shape sh, Elt e) => Array sh e -> Vectors (EltRepr e) Source #
O(1) (typically). Convert an Accelerate array into a collection of primitive vectors.
If the array data was allocated by Accelerate, this can typically be done without copying.
since 1.1.0.0
fromVectors :: (Shape sh, Elt e) => sh -> Vectors (EltRepr e) -> Array sh e Source #
O(n) (typically). Convert a collection of primitive vectors into an Accelerate array.
If the underlying vectors are pinned then this can be done without.
See also: https://ghc.haskell.org/trac/ghc/ticket/5556
since 1.1.0.0