Instructions
User Manual:
Open the PDF directly: View PDF .
Page Count: 1
Download | |
Open PDF In Browser | View PDF |
EE 382C/EE 361C Multicore Computing Assignment 4 Fall 2018 Due: November 1 Instructor: Professor Vijay K. Garg (email: garg@ece.utexas.edu) The goal of this assignment is to learn CUDA programming. For each of the problems in this assignment use an efficient parallel algorithm. 1. (20 points) Write a parallel program in cuda that reads a text file “inp.txt” and performs various computations on the data in the file. The file contains a list of integers in the range [0-999] separated by commas. Your program should read this file in an array A of integers. (a, 10 points) Compute minA, the minimum value in the array. (b, 10 points) Compute an array B such that B[i] is the last digit of A[i] for all i. 2. (40 points) Read an array A as in the first question. (a, 10 points) Create an array B of size 10 that keeps a count of the entries in each of the ranges:[0, 99], [100, 199], [200, 299], . . For this part of the problem, maintain array B in global memory of GPU. (b, 10 points) Repeat part (a) but first use the shared memory in a block for updating the local copy of B in each block. Once every block is done, add all local copies to get the global copy of B. (c, 20 points) Create an array of size 10 that uses B to compute C which keeps count of the entries in each of the ranges:[0,99], [0,199], [0,299],. . . , [0, 999]. For this part of the problem, you must not use array A. 3. (40 points) Read an array A as in the first question. Compute an array D such that D consists only of odd numbers in A. You would need to determine the total number of odd numbers in A, and then copy all the odd numbers from A to D preserving their order in A. 1
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 1 Producer : pdfTeX-1.40.18 Creator : TeX Create Date : 2018:10:15 13:31:58-05:00 Modify Date : 2018:10:15 13:31:58-05:00 Trapped : False PTEX Fullbanner : This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) kpathsea version 6.2.3EXIF Metadata provided by EXIF.tools