Chapter 8, The CUDA Device Function Libraries and Thrust

  1. Try it. (It's actually more accurate than you'd think.)
  2. One application: a Gaussian distribution can be used to add white noise to samples to augment a dataset in machine learning.
  3. No, since they are from different seeds, these lists may have a strong correlation if we concatenate them together. We should use subsequences of the same seed if we plan to concatenate them together.
  4. Try it.
  5. Hint: remember that matrix multiplication can be thought of as a series of matrix-vector multiplications, while matrix-vector multiplication can be thought of as a series of dot products.
  6. Operator() is used to define the actual function.

Get Hands-On GPU Programming with Python and CUDA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.