// // 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_allocate(shape_t shape, int32_t uid) { size_t size = tensor_size(shape); tensor_t *allocated_tensor = new tensor_t; allocated_tensor->data = new in_t[size]; allocated_tensor->uid = uid; allocated_tensor->is_written = false; allocated_tensor->shape = shape; allocated_tensor->type = in_t; return allocated_tensor; }