blob: 97bdec5ab8524f4ecac3f8c5273680f4c18e1e74 [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001{#
2 Copyright (c) 2021 Arm Limited. All rights reserved.
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#include "Model.hpp"
20{% for header in additional_headers %}
21#include "{{header}}"
22{% endfor %}
23
24{% for namespace in namespaces %}
25namespace {{namespace}} {
26{% endfor %}
27
28{% for expression in expressions %}
29{{expression}};
30{% endfor %}
31
32static const uint8_t nn_model[] MODEL_TFLITE_ATTRIBUTE =
33{% for model_hex_line in model_data %}
34{{model_hex_line}}
35{% endfor %}
36
37const uint8_t * GetModelPointer()
38{
39 return nn_model;
40}
41
42size_t GetModelLen()
43{
44 return sizeof(nn_model);
45}
46
47{% for namespace in namespaces %}
48} /* namespace {{namespace}} */
49{% endfor %}