Homework III
Due Tuesday, November 21
Here you will write CUDA code to implement the "maximum burst" example
of Section 4.14.
- The signature of the function will be
void maxburst(float *x, int n, int k, int *startend, float *bigmax)
Here x is the array, of length n. We look at all possible
bursts of length at least k. The resulting interval (indices
within x) is returned in the 2-element array startend, and
the corresponding max value is returned in bigmax.
As before, the TA will call the function from his main(). He
will announce a range of n and k to be used in the timing
test. He will also conduct small, unannounced tests to confirm the
validity of your code.
The TA will not announce what grid sizes to use, nor will he even
set them. Your function maxburst must set them, say based on
n.
As usual, the groups with the three fastest run times will receive Extra
Credit.
Submit your code in a file Problem1.cu.