blas-0.7.1: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Matrix.Dense.IO

Contents

Description

Mutable dense matrices in the IO monad.

Synopsis

The IOMatrix data type

data IOMatrix np e Source

Dense matrix in the IO monad. The type arguments are as follows:

  • np: a phantom type for the shape of the matrix. Most functions will demand that this be specified as a pair. When writing a function signature, you should always prefer IOMatrix (n,p) e to IOMatrix np e.
  • e: the element type of the matrix. Only certain element types are supported.

withIOMatrix :: IOMatrix (n, p) e -> (Ptr e -> IO a) -> IO aSource

Perform an IO action with a pointer to the first element of the matrix.

matrixViewArraySource

Arguments

:: Elem e 
=> ForeignPtr e 
-> Int

offset

-> (Int, Int)

shape

-> IOMatrix (n, p) e 

View an array in memory as a matrix.

matrixViewArrayWithLdaSource

Arguments

:: Elem e 
=> Int

leading dimension size

-> ForeignPtr e 
-> Int

offset

-> (Int, Int)

shape

-> IOMatrix (n, p) e 

View an array in memory as a matrix, with the given leading dimension size.

Overloaded mutable dense matrix interface