Stability | experimental |
---|---|
Maintainer | Patrick Perry <patperry@stanford.edu> |
Data.Vector.Dense.IO
Description
Mutable vectors in the IO monad.
- data IOVector n e
- vectorViewArray :: Elem e => ForeignPtr e -> Int -> Int -> IOVector n e
- vectorViewArrayWithStride :: Elem e => Int -> ForeignPtr e -> Int -> Int -> IOVector n e
- withIOVector :: IOVector n e -> (Ptr e -> IO a) -> IO a
- module Data.Vector.Dense.Class
The IOVector data type
Dense vectors in the IO
monad. The type arguments are as follows:
-
n
: a phantom type for the dimension of the vector -
e
: the element type of the vector. Only certain element types are supported.
Instances
Shaped IOVector Int | |
Elem e => BaseVector IOVector e | |
BLAS1 e => WriteVector IOVector e IO | |
BLAS1 e => ReadVector IOVector e IO | |
BLAS1 e => WriteTensor IOVector Int e IO | |
Elem e => ReadTensor IOVector Int e IO |
Arguments
:: Elem e | |
=> ForeignPtr e | |
-> Int | offset |
-> Int | length |
-> IOVector n e |
View an array in memory as a vector.
vectorViewArrayWithStrideSource
View an array in memory as a vector, with the given stride.
withIOVector :: IOVector n e -> (Ptr e -> IO a) -> IO aSource
Execute an IO
action with a pointer to the first element in the
vector.
Overloaded mutable dense vector interface
module Data.Vector.Dense.Class