accelerate-arithmetic-1.0: Linear algebra and interpolation using the Accelerate framework

Data.Array.Accelerate.LinearAlgebra

Synopsis

# Documentation

type Scalar ix a = Acc (Array ix a) Source #

type Vector ix a = Acc (Array (ix :. Int) a) Source #

type Matrix ix a = Acc (Array ((ix :. Int) :. Int) a) Source #

transpose :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Matrix ix a Source #

numElems :: (Shape ix, Slice ix, Elt a) => Vector ix a -> Exp Int Source #

numRows :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Exp Int Source #

numCols :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Exp Int Source #

vectorShape :: (Shape ix, Slice ix, Elt a) => Vector ix a -> Exp ix :. Exp Int Source #

matrixShape :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> (Exp ix :. Exp Int) :. Exp Int Source #

withVectorIndex :: (Shape ix, Slice ix, Lift Exp a) => ((Exp ix :. Exp Int) -> a) -> Exp (ix :. Int) -> Exp (Plain a) Source #

withMatrixIndex :: (Shape ix, Slice ix, Lift Exp a) => (((Exp ix :. Exp Int) :. Exp Int) -> a) -> Exp ((ix :. Int) :. Int) -> Exp (Plain a) Source #

outer :: (Shape ix, Slice ix, Num a) => Vector ix a -> Vector ix a -> Matrix ix a Source #

multiplyMatrixVector :: (Shape ix, Slice ix, Num a) => Matrix ix a -> Vector ix a -> Vector ix a Source #

multiplyMatrixMatrix :: (Shape ix, Slice ix, Num a) => Matrix ix a -> Matrix ix a -> Matrix ix a Source #

newtonInverse :: (Shape ix, Slice ix, Num a) => Exp Int -> Matrix ix a -> Matrix ix a -> Matrix ix a Source #

newtonInverseStep :: (Shape ix, Slice ix, Num a) => Matrix ix a -> Matrix ix a -> Matrix ix a Source #

identity :: (Shape ix, Slice ix, Elt a, FromIntegral Int a) => Exp ((ix :. Int) :. Int) -> Matrix ix a Source #

scaleRows :: (Slice ix, Shape ix, Num a) => Vector ix a -> Matrix ix a -> Matrix ix a Source #

zipScalarVectorWith :: (Slice ix, Shape ix, Elt a, Elt b, Elt c) => (Exp a -> Exp b -> Exp c) -> Scalar ix a -> Vector ix b -> Vector ix c Source #

zipScalarMatrixWith :: (Slice ix, Shape ix, Elt a, Elt b, Elt c) => (Exp a -> Exp b -> Exp c) -> Scalar ix a -> Matrix ix b -> Matrix ix c Source #

columnFromVector :: (Shape ix, Slice ix, Elt a) => Vector ix a -> Matrix ix a Source #

vectorFromColumn :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Vector ix a Source #

input must be a matrix with exactly one column

flattenMatrix :: (Slice ix, Shape ix, Elt a) => Matrix ix a -> Vector ix a Source #

restoreMatrix :: (Slice ix, Shape ix, Elt a) => Exp Int -> Vector ix a -> Matrix ix a Source #

extrudeVector :: (Shape ix, Slice ix, Elt a) => Exp ix -> Vector Z a -> Vector ix a Source #

extrudeMatrix :: (Shape ix, Slice ix, Elt a) => Exp ix -> Matrix Z a -> Matrix ix a Source #

zipExtrudedVectorWith :: (Slice ix, Shape ix, Elt a, Elt b, Elt c) => (Exp a -> Exp b -> Exp c) -> Vector Z a -> Vector ix b -> Vector ix c Source #

zipExtrudedMatrixWith :: (Slice ix, Shape ix, Elt a, Elt b, Elt c) => (Exp a -> Exp b -> Exp c) -> Matrix Z a -> Matrix ix b -> Matrix ix c Source #

gatherFromVector :: (Shape ix, Elt a) => Scalar ix Int -> Vector Z a -> Scalar ix a Source #