blob: 4a39cf286caadf2d77b1f07697f2e144e8285a95 [file] [log] [blame]
Kevin Petita7ac3132024-01-08 15:27:25 +00001//
2// This confidential and proprietary software may be used only as
3// authorised by a licensing agreement from ARM Limited
4// (C) COPYRIGHT 2020-2024 ARM Limited
5// ALL RIGHTS RESERVED
6// The entire notice above must be reproduced on all authorised
7// copies and copies may only be made to the extent permitted
8// by a licensing agreement from ARM Limited.
9
10ERROR_IF(axis < 0 || axis >= rank(shape));
11for_each(index in shape) {
Eric Kunze526f6c72024-01-12 17:18:42 -080012 shape_t tmp_index = index;
Kevin Petita7ac3132024-01-08 15:27:25 +000013 tmp_index[axis] = shape[axis] - 1 - index[axis];
14 in_out_t value = tensor_read<in_out_t>(input, shape, tmp_index);
15 tensor_write<in_out_t>(output, shape, index, value);
16}