sarrvesh / cuFFS

A GPU-accelerated Rotation Measure Synthesis code
GNU General Public License v2.0
8 stars 4 forks source link

Implement RM Clean #15

Open sarrvesh opened 8 years ago

sarrvesh commented 8 years ago

Before doing RM Clean, it is probably useful to rotate the Q(\phi), U(\phi) and P(\phi) cubes such that \phi is the fastest varying axis. This can be done using the following code snippet:

index=0; for(x=0; x<qAxisLen1; x++) { for(y=0; y<qAxisLen2; y++) { for(z=0; z<qAxisLen3; z++) { newArray[index] = *(oldArray+ z*qAxisLen3 + y*qAxisLen2 + x); index += 1; } } }

Is it worth doing this rotation on the gpu than on the cpu?