Apollo
11.0
自动驾驶开放平台
rt_legacy.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2018 The Apollo Authors. 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
#pragma once
18
19
#include <NvInferLegacyDims.h>
20
21
namespace
nvinfer1
{
22
class
DimsNCHW
:
public
Dims4
{
23
public
:
24
DimsNCHW
() :
Dims4
() {}
25
DimsNCHW
(
26
int32_t batch_size, int32_t channels,
27
int32_t height, int32_t width)
28
:
Dims4
(batch_size, channels, height, width) {}
29
30
int32_t&
n
() {
31
return
d
[0];
32
}
33
34
int32_t
n
()
const
{
35
return
d
[0];
36
}
37
38
int32_t&
c
() {
39
return
d
[1];
40
}
41
42
int32_t
c
()
const
{
43
return
d
[1];
44
}
45
46
int32_t&
h
() {
47
return
d
[2];
48
}
49
50
int32_t
h
()
const
{
51
return
d
[2];
52
}
53
54
int32_t&
w
() {
55
return
d
[3];
56
}
57
58
int32_t
w
()
const
{
59
return
d
[3];
60
}
61
};
62
63
class
DimsCHW
:
public
Dims3 {
64
public
:
65
DimsCHW
() : Dims3() {}
66
DimsCHW
(int32_t channels, int32_t height, int32_t width)
67
: Dims3(channels, height, width) {}
68
69
int32_t&
c
() {
70
return
d[0];
71
}
72
73
int32_t
c
()
const
{
74
return
d[0];
75
}
76
77
int32_t&
h
() {
78
return
d[1];
79
}
80
81
int32_t
h
()
const
{
82
return
d[1];
83
}
84
85
int32_t&
w
() {
86
return
d[2];
87
}
88
89
int32_t
w
()
const
{
90
return
d[2];
91
}
92
};
93
}
// namespace nvinfer1
94
Dims4
Definition
plugin.h:31
Dims::d
int32_t d[MAX_DIMS]
Definition
plugin.h:28
nvinfer1::DimsCHW
Definition
rt_legacy.h:63
nvinfer1::DimsCHW::h
int32_t h() const
Definition
rt_legacy.h:81
nvinfer1::DimsCHW::c
int32_t c() const
Definition
rt_legacy.h:73
nvinfer1::DimsCHW::DimsCHW
DimsCHW(int32_t channels, int32_t height, int32_t width)
Definition
rt_legacy.h:66
nvinfer1::DimsCHW::DimsCHW
DimsCHW()
Definition
rt_legacy.h:65
nvinfer1::DimsCHW::w
int32_t w() const
Definition
rt_legacy.h:89
nvinfer1::DimsCHW::h
int32_t & h()
Definition
rt_legacy.h:77
nvinfer1::DimsCHW::w
int32_t & w()
Definition
rt_legacy.h:85
nvinfer1::DimsCHW::c
int32_t & c()
Definition
rt_legacy.h:69
nvinfer1::DimsNCHW
Definition
rt_legacy.h:22
nvinfer1::DimsNCHW::n
int32_t n() const
Definition
rt_legacy.h:34
nvinfer1::DimsNCHW::h
int32_t & h()
Definition
rt_legacy.h:46
nvinfer1::DimsNCHW::n
int32_t & n()
Definition
rt_legacy.h:30
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW()
Definition
rt_legacy.h:24
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW(int32_t batch_size, int32_t channels, int32_t height, int32_t width)
Definition
rt_legacy.h:25
nvinfer1::DimsNCHW::c
int32_t c() const
Definition
rt_legacy.h:42
nvinfer1::DimsNCHW::c
int32_t & c()
Definition
rt_legacy.h:38
nvinfer1::DimsNCHW::h
int32_t h() const
Definition
rt_legacy.h:50
nvinfer1::DimsNCHW::w
int32_t & w()
Definition
rt_legacy.h:54
nvinfer1::DimsNCHW::w
int32_t w() const
Definition
rt_legacy.h:58
nvinfer1
Definition
entropy_calibrator.cc:32
modules
perception
common
inference
tensorrt
rt_legacy.h