ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Overlay.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 __NNCC_CORE_ADT_FEATURE_OVERLAY_H__
18
#define __NNCC_CORE_ADT_FEATURE_OVERLAY_H__
19
20
#include "
nncc/core/ADT/feature/View.h
"
21
22
#include <vector>
23
24
namespace
nncc
25
{
26
namespace
core
27
{
28
namespace
ADT
29
{
30
namespace
feature
31
{
32
33
template
<
typename
T>
class
Overlay
final :
public
View
<T>
34
{
35
public
:
36
explicit
Overlay
(
const
Shape
&
shape
,
const
Layout
&layout, T *
base
)
37
:
View
<T>{
shape
, layout}, _base{
base
}
38
{
39
// DO NOTHING
40
}
41
42
public
:
43
virtual
T *
base
(
void
) {
return
_base; }
44
virtual
const
T *
base
(
void
)
const
{
return
_base; }
45
46
private
:
47
T *
const
_base;
48
};
49
50
template
<
typename
T,
typename
LayoutImpl>
Overlay<T>
make_overlay
(
const
Shape
&shape, T *base)
51
{
52
return
Overlay<T>
{shape, LayoutImpl{}, base};
53
}
54
55
}
// namespace feature
56
}
// namespace ADT
57
}
// namespace core
58
}
// namespace nncc
59
60
#endif
// __NNCC_CORE_ADT_FEATURE_OVERLAY_H__
nncc::core::ADT::feature::Layout
Definition
Layout.h:32
nncc::core::ADT::feature::Overlay
Definition
Overlay.h:34
nncc::core::ADT::feature::Overlay::base
virtual const T * base(void) const
Definition
Overlay.h:44
nncc::core::ADT::feature::Overlay::base
virtual T * base(void)
Definition
Overlay.h:43
nncc::core::ADT::feature::Overlay::Overlay
Overlay(const Shape &shape, const Layout &layout, T *base)
Definition
Overlay.h:36
nncc::core::ADT::feature::Shape
Definition
Shape.h:35
nncc::core::ADT::feature::View
Definition
View.h:35
nncc::core::ADT::feature::View::shape
const Shape & shape(void) const
Definition
View.h:59
View.h
nncc::core::ADT::feature::make_overlay
Overlay< T > make_overlay(const Shape &shape, T *base)
Definition
Overlay.h:50
nncc
Definition
Accessor.h:23
compiler
angkor
include
nncc
core
ADT
feature
Overlay.h
Generated by
1.9.8