Question: Download the CUDA Toolkit and SDK from http://www.nvidia.com/object/ cuda_get.html. Make sure to use the ?emurelease? (Emulation Mode) version of the code (you will not need
Download the CUDA Toolkit and SDK from http://www.nvidia.com/object/ cuda_get.html. Make sure to use the ?emurelease? (Emulation Mode) version of the code (you will not need actual NVIDIA hardware for this assignment). Build the example programs provided in the SDK, and confirm that they run on the emulator
1. Using the ?template? SDK sample as a starting point, write a CUDA program to perform the following vector operations:
1)?a???b?(vector-vector subtraction)
2) a???b (vector dot product)
The dot product of two vectors?a?= [a1,?a2, ? ,?an] and?b?= [b1,?b2, ? ,?bn] is defined as:

Submit code for each program that demonstrates each operation and verifies the correctness of the results.
2. If you have GPU hardware available, complete a performance analysis your program, examining the computation time for the GPU and a CPU version of your program for a range of vector sizes. Explain any results you see.
a b = >4,b; = a,b, + a,b, + ... + a b 11 1 2 2 n n i=1
Step by Step Solution
3.49 Rating (159 Votes )
There are 3 Steps involved in it
To complete this assignment you will need to follow these steps Download the CUDA Toolkit and SDK from the provided link and install it on your comput... View full answer
Get step-by-step solutions from verified subject matter experts
