aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/shape4d.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/shape4d.py')
-rw-r--r--ethosu/vela/shape4d.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/shape4d.py b/ethosu/vela/shape4d.py
index 08b2a6a0..fd1ee949 100644
--- a/ethosu/vela/shape4d.py
+++ b/ethosu/vela/shape4d.py
@@ -111,6 +111,9 @@ class Shape4D(namedtuple("Shape4D", ["batch", "height", "width", "depth"])):
def __sub__(self, rhs):
return Shape4D(self.batch - rhs.batch, self.height - rhs.height, self.width - rhs.width, self.depth - rhs.depth)
+ def floordiv_const(self, const):
+ return Shape4D(self.batch // const, self.height // const, self.width // const, self.depth // const)
+
def __floordiv__(self, rhs):
return Shape4D(
self.batch // rhs.batch, self.height // rhs.height, self.width // rhs.width, self.depth // rhs.depth