Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Scalar ix a = Acc (Array ix a)
- type Vector ix a = Acc (Array (ix :. Int) a)
- type Matrix ix a = Acc (Array ((ix :. Int) :. Int) a)
- transpose :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Matrix ix a
- numElems :: (Shape ix, Slice ix, Elt a) => Vector ix a -> Exp Int
- numRows :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Exp Int
- numCols :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Exp Int
- vectorShape :: (Shape ix, Slice ix, Elt a) => Vector ix a -> Exp ix :. Exp Int
- matrixShape :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> (Exp ix :. Exp Int) :. Exp Int
- withVectorIndex :: (Shape ix, Slice ix, Lift Exp a) => ((Exp ix :. Exp Int) -> a) -> Exp (ix :. Int) -> Exp (Plain a)
- withMatrixIndex :: (Shape ix, Slice ix, Lift Exp a) => (((Exp ix :. Exp Int) :. Exp Int) -> a) -> Exp ((ix :. Int) :. Int) -> Exp (Plain a)
- outer :: (Shape ix, Slice ix, Num a) => Vector ix a -> Vector ix a -> Matrix ix a
- multiplyMatrixVector :: (Shape ix, Slice ix, Num a) => Matrix ix a -> Vector ix a -> Vector ix a
- multiplyMatrixMatrix :: (Shape ix, Slice ix, Num a) => Matrix ix a -> Matrix ix a -> Matrix ix a
- newtonInverse :: (Shape ix, Slice ix, Num a) => Exp Int -> Matrix ix a -> Matrix ix a -> Matrix ix a
- newtonInverseStep :: (Shape ix, Slice ix, Num a) => Matrix ix a -> Matrix ix a -> Matrix ix a
- identity :: (Shape ix, Slice ix, Elt a, FromIntegral Int a) => Exp ((ix :. Int) :. Int) -> Matrix ix a
- scaleRows :: (Slice ix, Shape ix, Num a) => Vector ix a -> Matrix ix a -> Matrix ix a
- 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
- 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
- columnFromVector :: (Shape ix, Slice ix, Elt a) => Vector ix a -> Matrix ix a
- vectorFromColumn :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Vector ix a
- flattenMatrix :: (Slice ix, Shape ix, Elt a) => Matrix ix a -> Vector ix a
- restoreMatrix :: (Slice ix, Shape ix, Elt a) => Exp Int -> Vector ix a -> Matrix ix a
- extrudeVector :: (Shape ix, Slice ix, Elt a) => Exp ix -> Vector Z a -> Vector ix a
- extrudeMatrix :: (Shape ix, Slice ix, Elt a) => Exp ix -> Matrix Z a -> Matrix ix a
- 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
- 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
- gatherFromVector :: (Shape ix, Elt a) => Scalar ix Int -> Vector Z a -> Scalar ix a
Documentation
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 #
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 #
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 #
vectorFromColumn :: (Shape ix, Slice ix, Elt a) => Matrix ix a -> Vector ix a Source #
input must be a matrix with exactly one column
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 #