repa-array-4.0.0.2: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Array.Delayed2

Synopsis

Documentation

data D2 l1 l2 Source

A delayed array formed from two source arrays. The source arrays can have different layouts but must have the same extent.

Constructors

Delayed2 

Fields

delayed2Layout1 :: l1
 
delayed2Layout2 :: l2
 

Instances

(Eq (Name l1), Eq (Name l2)) => Eq (Name (D2 l1 l2)) 
(Show (Name l1), Show (Name l2)) => Show (Name (D2 l1 l2)) 
(Eq l1, Eq l2) => Eq (D2 l1 l2) 
(Show l1, Show l2) => Show (D2 l1 l2) 
(Layout l1, Layout l2, (~) * (Index l1) (Index l2)) => Layout (D2 l1 l2)

Delayed arrays.

(Layout l1, Layout l2, (~) * (Index l1) (Index l2)) => Bulk (D2 l1 l2) a

Delayed arrays.

(Layout lSrc1, Layout lSrc2, Target lDst a, (~) * (Index lSrc1) (Index lSrc2)) => Load (D2 lSrc1 lSrc2) lDst a 
data Name (D2 l1 l2) = D2 (Name l1) (Name l2) 
type Index (D2 l1 l2) = Index l1 
data Array (D2 l1 l2) = ADelayed2 !l1 !l2 (Index l1 -> a) 

delay2 :: (Bulk l1 a, Bulk l2 b, Index l1 ~ Index l2) => Array l1 a -> Array l2 b -> Maybe (Array (D2 l1 l2) (a, b)) Source

Wrap two existing arrays in a delayed array.

map2 :: (Bulk l1 a, Bulk l2 b, Index l1 ~ Index l2) => (a -> b -> c) -> Array l1 a -> Array l2 b -> Maybe (Array (D2 l1 l2) c) Source

Combine two arrays element-wise using the given worker function.

The two source arrays must have the same extent, else Nothing.