Thread Building Blocks

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Thread Building Blocks

Postby John Digsby » 14 Aug 2010, 16:58

Ah, a long time since I last did anything but lurk on this forum. Hope I'm still welcome! :)

I was wondering if anyone had tried using Intel's Thread Building Blocks ([url]http://www.threadingbuildingblocks.org/[/url) to parallelise the tree search? It's task-based, and seems particularly adept at tasks that spawn many tasks to form a tree. So I figure that one could spawn an AlphaBeta/Minimax style search with a task that spawns more and more tasks to perform the evaluation.

The joy of this is that the use of processors scales with improved hardware because the actual deployment of task to thread is determined by a Thread Manager that uses all the available physical hardware. So if you install the same compiled executable on a machine of N cores, your executable will use all the available hardware to speed it up.

I can forsee some issues to do with keeping track of the current alpha and beta values, but this might be helped by some synchronisation using the tbb::atomic<int> type to hold these values. Not sure what the cost of this synchronisation would be though.

So, yes: has anyone done it, and if not, how do people think I might go about designing the data structure correctly?
John Digsby
 
Posts: 10
Joined: 26 Jun 2006, 16:27

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 13 guests