In this chapter, we saw some advanced concepts in CUDA that can help us to develop a complex application using CUDA. We saw the method for measuring the performance of the device code and how to see a detailed profile of the kernel function using the Nvidia Visual Profiler tool. It helps us in identifying the operation that slows down the performance of our program. We saw the methods to handle errors in hardware operation from the CUDA code itself, and we saw methods of debugging the code using certain tools. The CPU provides efficient task parallelism where two completely different functions execute in parallel. We saw that the GPU also provides this functionality using CUDA streams and achieves a twofold speedup on the same vector addition program using CUDA streams.
Then, we saw an acceleration of sorting algorithms using CUDA, which is an important concept to understand...