blob: bd56f9fb05d3f9b39c4b25403c8cc006f971a639 [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001{#
Richard Burtonf32a86a2022-11-15 11:46:11 +00002 SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com>
alexander3c798932021-03-26 21:42:19 +00003 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 %}
25namespace {{namespace}} {
26{% endfor %}
27
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000028#define NUMBER_OF_IFM_FILES ({{ifm_count}}U)
29#define NUMBER_OF_OFM_FILES ({{ofm_count}}U)
Richard Burton00553462021-11-10 16:27:14 +000030{% for ifm_size in ifm_var_sizes %}
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000031#define IFM_{{loop.index0}}_DATA_SIZE ({{ifm_size}}U)
Richard Burton00553462021-11-10 16:27:14 +000032{% endfor %}
33{% for ofm_size in ofm_var_sizes %}
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000034#define OFM_{{loop.index0}}_DATA_SIZE ({{ofm_size}}U)
Richard Burton00553462021-11-10 16:27:14 +000035{% endfor %}
alexander3c798932021-03-26 21:42:19 +000036
37{% for ifm_var_name in ifm_var_names %}
Richard Burton00553462021-11-10 16:27:14 +000038extern const {{data_type}} {{ifm_var_name}}[IFM_{{loop.index0}}_DATA_SIZE];
alexander3c798932021-03-26 21:42:19 +000039{% endfor %}
40
41{% for ofm_var_name in ofm_var_names %}
Richard Burton00553462021-11-10 16:27:14 +000042extern const {{data_type}} {{ofm_var_name}}[OFM_{{loop.index0}}_DATA_SIZE];
alexander3c798932021-03-26 21:42:19 +000043{% endfor %}
44
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000045/**
46 * @brief Gets the pointer to input feature map (IFM).
47 * @param[in] idx Index of the input.
48 * @return Pointer to IFM.
49 **/
50const {{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 **/
57const {{data_type}}* GetOfmDataArray(const uint32_t idx);
alexander3c798932021-03-26 21:42:19 +000058
59{% for namespace in namespaces %}
60} /* namespace {{namespace}} */
61{% endfor %}
62
63#endif /* GENERATED_TEST_DATA_H */