Implement a GPU program that, given a 1D array input of 32-bit floating point numbers of length N, selects the k largest elements and writes them in descending order to the output array of length k.
solve function signature must remain unchangedoutput arrayInput: input = [1.0, 5.0, 3.0, 2.0, 4.0] N = 5 k = 3 Output: output = [5.0, 4.0, 3.0]
Input: input = [7.2, -1.0, 3.3, 8.8, 2.2] N = 5 k = 2 Output: output = [8.8, 7.2]
input are 32-bit floatsN = 50,000,000, k = 100