aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h6
-rw-r--r--arm_compute/core/Window.h10
-rw-r--r--arm_compute/core/Window.inl10
3 files changed, 23 insertions, 3 deletions
diff --git a/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h b/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h
index 13092400c7..a24ddb1a3a 100644
--- a/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h
+++ b/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -51,8 +51,8 @@ public:
~CLQuantizationLayerKernel() = default;
/** Set the input, output, min and max.
*
- * @param[in] input Source tensor. Data types supported: F32.
- * @param[out] output Destination tensor. Data types supported: U8.
+ * @param[in] input Source tensor with at least 3 dimensions. The dimensions over the third will be interpreted as batches. Data types supported: F32.
+ * @param[out] output Destination tensor with the same dimensions of input. Output data type must be U8.
* @param[in] min_max Pointer to the tensor with shape [2, batches] which stores the minimum and maximum value for each 3D input tensor.
* The dimensions over the second must match the batched dimensions of the input tensor. Data type supported: F32.
*/
diff --git a/arm_compute/core/Window.h b/arm_compute/core/Window.h
index cca12c9efe..5ca210a112 100644
--- a/arm_compute/core/Window.h
+++ b/arm_compute/core/Window.h
@@ -177,6 +177,16 @@ public:
*/
void shift(size_t dimension, int shift_value);
+ /** Shift down all the dimensions of a window
+ *
+ * i.e new_dims[n] = old_dims[n+shift_value].
+ *
+ * @param[in] shift_value Number of dimensions to shift the window by.
+ *
+ * @return The window with the shifted dimensions.
+ */
+ Window shift_dimensions(unsigned int shift_value) const;
+
/** Adjust the start or end of a given dimension by the given value
*
* @param[in] dimension The dimension to adjust
diff --git a/arm_compute/core/Window.inl b/arm_compute/core/Window.inl
index 23b2a8e322..18d454a0cb 100644
--- a/arm_compute/core/Window.inl
+++ b/arm_compute/core/Window.inl
@@ -77,6 +77,16 @@ inline Window Window::collapse_if_possible(const Window &full_window, const size
return collapsed;
}
+inline Window Window::shift_dimensions(unsigned int shift_value) const
+{
+ Window shifted_window;
+ for(size_t n = 0; n < (Coordinates::num_max_dimensions - shift_value); n++)
+ {
+ shifted_window.set(n, _dims[n + shift_value]);
+ }
+ return shifted_window;
+}
+
inline Window Window::collapse(const Window &full_window, const size_t first, const size_t last) const
{
bool has_collapsed = false;