Take the 2-minute tour ×

i'm yet in the learning stages of cuda. now i'm working on a program where 4D arrays are needed. i.e. all the possible dihedral angles are calculated from a distribution of points in the space.

the way i do it is by calculating the angle between two planes. i.e. consider 4 points. the first three points and the last three points form a plane each. and then the angle between the planes is calculated.

i've found two ways to do it so far.

1. using a 4D array where all the possible combinations of points are considered.

2. as soon as the results are obtained they are copied back to host and then outputted to a file or the screen.

the problem is i don't know how to work it out in both ways. can someone give me a hand?

share|improve this question
would be nice if you wrote down psuedo code of what you are planning to do, and also the code that you have tried so far. –  Pavan Yalamanchili Feb 15 '11 at 2:59
What do you mean by all possible combinations of points? Or do you mean all combinations of 3 points (such that you can calculate angles?). NC3 grows quickly for nontrivial N. You may want to think over whether you really need to do this. CUDA can be very fast but the biggest speedups come from algorithmic reformulation. –  peakxu Mar 1 '11 at 18:11

Your Answer

