alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 1 | {# |
Richard Burton | f32a86a | 2022-11-15 11:46:11 +0000 | [diff] [blame] | 2 | SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com> |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 3 | SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | #} |
| 17 | {{common_template_header}} |
| 18 | |
| 19 | #ifndef GENERATED_TEST_DATA_H |
| 20 | #define GENERATED_TEST_DATA_H |
| 21 | |
| 22 | #include <cstdint> |
| 23 | |
| 24 | {% for namespace in namespaces %} |
| 25 | namespace {{namespace}} { |
| 26 | {% endfor %} |
| 27 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 28 | #define NUMBER_OF_IFM_FILES ({{ifm_count}}U) |
| 29 | #define NUMBER_OF_OFM_FILES ({{ofm_count}}U) |
Richard Burton | 0055346 | 2021-11-10 16:27:14 +0000 | [diff] [blame] | 30 | {% for ifm_size in ifm_var_sizes %} |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 31 | #define IFM_{{loop.index0}}_DATA_SIZE ({{ifm_size}}U) |
Richard Burton | 0055346 | 2021-11-10 16:27:14 +0000 | [diff] [blame] | 32 | {% endfor %} |
| 33 | {% for ofm_size in ofm_var_sizes %} |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 34 | #define OFM_{{loop.index0}}_DATA_SIZE ({{ofm_size}}U) |
Richard Burton | 0055346 | 2021-11-10 16:27:14 +0000 | [diff] [blame] | 35 | {% endfor %} |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 36 | |
| 37 | {% for ifm_var_name in ifm_var_names %} |
Richard Burton | 0055346 | 2021-11-10 16:27:14 +0000 | [diff] [blame] | 38 | extern const {{data_type}} {{ifm_var_name}}[IFM_{{loop.index0}}_DATA_SIZE]; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 39 | {% endfor %} |
| 40 | |
| 41 | {% for ofm_var_name in ofm_var_names %} |
Richard Burton | 0055346 | 2021-11-10 16:27:14 +0000 | [diff] [blame] | 42 | extern const {{data_type}} {{ofm_var_name}}[OFM_{{loop.index0}}_DATA_SIZE]; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 43 | {% endfor %} |
| 44 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 45 | /** |
| 46 | * @brief Gets the pointer to input feature map (IFM). |
| 47 | * @param[in] idx Index of the input. |
| 48 | * @return Pointer to IFM. |
| 49 | **/ |
| 50 | const {{data_type}}* GetIfmDataArray(const uint32_t idx); |
| 51 | |
| 52 | /** |
| 53 | * @brief Gets the pointer to output feature map (OFM). |
| 54 | * @param[in] idx Index of the output. |
| 55 | * @return Pointer to OFM. |
| 56 | **/ |
| 57 | const {{data_type}}* GetOfmDataArray(const uint32_t idx); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 58 | |
| 59 | {% for namespace in namespaces %} |
| 60 | } /* namespace {{namespace}} */ |
| 61 | {% endfor %} |
| 62 | |
| 63 | #endif /* GENERATED_TEST_DATA_H */ |