Commit 8ee58c7e authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Add Lifted.Utils

parent bbd8620e
module Data.Array.Parallel.Lifted (
module Data.Array.Parallel.Lifted.PArray,
module Data.Array.Parallel.Lifted.Instances,
module Data.Array.Parallel.Lifted.Utils,
(:->), ($:), ($:^), dPA_Clo
(:->), ($:), ($:^), dPA_Clo,
) where
import Data.Array.Parallel.Lifted.PArray
import Data.Array.Parallel.Lifted.Closure
import Data.Array.Parallel.Lifted.Instances
import Data.Array.Parallel.Lifted.Utils
module Data.Array.Parallel.Lifted.Instances (
dPA_Int,
dPA_Int, intPayload,
dPA_0, dPA_2, dPA_3
) where
......@@ -10,6 +10,10 @@ import GHC.Exts (Int#, Int(..))
data instance PArray Int = PInt Int# !(UArr Int)
intPayload :: PArray Int -> UArr Int
{-# INLINE intPayload #-}
intPayload (PInt _ is) = is
dPA_Int :: PA Int
{-# INLINE dPA_Int #-}
dPA_Int = PA {
......
module Data.Array.Parallel.Lifted.Utils (
intEqPA
) where
import Data.Array.Parallel.Lifted.PArray
import Data.Array.Parallel.Lifted.Instances
import Data.Array.Parallel.Unlifted
intEqPA :: PArray Int -> Int -> UArr Bool
intEqPA is !n = mapU (n==) (intPayload is)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment