Funny parallelism

For those who have some free leisure time this weekend and would like to explore a bit ParallelFx in a didactic manner I ported to Linux a Sudoku game coming from ParallelFx CTP samples which optionally uses ParallelFx to generate Sudoku grids.

For screenshot fans that’s how it looks like :

Sudoku main interface

Sudoku main interface

You can enable the use of ParallelFx via the two options « Use multiple processors to generate puzzles » and « Use speculative puzzle generation » found in the Game settings box :

Game settings window

Game settings window

The first one uses Parallel.For instead of a standard for to generate grids and the other allows the background generation of further grids using Future.

Comments 4

  1. AW wrote:

    Does that really need to be an option?

    Who would stroke their fledgling chin stubble and say to themselves, « Hm, I DO have a multicore processor, but I DON’T want the speed benefit… or DO I? »

    Posted 26 juil 2008 at 22 h 00 min
  2. garuma wrote:

    > Does that really need to be an option?

    For a real application probably not, but here it’s a test application. If you look at console output you will see time spent to generate a puzzle which of course depends on these options being enabled or not, isn’t it nice to see the actual improvement your multicore CPU gives you ?

    Posted 27 juil 2008 at 9 h 00 min
  3. RichB wrote:

    Sudoku solver in LINQ I ported from Python/JavaScript2:

    http://aspadvice.com/blogs/rbirkby/archive/2007/08/23/Silverlight-Sudoku-with-LINQ.aspx

    You can see the code here:
    http://aspadvice.com/blogs/rbirkby/attachment/34077.ashx

    It runs so fast I doubt there’s any point parallelizing it.

    Posted 27 juil 2008 at 20 h 10 min
  4. garuma wrote:

    It may not be the best illustration of parallelism (though expert-level grid do take time to generate), but again, as the title and post imply, it’s just to show something different than the usual benchmarks and graphic stuff, something more interactive and which makes practical use of ParallelFx’s API.

    Posted 27 juil 2008 at 20 h 55 min

Post a Comment

Your email is never published nor shared. Required fields are marked *