ASSIGNMENT 1 Elementwise maximum of two vectors

Original price was: $35.00.Current price is: $30.00.

Rate this product

In this assignment, you will write a CUDA program that computes the elementwise maximum of two
vectors of double precision values. That is, you will compute a vector c from two vectors a and b such
that c[i] is the maximum of a[i] and b[i] for all i.
1. Place the files provided with this assignment in a single directory. The files are:
 contains setup and sequential code
 where you will implement your code (you should only modify this file)
 common.h: for shared declarations across and
 timer.h: to assist with timing
 Makefile: used for compilation
2. Edit where TODO is indicated to implement the following:
 Allocate device memory
 Copy data from the host to the device
 Configure and invoke the CUDA kernel
 Copy the results from the device to the host
 Free device memory
 Perform the computation in the kernel
3. Compile your code by running: make
4. Test your code by running: ./vecmax
 If you are using the university cluster, do not forget to use the submission system. Do
not run on the head node!
 For testing on different input sizes, you can provide your own value for the number of
vector elements: ./vecmax <M> (example: ./vecmax 1000000)
Submit your modified file via Moodle by the due date. Do not submit any other files or
compressed folders.


There are no reviews yet.

Be the first to review “ASSIGNMENT 1 Elementwise maximum of two vectors”

Your email address will not be published. Required fields are marked *

Scroll to Top