diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/parallel.hs | 3 | ||||
-rw-r--r-- | examples/plot.hs | 2 |
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 | |||
5 | import Control.Parallel.Strategies | 5 | import Control.Parallel.Strategies |
6 | import System.Time | 6 | import System.Time |
7 | 7 | ||
8 | inParallel = parMap rnf id | 8 | inParallel = 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 |
12 | parMul p x y = fromBlocks [ inParallel ( map (x <>) ys ) ] | 11 | parMul 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)) | |||
16 | main = do | 16 | main = 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 |