AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Functions
Reduction.cl.in File Reference

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)
 

Detailed Description

Reduction OpenCL methods. (See Aqua::CalcServer::Reduction for details)

Note
The header CalcServer/Reduction.hcl.in is automatically appended.

Function Documentation

◆ reduction()

__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.

Parameters
inputInput array to be reduced.
outputOutput array to store the reduced value.
NNumber of input elements.
lmemlocal memory address array to store the output data while working.