// // This confidential and proprietary software may be used only as // authorised by a licensing agreement from ARM Limited // (C) COPYRIGHT 2020-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. tensor_t variable_tensor = variable_tensor_lookup(uid); // Check this variable tensor has been decalred REQUIRE(variable_tensor != NULL); // Check this variable tensor has been written REQUIRE(variable_tensor.is_written); // Output tensor's shape and variable_tensor's shape have to match REQUIRE(variable_tensor.shape == shape); // Output tensor's shape and variable_tensor's type have to match REQUIRE(variable_tensor.type == out_t); for_each (index in shape) { // Read data from pseudo-buffer resource to the output out_t value = tensor_read(variable_tensor.data, variable_tensor.shape, index); tensor_write(output1, shape, index, value); }