[Haskell] Matrix multiplication

Don Stewart dons at galois.com
Sat May 3 15:03:59 EDT 2008

> Hi,
> Thanks for all your nice replies. I did this matrix-multiplication 
> experiment for a seminar on multithreading where I have to give a talk 
> on Unified Parallel C. At first I thought I should not mention haskell 
> as an alternative because of the speed. But now I might do some slides 
> about the advantages/(disadvantages?) of side-effekt free languages, 
> maybe ndp. In my opinion these C extension are not a nice solution. 
> Unified Parallel C parallelizes only for-loops and distributes the 
> workload by uniformly cutting an array in pieces and then setting an 
> "affinity" so that a CPU works on that data. The trick they are really 

This sounds very similar to nested data parallelism, so probably worth
talking about.


The key trick is that instead of only knowing how to parallelise (pure)
for-loops, a whole suite of combinators can be parallelised, and on
nested structures. So, quite promising.

> proud of is that the compiler knows in this way where to put the data in 
> a NUMA-system (Non-Uniform Memory Architecture). I am not really sure if 
> this language extension can cope with programs where pieces need 
> considerably different calulation times.

> I forgot to mention that I used ghc 6.8.2 and sorry for that stupid 
> example (a had to take something that fits on a presentation-slide).

-- Don

More information about the Haskell mailing list