Questions

  1. Try rewriting the Monte Carlo integration examples (in the __main__ function in monte_carlo_integrator.py) to use the CUDA instrinsic functions. How does the accuracy compare to before?
  2. We only used the uniform distribution in all of our cuRAND examples. Can you name one possible use or application of using the normal (Gaussian) random distribution in GPU programming?
  3. Suppose that we use two different seeds to generate a list of 100 pseudo-random numbers. Should we ever concatenate these into a list of 200 numbers?
  4. In the last example, try adding __host__ before __device__ in the definition of our operator() function in the multiply_functor struct. Now, see if you can directly implement a host-side dot-product function using this ...

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.