aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/cl_kernels/normalization_layer.cl
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/CL/cl_kernels/normalization_layer.cl')
-rw-r--r--src/core/CL/cl_kernels/normalization_layer.cl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/CL/cl_kernels/normalization_layer.cl b/src/core/CL/cl_kernels/normalization_layer.cl
index dbdad27865..0b6df39c9a 100644
--- a/src/core/CL/cl_kernels/normalization_layer.cl
+++ b/src/core/CL/cl_kernels/normalization_layer.cl
@@ -92,6 +92,7 @@ __kernel void normalization_layer_cross_map(TENSOR3D_DECLARATION(input),
STORE_OP(normalized_pixel, 0, (__global DATA_TYPE *)out.ptr);
}
+#if defined(WIDTH_SIZE)
/** Apply in-map normalization.
*
* @note Datatype should be given as a preprocessor argument using -DDATA_TYPE=type. e.g. -DDATA_TYPE=short
@@ -133,7 +134,7 @@ __kernel void normalization_layer_in_map(TENSOR3D_DECLARATION(input),
const int current_col = get_global_id(0) << 2;
const int left_pos = max(-(int)RADIUS, -3 - current_col);
- const int right_pos = min((int)RADIUS, (int)((get_global_size(0) << 2) + 3 - 1 - current_col));
+ const int right_pos = min((int)RADIUS, (int)WIDTH_SIZE - 1 - current_col);
#if defined(IN_MAP_2D)
const int current_row = get_global_id(1);
@@ -168,3 +169,4 @@ __kernel void normalization_layer_in_map(TENSOR3D_DECLARATION(input),
STORE_OP(normalized_pixel, 0, (__global DATA_TYPE *)out.ptr);
}
+#endif // defined(WIDTH_SIZE)