accelerate-utility-1.0.0.1: Utility functions for the Accelerate framework

Safe HaskellNone
LanguageHaskell98

Data.Array.Accelerate.Utility.Lift.Run

Description

Simplify running accelerate functions with multiple curried array and expression arguments.

Synopsis

Documentation

class C f where Source #

If you have a function:

f :: Exp a -> (Acc b, Acc c) -> (Acc d, Acc e)

you cannot run this immediately using run1, since run1 expects a function with a single Acc parameter and a single Acc result. Using the with function you can just run f as is:

with run1 f :: a -> (b,c) -> (d,e)

Minimal complete definition

with1

Associated Types

type Arguments a f Source #

type Result f Source #

type Plain f Source #

Methods

with1 :: Arrays a => ((Acc (Arguments a f) -> Acc (Result f)) -> Arguments a f -> Result f) -> (Acc a -> f) -> a -> Plain f Source #

Instances

C (Acc r) Source # 

Associated Types

type Arguments a (Acc r) :: * Source #

type Result (Acc r) :: * Source #

type Plain (Acc r) :: * Source #

Methods

with1 :: Arrays a => ((Acc (Arguments a (Acc r)) -> Acc (Result (Acc r))) -> Arguments a (Acc r) -> Result (Acc r)) -> (Acc a -> Acc r) -> a -> Plain (Acc r) Source #

(Argument arg, C f) => C (arg -> f) Source # 

Associated Types

type Arguments a (arg -> f) :: * Source #

type Result (arg -> f) :: * Source #

type Plain (arg -> f) :: * Source #

Methods

with1 :: Arrays a => ((Acc (Arguments a (arg -> f)) -> Acc (Result (arg -> f))) -> Arguments a (arg -> f) -> Result (arg -> f)) -> (Acc a -> arg -> f) -> a -> Plain (arg -> f) Source #

(Lift Acc r, Arrays (Plain r), Lift Acc s, Arrays (Plain s)) => C (r, s) Source # 

Associated Types

type Arguments a (r, s) :: * Source #

type Result (r, s) :: * Source #

type Plain (r, s) :: * Source #

Methods

with1 :: Arrays a => ((Acc (Arguments a (r, s)) -> Acc (Result (r, s))) -> Arguments a (r, s) -> Result (r, s)) -> (Acc a -> (r, s)) -> a -> Plain (r, s) Source #

(Lift Acc r, Arrays (Plain r), Lift Acc s, Arrays (Plain s), Lift Acc t, Arrays (Plain t)) => C (r, s, t) Source # 

Associated Types

type Arguments a (r, s, t) :: * Source #

type Result (r, s, t) :: * Source #

type Plain (r, s, t) :: * Source #

Methods

with1 :: Arrays a => ((Acc (Arguments a (r, s, t)) -> Acc (Result (r, s, t))) -> Arguments a (r, s, t) -> Result (r, s, t)) -> (Acc a -> (r, s, t)) -> a -> Plain (r, s, t) Source #

with :: C f => ((Acc (Arguments () f) -> Acc (Result f)) -> Arguments () f -> Result f) -> f -> Plain f Source #

class Arrays (Packed a) => Argument a where Source #

Minimal complete definition

tunnel

Associated Types

type Packed a Source #

type Unpacked a Source #

Methods

tunnel :: (Unpacked a -> Packed a, Acc (Packed a) -> a) Source #

Instances

Argument Z Source # 

Associated Types

type Packed Z :: * Source #

type Unpacked Z :: * Source #

Methods

tunnel :: (Unpacked Z -> Packed Z, Acc (Packed Z) -> Z) Source #

Arrays a => Argument (Acc a) Source # 

Associated Types

type Packed (Acc a) :: * Source #

type Unpacked (Acc a) :: * Source #

Methods

tunnel :: (Unpacked (Acc a) -> Packed (Acc a), Acc (Packed (Acc a)) -> Acc a) Source #

Elt a => Argument (Exp a) Source # 

Associated Types

type Packed (Exp a) :: * Source #

type Unpacked (Exp a) :: * Source #

Methods

tunnel :: (Unpacked (Exp a) -> Packed (Exp a), Acc (Packed (Exp a)) -> Exp a) Source #

(Argument a, Argument b) => Argument (a, b) Source # 

Associated Types

type Packed (a, b) :: * Source #

type Unpacked (a, b) :: * Source #

Methods

tunnel :: (Unpacked (a, b) -> Packed (a, b), Acc (Packed (a, b)) -> (a, b)) Source #

(Unlift Exp a, Lift Exp a, Slice (Plain a), (~) * b (Exp Int)) => Argument ((:.) a b) Source # 

Associated Types

type Packed (a :. b) :: * Source #

type Unpacked (a :. b) :: * Source #

Methods

tunnel :: (Unpacked (a :. b) -> Packed (a :. b), Acc (Packed (a :. b)) -> a :. b) Source #

(Argument a, Argument b, Argument c) => Argument (a, b, c) Source # 

Associated Types

type Packed (a, b, c) :: * Source #

type Unpacked (a, b, c) :: * Source #

Methods

tunnel :: (Unpacked (a, b, c) -> Packed (a, b, c), Acc (Packed (a, b, c)) -> (a, b, c)) Source #