Anyone know how to implement binomial coefficient calculation in parallel ?
Any resource for multi-core or CUDA would be helpful, thank you.
Anyone know how to implement binomial coefficient calculation in parallel ? Any resource for
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would start off by doing the following.
this point you will have array[n] = n!. i.e. array[0] = 0!, array1
= 1! array[100] = 100! and so on.
The first and the last operations may need custom kernels. The second operation can be done using thrust and the inclusive_scan operation.
EDIT
As for the drawbacks, as mentioned above in the comments, there will be precison issues even with 64 bit integers at reasonable large size of n. But this is the basic algorithm that you would need to use.