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 |
- type family ForeignPtrs e
- fromForeignPtrs :: (Shape sh, Elt e) => sh -> ForeignPtrs (EltRepr e) -> Array sh e
- toForeignPtrs :: (Shape sh, Elt e) => Array sh e -> ForeignPtrs (EltRepr e)
Documentation
type family ForeignPtrs e Source #
A family of types which represent a collection of ForeignPtr
s. The
structure of the collection depends on the element type e
.
fromForeignPtrs :: (Shape sh, Elt e) => sh -> ForeignPtrs (EltRepr e) -> Array sh e Source #
O(1). Treat the set of ForeignPtrs
as an Accelerate array. The type of
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 of the input pointers contains the right number of elements.
The data may not be modified through the ForeignPtr
s afterwards.
You should make sure that the data is suitably aligned.
since 1.1.0.0
toForeignPtrs :: (Shape sh, Elt e) => Array sh e -> ForeignPtrs (EltRepr e) Source #
O(1). Yield the ForeignPtr
s underlying the given Accelerate Array
.
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