ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Knob.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 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 __KNOB_H__
18#define __KNOB_H__
19
20namespace moco
21{
22namespace tf
23{
24
25enum class Knob
26{
27#define KNOB_BOOL(NAME, DEFAULT, DESC) NAME,
28#include "Knob.lst"
29#undef KNOB_BOOL
30};
31
32template <Knob K> struct KnobTrait;
33
34#define KNOB_BOOL(NAME, DEFAULT, DESC) \
35 template <> struct KnobTrait<Knob::NAME> \
36 { \
37 using ValueType = bool; \
38 };
39#include "Knob.lst"
40#undef KNOB_BOOL
41
42template <Knob K> typename KnobTrait<K>::ValueType get(void);
43
44} // namespace tf
45} // namespace moco
46
47#endif // __KNOB_H__
KnobTrait< K >::ValueType get(void)
Definition Log.h:23