Write a GPU program that performs parallel reduction on an array of 32-bit floating point numbers to compute their sum. The program should take an input array and produce a single output value containing the sum of all elements.
solve function signature must remain unchangedoutput variableInput: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] Output: 36.0
Input: [-2.5, 1.5, -1.0, 2.0] Output: 0.0
N ≤ 100,000,000input[i] ≤ 1000.0N = 4,194,304