ONE - On-device Neural Engine
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
w
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
k
l
m
n
o
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
u
v
w
y
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
a
c
d
e
f
g
i
k
l
m
o
p
r
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Symbols
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Variables
_
b
c
d
f
g
i
k
m
n
o
p
s
t
v
Typedefs
a
d
f
g
i
l
m
n
o
s
t
u
v
Enumerations
f
g
n
o
p
r
Enumerator
a
k
n
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
Context.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 __HERMES_CONTEXT_H__
18
#define __HERMES_CONTEXT_H__
19
20
#include "
hermes/core/Config.h
"
21
#include "
hermes/core/Source.h
"
22
#include "
hermes/core/Sink.h
"
23
#include "
hermes/core/MessageBus.h
"
24
25
#include <memory>
26
#include <set>
27
28
namespace
hermes
29
{
30
39
class
Context
final :
private
MessageBus
,
private
Source::Registry
,
private
Sink::Registry
40
{
41
public
:
43
const
Config
*
config
(
void
)
const
;
45
void
config
(std::unique_ptr<Config> &&);
46
47
public
:
48
MessageBus
*
bus
(
void
) {
return
this
; }
49
50
private
:
52
void
post(std::unique_ptr<Message> &&msg)
override
;
53
54
public
:
55
Source::Registry
*
sources
(
void
) {
return
this
; }
56
57
private
:
59
void
attach(
Source
*source)
override
;
61
void
detach(
Source
*source)
override
;
62
63
public
:
64
Sink::Registry
*
sinks
(
void
) {
return
this
; }
65
66
private
:
68
void
append(std::unique_ptr<Sink> &&sink)
override
;
69
70
private
:
71
std::unique_ptr<Config> _config;
72
std::set<Source *> _sources;
73
std::set<std::unique_ptr<Sink>> _sinks;
74
};
39
class
Context
final :
private
MessageBus
,
private
Source::Registry
,
private
Sink::Registry
{
…
};
75
76
}
// namespace hermes
77
78
#endif
// __HERMES_CONTEXT_H__
MessageBus.h
Sink.h
Source.h
hermes::Context
Logging controller.
Definition
Context.h:40
hermes::Context::sources
Source::Registry * sources(void)
Definition
Context.h:55
hermes::Context::sinks
Sink::Registry * sinks(void)
Definition
Context.h:64
hermes::Context::bus
MessageBus * bus(void)
Definition
Context.h:48
hermes::Context::config
const Config * config(void) const
Get the global configuration.
Definition
Context.cpp:24
hermes::Source
Message Source.
Definition
Source.h:35
Config.h
hermes
Definition
ConsoleReporter.h:23
hermes::Config
Top-level configuration interface.
Definition
Config.h:35
hermes::MessageBus
A bridge between Source and Sink.
Definition
MessageBus.h:31
hermes::Sink::Registry
Definition
Sink.h:35
hermes::Source::Registry
Definition
Source.h:38
compiler
hermes
include
hermes
core
Context.h
Generated by
1.9.8