Here I am sharing the code that I write while learning basics of the Thrust. It is self explanatory with its qualified comments.
You might just download the code here from my dropbox.
This code is crafted as I am learning THRUST Library and utilizing its great benefits with little effort on CUDA complexity. You might choose to download the code since I am so lazy to keep the code aligned below as it is pretty long. 🙁