accelerate-easy-0.1: Easier but less general interface to Accelerate.

Safe HaskellSafe-Infered

Data.Array.Accelerate.Easy.Matrix

Synopsis

Documentation

type Matrix a = Array DIM2 a

A matrix. This type is used both for matrices living on the GPU and on the CPU.

class MatrixIndex t where

The class of matrix indices. The only purpose of this class is to abstract over Exp (Int,Int), (Exp Int, Int), etc, for the users convenience.

Methods

toInd :: t -> Exp (Int, Int)

fromInd :: Exp (Int, Int) -> t

permute

Arguments

:: Elt a 
=> (Exp a -> Exp a -> Exp a)

Combine elements in the case of a collision. Second argument will contain the default.

-> Exp a 
-> ((Exp Int, Exp Int) -> (Exp Int, Exp Int)) 
-> Acc (Matrix a) 
-> Acc (Matrix a) 

transpose :: (Num a, Elt a) => Acc (Matrix a) -> Acc (Matrix a)