blas-0.5: Bindings to the BLAS librarySource codeContentsIndex
Data.Matrix.Dense.Operations
Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>
Contents
Copy and swap
Matrix Arithmetic
Pure
Impure
In-place operations
BLAS operations
Unsafe operations
Description
Synopsis
copyMatrix :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()
swapMatrices :: BLAS1 e => IOMatrix (m, n) e -> IOMatrix (m, n) e -> IO ()
shift :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e
scale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e
invScale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e
add :: BLAS1 e => e -> Matrix (m, n) e -> e -> Matrix (m, n) e -> Matrix (m, n) e
plus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e
minus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e
times :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e
divide :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e
getShifted :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
getScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
getInvScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
getSum :: BLAS1 e => e -> DMatrix s (m, n) e -> e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
getDiff :: BLAS1 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
getProduct :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
getRatio :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)
doConj :: BLAS1 e => IOMatrix (m, n) e -> IO ()
shiftBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO ()
scaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO ()
invScaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO ()
axpy :: BLAS1 e => e -> DMatrix t (m, n) e -> IOMatrix (m, n) e -> IO ()
(+=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()
(-=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()
(*=) :: BLAS2 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()
(//=) :: BLAS2 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()
gemv :: BLAS3 e => e -> DMatrix s (m, n) e -> DVector t n e -> e -> IOVector m e -> IO ()
gemm :: BLAS3 e => e -> DMatrix s (m, k) e -> DMatrix t (k, n) e -> e -> IOMatrix (m, n) e -> IO ()
unsafeCopyMatrix :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()
unsafeSwapMatrices :: BLAS1 e => IOMatrix (m, n) e -> IOMatrix (m, n) e -> IO ()
Copy and swap
copyMatrix :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()Source
copy dst src copies the elements from the second argument to the first.
swapMatrices :: BLAS1 e => IOMatrix (m, n) e -> IOMatrix (m, n) e -> IO ()Source
swap a b exchanges the elements stored in two matrices.
Matrix Arithmetic
Pure
shift :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) eSource
Form a new matrix by adding a value to every element in a matrix.
scale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) eSource
Create a new matrix by scaling another matrix by the given value.
invScale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) eSource
Form a new matrix by dividing every element by a value.
add :: BLAS1 e => e -> Matrix (m, n) e -> e -> Matrix (m, n) e -> Matrix (m, n) eSource
Create a new matrix by taking the elementwise sum of two matrices.
plus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) eSource
Create a new matrix by taking the elementwise sum of two matrices.
minus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) eSource
Create a new matrix by taking the elementwise difference of two matrices.
times :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) eSource
Create a new matrix by taking the elementwise product of two matrices.
divide :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) eSource
Create a new matrix by taking the elementwise ratio of two matrices.
Impure
getShifted :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Form a new matrix by adding a value to every element in a matrix.
getScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Form a new matrix by multiplying every element by a value.
getInvScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Form a new matrix by dividing every element by a value.
getSum :: BLAS1 e => e -> DMatrix s (m, n) e -> e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Create a new matrix by taking the elementwise sum of two matrices.
getDiff :: BLAS1 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Create a new matrix by taking the elementwise difference of two matrices.
getProduct :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Create a new matrix by taking the elementwise product of two matrices.
getRatio :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e)Source
Create a new matrix by taking the elementwise ratio of two matrices.
In-place operations
doConj :: BLAS1 e => IOMatrix (m, n) e -> IO ()Source
Conjugate every element in a matrix.
shiftBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO ()Source
Scale every element by the given value.
scaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO ()Source
Scale every element in a matrix by the given value.
invScaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO ()Source
Divide every element by the given value.
axpy :: BLAS1 e => e -> DMatrix t (m, n) e -> IOMatrix (m, n) e -> IO ()Source
(+=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()Source
In-place elementwise add.
(-=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()Source
In-place elementwise subtract.
(*=) :: BLAS2 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()Source
In-place elementwise product.
(//=) :: BLAS2 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()Source
In-place elementwise divide.
BLAS operations
gemv :: BLAS3 e => e -> DMatrix s (m, n) e -> DVector t n e -> e -> IOVector m e -> IO ()Source
gemv alpha a x beta y replaces y := alpha a * x + beta y.
gemm :: BLAS3 e => e -> DMatrix s (m, k) e -> DMatrix t (k, n) e -> e -> IOMatrix (m, n) e -> IO ()Source
gemm alpha a b beta c replaces c := alpha a * b + beta c.
Unsafe operations
unsafeCopyMatrix :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO ()Source
unsafeSwapMatrices :: BLAS1 e => IOMatrix (m, n) e -> IOMatrix (m, n) e -> IO ()Source
Produced by Haddock version 2.3.0