ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __COMMON_H__
18#define __COMMON_H__
19
20#include <string>
21
32std::string mangle(const std::string &);
33
34#if 0
35Let us assume that a tensor context includes N + 1 tensors.
36
37Then, HDF5 export will generate a HDF5 file whose structure is given as follows:
38[value group]/
39 [file 0] <- A dataset that contains the value of 1st (=0) tensor
40 [file 1]
41 ...
42 [file N]
43[name group]/
44 [file 0] <- An attribute that contains the name of 1st (=0) tensor
45 [file 1]
46 ...
47 [file N]
48#endif
49
51std::string value_grpname(void);
53std::string value_filename(uint32_t n);
54
56std::string name_grpname(void);
58std::string name_filename(uint32_t n);
59
60#endif // __COMMON_H__
std::string value_grpname(void)
Return the name of "value group".
Definition Common.cpp:34
std::string name_grpname(void)
Return the name of "name group".
Definition Common.cpp:37
std::string name_filename(uint32_t n)
Return the name of n-th tensor attribute.
Definition Common.cpp:38
std::string mangle(const std::string &)
Construct HDF5-compatible dataset name from a given string.
Definition Common.cpp:19
std::string value_filename(uint32_t n)
Return the name of n-th tensor dataset.
Definition Common.cpp:35
DERIVED * as(loco::Node *node)
Definition Transform.h:39