aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 5197000bf9..aa415acebe 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -190,6 +190,21 @@ struct ValidRegion
return anchor[d] + shape[d];
}
+ /** Accessor to set the value of anchor and shape for one of the dimensions.
+ *
+ * @param[in] dimension Dimension for which the value is set.
+ * @param[in] start Value to be set in anchor for the dimension.
+ * @param[in] size Value to be set in shape for the dimension.
+ *
+ * @return *this.
+ */
+ ValidRegion &set(size_t dimension, int start, size_t size)
+ {
+ anchor.set(dimension, start);
+ shape.set(dimension, size);
+ return *this;
+ }
+
Coordinates anchor;
TensorShape shape;
};