aboutsummaryrefslogtreecommitdiff
path: root/pseudocode/operators/CONCAT_SHAPE.tosac
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2024-01-12 17:18:42 -0800
committerEric Kunze <eric.kunze@arm.com>2024-01-31 06:00:03 +0000
commit526f6c7b5d20e967109ca92c8fc54c26c0438135 (patch)
tree7186a2dec336db8389cdf0cf8bacd60f9da4cf64 /pseudocode/operators/CONCAT_SHAPE.tosac
parent7e5d187c612fcc715ea3f7f0c900eb13af75a660 (diff)
downloadspecification-526f6c7b5d20e967109ca92c8fc54c26c0438135.tar.gz
Add section of shape operatorsv0.90.0
Rework of the shape operations. Shape operations are now done in shape specific operators rather than being based on type. shape_t is reworked to a list of size_t values. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I2fca0728f9caa6a6fc34a8ce9e389bb581eea959
Diffstat (limited to 'pseudocode/operators/CONCAT_SHAPE.tosac')
-rw-r--r--pseudocode/operators/CONCAT_SHAPE.tosac18
1 files changed, 18 insertions, 0 deletions
diff --git a/pseudocode/operators/CONCAT_SHAPE.tosac b/pseudocode/operators/CONCAT_SHAPE.tosac
new file mode 100644
index 0000000..4b6def6
--- /dev/null
+++ b/pseudocode/operators/CONCAT_SHAPE.tosac
@@ -0,0 +1,18 @@
+//
+// This confidential and proprietary software may be used only as
+// authorised by a licensing agreement from ARM Limited
+// (C) COPYRIGHT 2024 ARM Limited
+// ALL RIGHTS RESERVED
+// The entire notice above must be reproduced on all authorised
+// copies and copies may only be made to the extent permitted
+// by a licensing agreement from ARM Limited.
+
+ERROR_IF(length(output) != sum(length(input1[k]) for all k));
+
+size_t index = 0;
+for (int32_t i=0; i < length(input1); i++) {
+ for (int32_t j=0; j < length(input1[i]); j++) {
+ output[index] = input1[i][j];
+ index++;
+ }
+}