summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/parallel.hs3
-rw-r--r--examples/plot.hs2
2 files changed, 2 insertions, 3 deletions
diff --git a/examples/parallel.hs b/examples/parallel.hs
index 8653bc3..9d5ae3b 100644
--- a/examples/parallel.hs
+++ b/examples/parallel.hs
@@ -5,8 +5,7 @@ import Numeric.LinearAlgebra
5import Control.Parallel.Strategies 5import Control.Parallel.Strategies
6import System.Time 6import System.Time
7 7
8inParallel = parMap rnf id 8inParallel = parMap rwhnf id
9-- rwhnf also works in this case
10 9
11-- matrix product decomposed into p parallel subtasks 10-- matrix product decomposed into p parallel subtasks
12parMul p x y = fromBlocks [ inParallel ( map (x <>) ys ) ] 11parMul p x y = fromBlocks [ inParallel ( map (x <>) ys ) ]
diff --git a/examples/plot.hs b/examples/plot.hs
index e4025fd..1583dfe 100644
--- a/examples/plot.hs
+++ b/examples/plot.hs
@@ -16,5 +16,5 @@ cumdist x = 0.5 * (1+ erf (x/sqrt 2))
16main = do 16main = do
17 let x = linspace 1000 (-4,4) 17 let x = linspace 1000 (-4,4)
18 mplot [f x] 18 mplot [f x]
19 mplot [x, liftVector cumdist x, liftVector gaussianPDF x] 19 mplot [x, mapVector cumdist x, mapVector gaussianPDF x]
20 mesh (sombrero 40) \ No newline at end of file 20 mesh (sombrero 40) \ No newline at end of file