Lecture 9 - (cont.) More on CUDA

Some announcements:

Note that a lot of issues we find in CUDA with malloc is just using in incorrectly. It is advised to use C++'s new keyword instead to fix a lot of these issues, if you prefer.

For a review of the basics of CUDA, see this link.

An interesting thing is that we can turn the virtual memory feature off for our CUDA devices. Why would you do this? Because virtual memory is essentially caching memory accesses using virtual devices, between the program and the main memory. Without it, you can:

When creating threads: