Hacker News new | past | comments | ask | show | jobs | submit login
Multicore-enabling the N-Queens Problem Using Cilk++ (cilk.com)
8 points by threadman on Sept 4, 2008 | hide | past | favorite | 5 comments



He left out the most efficient solution. Using bits to store the positions instead of an array then you can check if the queens conflict with a couple bitwise &&'s instead of looping.


interesting point - worth a comment in the blog post


Nice N-Queens is one of my favorite problems to play around with. I often solve it when learning a new language.


Intel's TBB adopts + translates much, from Cilk to C++.


TBB borrows the scheduling portion, but requires substantial code restructuring, and doesn't have a solution for the global variable problem analogous to Cilk's hyperobjects.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: