summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDaniel Fischer <daniel.is.fischer@googlemail.com>2011-11-10 01:00:28 +0100
committerDaniel Fischer <daniel.is.fischer@googlemail.com>2011-11-10 01:00:28 +0100
commit7472e331c1a5c9e5b23b8d0567417fc2521634f3 (patch)
treed13efff9576dbe6d2b10804723ab92378fbcd5ec /testsuite
parent3eaeb7afdc64acb0d920253291f3a14534a3b018 (diff)
downloadhaskell-7472e331c1a5c9e5b23b8d0567417fc2521634f3.tar.gz
Tabs -> Spaces
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/dph/smvm/Main.hs55
1 files changed, 25 insertions, 30 deletions
diff --git a/testsuite/tests/dph/smvm/Main.hs b/testsuite/tests/dph/smvm/Main.hs
index e30938bc21..3eed160e9e 100644
--- a/testsuite/tests/dph/smvm/Main.hs
+++ b/testsuite/tests/dph/smvm/Main.hs
@@ -12,19 +12,19 @@ import Data.Array.Parallel.PArray as P
-- Load sparse matrix from a file
-loadSM :: String
- -> IO (PArray (PArray (Int, Double)), PArray Double)
+loadSM :: String
+ -> IO (PArray (PArray (Int, Double)), PArray Double)
-loadSM s
+loadSM s
= do
(segd, m, v) <- loadSM' s
return $ (nestUSegdPA' segd (fromUArrPA_2' m), fromUArrPA' v)
-loadSM' :: String
- -> IO ( U.Segd
- , U.Array (Int, Double)
- , U.Array Double)
+loadSM' :: String
+ -> IO ( U.Segd
+ , U.Array (Int, Double)
+ , U.Array Double)
loadSM' fname =
do
h <- openBinaryFile fname ReadMode
@@ -40,26 +40,21 @@ loadSM' fname =
evaluate dv
return (segd, m, dv)
-main
- = do [inFile, outFile] <- getArgs
- (m, v) <- loadSM inFile
- let result = smvm m v
-
- -- ignore wibbles in low-order bits
- let output
- = (unlines
- $ map (take 12)
- $ map show
- $ P.toList result)
- ++ ("SUM = "
- ++ (take 12 $ show $ sum $ P.toList result)
- ++ "\n")
-
- -- check our result against the provided outFile
- outputCheck <- readFile outFile
- print $ output == outputCheck
-
-
-
-
-
+main
+ = do [inFile, outFile] <- getArgs
+ (m, v) <- loadSM inFile
+ let result = smvm m v
+
+ -- ignore wibbles in low-order bits
+ let output
+ = (unlines
+ $ map (take 12)
+ $ map show
+ $ P.toList result)
+ ++ ("SUM = "
+ ++ (take 12 $ show $ sum $ P.toList result)
+ ++ "\n")
+
+ -- check our result against the provided outFile
+ outputCheck <- readFile outFile
+ print $ output == outputCheck