aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/cl_kernels/mean_stddev.cl
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-07-03 17:39:37 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commitac69aa137e360340fe9f148f019d93af6c3d8336 (patch)
tree88c2fb6ea8693c69b19d3b7b38fe26cd916303c8 /src/core/CL/cl_kernels/mean_stddev.cl
parent05da6dd102c988081c7d5eccb227f559f740ceef (diff)
downloadComputeLibrary-ac69aa137e360340fe9f148f019d93af6c3d8336.tar.gz
COMPMID-418 Add check and fix comments after preprocessor conditions
Change-Id: I1353fd652ee180e3931e58b4ce13d651a48c7e2c Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79567 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels/mean_stddev.cl')
-rw-r--r--src/core/CL/cl_kernels/mean_stddev.cl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/CL/cl_kernels/mean_stddev.cl b/src/core/CL/cl_kernels/mean_stddev.cl
index 50b8312548..7c29d2fe96 100644
--- a/src/core/CL/cl_kernels/mean_stddev.cl
+++ b/src/core/CL/cl_kernels/mean_stddev.cl
@@ -44,19 +44,19 @@ __kernel void mean_stddev_accumulate(
IMAGE_DECLARATION(src),
uint height,
__global ulong *global_sum
-#if defined STDDEV
+#ifdef STDDEV
,
__global ulong *global_sum_sq
-#endif
+#endif /* STDDEV */
)
{
// Get pixels pointer
Image src = CONVERT_TO_IMAGE_STRUCT(src);
- uint8 tmp_sum = 0;
-#if defined STDDEV
- uint8 tmp_sum_sq = 0;
-#endif
+ uint8 tmp_sum = 0;
+#ifdef STDDEV
+ uint8 tmp_sum_sq = 0;
+#endif /* STDDEV */
// Calculate partial sum
for(int i = 0; i < height; i++)
{
@@ -64,20 +64,20 @@ __kernel void mean_stddev_accumulate(
uint8 data = convert_uint8(vload8(0, offset(&src, 0, i)));
tmp_sum += data;
-#if defined STDDEV
+#ifdef STDDEV
tmp_sum_sq += data * data;
-#endif
+#endif /* STDDEV */
}
// Perform reduction
tmp_sum.s0123 += tmp_sum.s4567;
tmp_sum.s01 += tmp_sum.s23;
atom_add(global_sum, tmp_sum.s0 + tmp_sum.s1);
-#if defined STDDEV
+#ifdef STDDEV
tmp_sum_sq.s0123 += tmp_sum_sq.s4567;
tmp_sum_sq.s01 += tmp_sum_sq.s23;
atom_add(global_sum_sq, tmp_sum_sq.s0 + tmp_sum_sq.s1);
-#endif
+#endif /* STDDEV */
}
#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : disable