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 functor without any further modifications.
  5. Take a look at the strided_range.cu file in the Thrust examples directory. Can you think of how to use this to implement a general matrix-matrix multiplication using Thrust?
  6. What is the importance of the operator() function when defining a functor?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.107.210