blas-0.7.1: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Vector.Dense.IO

Contents

Description

Mutable vectors in the IO monad.

Synopsis

The IOVector data type

data IOVector n e Source

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.

vectorViewArraySource

Arguments

:: Elem e 
=> ForeignPtr e 
-> Int

offset

-> Int

length

-> IOVector n e 

View an array in memory as a vector.

vectorViewArrayWithStrideSource

Arguments

:: Elem e 
=> Int

stride

-> ForeignPtr e 
-> Int

offset

-> Int

length

-> IOVector n e 

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