diff options
Diffstat (limited to 'testsuite/tests/dph/sumnats')
-rw-r--r-- | testsuite/tests/dph/sumnats/Main.hs | 21 | ||||
-rw-r--r-- | testsuite/tests/dph/sumnats/Makefile | 3 | ||||
-rw-r--r-- | testsuite/tests/dph/sumnats/SumNatsVect.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/dph/sumnats/dph-sumnats-copy.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/dph/sumnats/dph-sumnats-vseg.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/dph/sumnats/dph-sumnats.T | 20 |
6 files changed, 0 insertions, 64 deletions
diff --git a/testsuite/tests/dph/sumnats/Main.hs b/testsuite/tests/dph/sumnats/Main.hs deleted file mode 100644 index 7c3ee7210b..0000000000 --- a/testsuite/tests/dph/sumnats/Main.hs +++ /dev/null @@ -1,21 +0,0 @@ - -import SumNatsVect (sumNats) - --- Solution for 1st Euler problem --- Add all the natural numbers below 1000 that are multiples of 3 or 5. - -solutionLists maxN - = let sumOnetoN n = n * (n+1) `div` 2 - sumStep s n = s * sumOnetoN (n `div` s) - in sumStep 3 (maxN - 1) + sumStep 5 (maxN - 1) - sumStep 15 (maxN - 1) - -solutionLists2 maxN - = sum [ x | x <- [0.. maxN - 1] - , (x `mod` 3 == 0) || (x `mod` 5 == 0) ] - -main - = do let n = 1000 - print $ solutionLists n - print $ solutionLists2 n - print $ sumNats n - diff --git a/testsuite/tests/dph/sumnats/Makefile b/testsuite/tests/dph/sumnats/Makefile deleted file mode 100644 index 9101fbd40a..0000000000 --- a/testsuite/tests/dph/sumnats/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/dph/sumnats/SumNatsVect.hs b/testsuite/tests/dph/sumnats/SumNatsVect.hs deleted file mode 100644 index 187946da4e..0000000000 --- a/testsuite/tests/dph/sumnats/SumNatsVect.hs +++ /dev/null @@ -1,14 +0,0 @@ -{-# LANGUAGE ParallelArrays #-} -{-# OPTIONS -fvectorise #-} -module SumNatsVect (sumNats) where - -import Data.Array.Parallel.Prelude -import Data.Array.Parallel.Prelude.Int as I - -import qualified Prelude as P - -sumNats :: Int -> Int -sumNats maxN - = sumP [: x | x <- enumFromToP 0 (maxN I.- 1) - , (x `mod` 3 I.== 0) || (x `mod` 5 I.== 0) :] - diff --git a/testsuite/tests/dph/sumnats/dph-sumnats-copy.stdout b/testsuite/tests/dph/sumnats/dph-sumnats-copy.stdout deleted file mode 100644 index 8858be2164..0000000000 --- a/testsuite/tests/dph/sumnats/dph-sumnats-copy.stdout +++ /dev/null @@ -1,3 +0,0 @@ -233168 -233168 -233168 diff --git a/testsuite/tests/dph/sumnats/dph-sumnats-vseg.stdout b/testsuite/tests/dph/sumnats/dph-sumnats-vseg.stdout deleted file mode 100644 index 8858be2164..0000000000 --- a/testsuite/tests/dph/sumnats/dph-sumnats-vseg.stdout +++ /dev/null @@ -1,3 +0,0 @@ -233168 -233168 -233168 diff --git a/testsuite/tests/dph/sumnats/dph-sumnats.T b/testsuite/tests/dph/sumnats/dph-sumnats.T deleted file mode 100644 index 66e4b404d6..0000000000 --- a/testsuite/tests/dph/sumnats/dph-sumnats.T +++ /dev/null @@ -1,20 +0,0 @@ - -test ('dph-sumnats-copy' - , [ outputdir('copy') - , reqlib('dph-lifted-copy') - , reqlib('dph-prim-par') - , only_ways(['normal', 'threaded1', 'threaded2']) ] - , multimod_compile_and_run - , [ 'Main' - , '-O0 -package dph-lifted-copy']) - - -test ('dph-sumnats-vseg' - , [ outputdir('vseg') - , reqlib('dph-lifted-vseg') - , reqlib('dph-prim-par') - , only_ways(['normal', 'threaded1', 'threaded2']) ] - , multimod_compile_and_run - , [ 'Main' - , '-O0 -package dph-lifted-vseg']) - |