diff options
Diffstat (limited to 'testsuite/tests/ghc-regress/dph/primespj/PrimesVect.hs')
-rw-r--r-- | testsuite/tests/ghc-regress/dph/primespj/PrimesVect.hs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/testsuite/tests/ghc-regress/dph/primespj/PrimesVect.hs b/testsuite/tests/ghc-regress/dph/primespj/PrimesVect.hs deleted file mode 100644 index 34b3a568b7..0000000000 --- a/testsuite/tests/ghc-regress/dph/primespj/PrimesVect.hs +++ /dev/null @@ -1,25 +0,0 @@ -{-# LANGUAGE ParallelArrays #-} -{-# OPTIONS -fvectorise #-} -module PrimesVect (primesVect) - -where -import Data.Array.Parallel -import Data.Array.Parallel.Prelude.Int -import qualified Prelude - -primesVect:: Int -> PArray Int -primesVect n = toPArrayP (primesVect' n) - -primesVect':: Int -> [:Int:] -primesVect' n - | n == 1 = emptyP - | n == 2 = singletonP 2 - | otherwise = sps +:+ [: i | i <- enumFromToP (sq+1) n, notMultiple sps i:] - where - - sps = primesVect' sq - sq = sqrt n - - notMultiple :: [:Int:] -> Int -> Bool - notMultiple ps i = andP [: mod i p /= 0 | p <- ps:] - |