Professional Documents
Culture Documents
Assignment No:7: Abhinay Surve Pe27 E2
Assignment No:7: Abhinay Surve Pe27 E2
PE27 E2
Assignment No:7
Title: Write a CUDA program to find the sum/avg of elements in the N-element vector.
(where N is large number)
Aim: Design and implement a a CUDA program to find the sum/avg of elements element in
the N-element vector. (where N is large number)
Theory:
OpenMP will make a copy of the reduction variable per thread, initialized to the identity of the
reduction operator, for instance 11 for multiplication.
Each thread will then reduce into its local variable;
At the end of the parallel region, the local results are combined, again using the reduction operator,
into the global variable.
FAQs: