dph-lifted-base-0.7.0.1: Data Parallel Haskell common definitions used by other dph-lifted packages.

Safe HaskellNone

Data.Array.Parallel.PArray.Reference.Convert

Description

During testing, we compare the output of each invocation of the lifted combinators in Data.Array.Parallel.PArray with the reference implementations.

This module helps convert the to and from the array representation used by the reference implementation.

Synopsis

Documentation

class Similar a where

Methods

similar :: a -> a -> Bool

class PprPhysical1 a where

Methods

pprp1 :: a -> Doc

pprp1v :: Vector a -> Doc

withRef1 :: (Array r a, Array c a, PprPhysical1 (c a), Similar a, PprPhysical1 a) => String -> r a -> c a -> c a

Compare the result of some array operator against a reference.

withRef2 :: (Array r (r a), Array r a, Array c (c a), PprPhysical1 (c (c a)), Array c a, PprPhysical1 (c a), Similar a, PprPhysical1 a) => String -> r (r a) -> c (c a) -> c (c a)

Compare the nested result of some array operator against a reference.

toRef1 :: (Array c a, Array r a) => c a -> r a

Convert an array to the reference version.

toRef2 :: (Array c (c a), Array c a, Array r (r a), Array r a) => c (c a) -> r (r a)

Convert a nested array to the reference version.

toRef3 :: (Array c (c (c a)), Array c (c a), Array c a, Array r (r (r a)), Array r (r a), Array r a) => c (c (c a)) -> r (r (r a))

Convert a doubly nested array to the reference version.