AQUAgpusph 4.1.2
|
Reduction OpenCL methods. (See Aqua::CalcServer::Reduction for details) More...
Functions | |
__kernel void | reduction (__global T *input, __global T *output, unsigned int N, __local T *lmem) |
Reduction OpenCL methods. (See Aqua::CalcServer::Reduction for details)
__kernel void reduction | ( | __global T * | input, |
__global T * | output, | ||
unsigned int | N, | ||
__local T * | lmem | ||
) |
Reduction step. The objective of each step is obtain only one reduced value from each work group. You can call this kernel recursively until only one work group will be computed, and therefore just one output value will result.
input | Input array to be reduced. |
output | Output array to store the reduced value. |
N | Number of input elements. |
lmem | local memory address array to store the output data while working. |