gem5
v21.2.1.1
Main Page
Related Pages
Modules
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
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
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
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
v
x
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class 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
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
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
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
z
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
v
Variables
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
h
i
l
m
r
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
base
stl_helpers.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 The Hewlett-Packard Development Company
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are
7
* met: redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer;
9
* redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution;
12
* neither the name of the copyright holders nor the names of its
13
* contributors may be used to endorse or promote products derived from
14
* this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef __BASE_STL_HELPERS_HH__
30
#define __BASE_STL_HELPERS_HH__
31
32
#include <algorithm>
33
#include <iostream>
34
#include <type_traits>
35
#include <vector>
36
37
#include "
base/compiler.hh
"
38
39
GEM5_DEPRECATED_NAMESPACE
(m5,
gem5
);
40
namespace
gem5
41
{
42
43
namespace
stl_helpers
44
{
45
46
template
<
typename
T,
typename
Enabled=
void
>
47
struct
IsHelpedContainer
:
public
std::false_type {};
48
49
template
<
typename
...Types>
50
struct
IsHelpedContainer
<
std
::
vector
<Types...>> :
public
std::true_type {};
51
52
template
<
typename
...Types>
53
constexpr
bool
IsHelpedContainerV
=
IsHelpedContainer
<Types...>::value;
54
62
template
<
typename
T>
63
std::enable_if_t<IsHelpedContainerV<T>, std::ostream &>
64
operator<<
(std::ostream& out,
const
T &
t
)
65
{
66
out <<
"[ "
;
67
bool
first =
true
;
68
auto
printer = [&first, &out](
const
auto
&elem) {
69
if
(first)
70
out << elem;
71
else
72
out <<
" "
<< elem;
73
};
74
std::for_each(
t
.begin(),
t
.end(), printer);
75
out <<
" ]"
;
76
out << std::flush;
77
return
out;
78
}
79
80
}
// namespace stl_helpers
81
}
// namespace gem5
82
83
#endif // __BASE_STL_HELPERS_HH__
gem5::X86ISA::vector
Bitfield< 15, 8 > vector
Definition:
intmessage.hh:48
gem5::stl_helpers::IsHelpedContainerV
constexpr bool IsHelpedContainerV
Definition:
stl_helpers.hh:53
GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(m5, gem5)
compiler.hh
gem5::ArmISA::t
Bitfield< 5 > t
Definition:
misc_types.hh:71
gem5::stl_helpers::operator<<
std::enable_if_t< IsHelpedContainerV< T >, std::ostream & > operator<<(std::ostream &out, const T &t)
Write out all elements in an stl container as a space separated list enclosed in square brackets.
Definition:
stl_helpers.hh:64
gem5::stl_helpers::IsHelpedContainer
Definition:
stl_helpers.hh:47
std
Overload hash function for BasicBlockRange type.
Definition:
types.hh:111
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
tlb.cc:60
Generated on Wed May 4 2022 12:13:52 for gem5 by
doxygen
1.8.17