aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/WindowIterator.h
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-07-17 16:48:42 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitc8e84b5a3872eda6748d77dbaf8548ad99f4c0cd (patch)
tree0c519a97b7f0ff89352a7736be1cae43b6dea10e /arm_compute/core/WindowIterator.h
parent3efb37536149f438a68a1742c35d827e1fbd7860 (diff)
downloadComputeLibrary-c8e84b5a3872eda6748d77dbaf8548ad99f4c0cd.tar.gz
COMPMID-1405: Create our own gemm_native kernel / function.
Change-Id: Ie0a80bd6b4eb5632cac63ccf54bcb07d4309da19 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/140305 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/WindowIterator.h')
-rw-r--r--arm_compute/core/WindowIterator.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/arm_compute/core/WindowIterator.h b/arm_compute/core/WindowIterator.h
index 13e9973506..13cb9cf2f4 100644
--- a/arm_compute/core/WindowIterator.h
+++ b/arm_compute/core/WindowIterator.h
@@ -24,6 +24,7 @@
#ifndef __ARM_COMPUTE_WINDOW_ITERATOR_H__
#define __ARM_COMPUTE_WINDOW_ITERATOR_H__
#include "arm_compute/core/Coordinates.h"
+#include "arm_compute/core/Error.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/Window.h"
@@ -71,9 +72,20 @@ public:
*/
inline size_t stride(size_t dim) const
{
+ ARM_COMPUTE_ERROR_ON(_strides[dim] % sizeof(T) != 0);
return _strides[dim] / sizeof(T);
}
+ /** Manually set the stride of a dimension
+ *
+ * @param[in] dim Dimension of the stride to set.
+ * @param[in] size Value to set the stride to (in bytes).
+ */
+ void set_stride(size_t dim, size_t size)
+ {
+ _strides[dim] = size;
+ }
+
/** Returns a pointer to the element at coordinates (x,y,z,w)
*
* @param[in] x X coordinates
@@ -99,8 +111,8 @@ public:
}
private:
- uint8_t *_first; /**< Pointer to the first element of the tensor.*/
- const Strides &_strides; /**< Strides in bytes of the tensor */
+ uint8_t *_first; /**< Pointer to the first element of the tensor.*/
+ Strides _strides; /**< Strides in bytes of the tensor */
};
/** Iterate over a portion of a Window */