/** This function calculates the sum and sum of squares of a given input image.
*
- * @note To enable calculation sum of squares -DSTDDEV should be passed as a preprocessor argument.
+ * @note Datatype should be given as a preprocessor argument using -DDATA_TYPE=type. e.g. -DDATA_TYPE=short
*
- * @param[in] src_ptr Pointer to the source image. Supported data types: U8
+ * @param[in] src_ptr Pointer to the source image. Supported data types: F32, U8
* @param[in] src_stride_x Stride of the source image in X dimension (in bytes)
* @param[in] src_step_x src_stride_x * number of elements along X processed per workitem(in bytes)
* @param[in] src_stride_y Stride of the source image in Y dimension (in bytes)
__kernel void reduction_mean(
IMAGE_DECLARATION(src),
IMAGE_DECLARATION(dst),
- __local DATA_TYPE *local_sums,
+ __local DATA_TYPE *local_sums,
int height,
int divider)
{
Image src = CONVERT_TO_IMAGE_STRUCT(src);
Image dst = CONVERT_TO_IMAGE_STRUCT(dst);
- float8 tmp_sum = 0;
// Calculate partial sum
-
for(int i = 0; i < height; i++)
{
local_sums[0] += sum_8((__global DATA_TYPE *)offset(&src, 0, i));