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 whereSource

Methods

similar :: a -> a -> BoolSource

class PprPhysical1 a whereSource

Methods

pprp1 :: a -> DocSource

pprp1v :: Vector a -> DocSource

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

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)Source

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

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

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)Source

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))Source

Convert a doubly nested array to the reference version.