The Thrust example that estimated π generated the random coordinates on the interval [0,1] by generating vectors of random integers and then dividing by the largest value produced by the random integer generator, RAND_MAX, with both operations performed on the host. This particular random number generator is exclusively a host function, so that computation needs to be done on the host. However, there is no good reason not to do the division in parallel on the device. Modify the code to generate random numbers on the host, but to do the division in parallel on the GPU, use thrust::transform with a device vector.

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!