misc: Fix coding style for struct's opening braces
The systemc dir was not included in this fix.
First it was identified that there were only occurrences
at 0, 1, 2 and 3 levels of indentation (and a single
occurrence of 2 and 3 spaces), using:
grep -nrE --exclude-dir=systemc \
"^ *struct [A-Za-z].* {$" src/
Then the following commands were run to replace:
<indent level>struct X ... {
by:
<indent level>struct X ...
<indent level>{
Level 0:
grep -nrl --exclude-dir=systemc
"^struct [A-Za-z].* {$" src/ | \
xargs sed -Ei \
's/^struct ([A-Za-z].*) \{$/struct \1\n\{/g'
Level 1:
grep -nrl --exclude-dir=systemc \
"^ struct [A-Za-z].* {$" src/ | \
xargs sed -Ei \
's/^ struct ([A-Za-z].*) \{$/ struct \1\n \{/g'
and so on.
Change-Id: I362ef58c86912dabdd272c7debb8d25d587cd455
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39017
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
f96de41fcf
commit
2922f763e1
@@ -165,7 +165,8 @@ class AbstractMemory : public ClockedObject
|
||||
*/
|
||||
System *_system;
|
||||
|
||||
struct MemStats : public Stats::Group {
|
||||
struct MemStats : public Stats::Group
|
||||
{
|
||||
MemStats(AbstractMemory &mem);
|
||||
|
||||
void regStats() override;
|
||||
|
||||
@@ -60,7 +60,8 @@ class IrregularStreamBuffer : public Queued
|
||||
* Training Unit Entry datatype, it holds the last accessed address and
|
||||
* its secure flag
|
||||
*/
|
||||
struct TrainingUnitEntry : public TaggedEntry {
|
||||
struct TrainingUnitEntry : public TaggedEntry
|
||||
{
|
||||
Addr lastAddress;
|
||||
bool lastAddressSecure;
|
||||
};
|
||||
@@ -68,7 +69,8 @@ class IrregularStreamBuffer : public Queued
|
||||
AssociativeSet<TrainingUnitEntry> trainingUnit;
|
||||
|
||||
/** Address Mapping entry, holds an address and a confidence counter */
|
||||
struct AddressMapping {
|
||||
struct AddressMapping
|
||||
{
|
||||
Addr address;
|
||||
SatCounter8 counter;
|
||||
AddressMapping(unsigned bits) : address(0), counter(bits)
|
||||
|
||||
3
src/mem/cache/prefetch/pif.hh
vendored
3
src/mem/cache/prefetch/pif.hh
vendored
@@ -71,7 +71,8 @@ class PIF : public Queued
|
||||
* The temporal compactor tracks a small number of the
|
||||
* most-recently-observed spatial region records.
|
||||
*/
|
||||
struct CompactorEntry {
|
||||
struct CompactorEntry
|
||||
{
|
||||
Addr trigger;
|
||||
std::vector<bool> prec;
|
||||
std::vector<bool> succ;
|
||||
|
||||
3
src/mem/cache/prefetch/queued.hh
vendored
3
src/mem/cache/prefetch/queued.hh
vendored
@@ -54,7 +54,8 @@ namespace Prefetcher {
|
||||
class Queued : public Base
|
||||
{
|
||||
protected:
|
||||
struct DeferredPacket : public BaseTLB::Translation {
|
||||
struct DeferredPacket : public BaseTLB::Translation
|
||||
{
|
||||
/** Owner of the packet */
|
||||
Queued *owner;
|
||||
/** Prefetch info corresponding to this packet */
|
||||
|
||||
3
src/mem/cache/prefetch/sbooe.hh
vendored
3
src/mem/cache/prefetch/sbooe.hh
vendored
@@ -77,7 +77,8 @@ class SBOOE : public Queued
|
||||
/** Holds the current sum of the latency buffer latency */
|
||||
Tick latencyBufferSum;
|
||||
|
||||
struct SandboxEntry {
|
||||
struct SandboxEntry
|
||||
{
|
||||
/** Cache line predicted by the candidate prefetcher */
|
||||
Addr line;
|
||||
/** Tick when the simulated prefetch is expected to be filled */
|
||||
|
||||
@@ -65,7 +65,8 @@ class STeMS : public Queued
|
||||
* Entry data type for the Active Generation Table (AGT) and the Pattern
|
||||
* Sequence Table (PST)
|
||||
*/
|
||||
struct ActiveGenerationTableEntry : public TaggedEntry {
|
||||
struct ActiveGenerationTableEntry : public TaggedEntry
|
||||
{
|
||||
/** Physical address of the spatial region */
|
||||
Addr paddress;
|
||||
/** PC that started this generation */
|
||||
@@ -74,7 +75,8 @@ class STeMS : public Queued
|
||||
unsigned int seqCounter;
|
||||
|
||||
/** Sequence entry data type */
|
||||
struct SequenceEntry {
|
||||
struct SequenceEntry
|
||||
{
|
||||
/** 2-bit confidence counter */
|
||||
SatCounter8 counter;
|
||||
/** Offset, in cache lines, within the spatial region */
|
||||
@@ -152,7 +154,8 @@ class STeMS : public Queued
|
||||
AssociativeSet<ActiveGenerationTableEntry> patternSequenceTable;
|
||||
|
||||
/** Data type of the Region Miss Order Buffer entry */
|
||||
struct RegionMissOrderBufferEntry {
|
||||
struct RegionMissOrderBufferEntry
|
||||
{
|
||||
/** Address of the spatial region */
|
||||
Addr srAddress;
|
||||
/**
|
||||
|
||||
@@ -83,7 +83,8 @@ operator!=(const MachineID & obj1, const MachineID & obj2)
|
||||
|
||||
namespace std {
|
||||
template<>
|
||||
struct hash<MachineID> {
|
||||
struct hash<MachineID>
|
||||
{
|
||||
inline size_t operator()(const MachineID& id) const {
|
||||
size_t hval = MachineType_base_level(id.type) << 16 | id.num;
|
||||
return hval;
|
||||
|
||||
@@ -160,7 +160,8 @@ class Network : public ClockedObject
|
||||
|
||||
private:
|
||||
// Global address map
|
||||
struct AddrMapNode {
|
||||
struct AddrMapNode
|
||||
{
|
||||
NodeID id;
|
||||
AddrRangeList ranges;
|
||||
};
|
||||
|
||||
@@ -511,7 +511,8 @@ ${{self.c_ident}} &operator++(${{self.c_ident}} &e);
|
||||
// define a hash function for the MachineType class
|
||||
namespace std {
|
||||
template<>
|
||||
struct hash<MachineType> {
|
||||
struct hash<MachineType>
|
||||
{
|
||||
std::size_t operator()(const MachineType &mtype) const {
|
||||
return hash<size_t>()(static_cast<size_t>(mtype));
|
||||
}
|
||||
|
||||
@@ -212,7 +212,8 @@ class SnoopFilter : public SimObject
|
||||
* outstanding request to this line (requested) or already share a
|
||||
* cache line with this address (holder).
|
||||
*/
|
||||
struct SnoopItem {
|
||||
struct SnoopItem
|
||||
{
|
||||
SnoopMask requested;
|
||||
SnoopMask holder;
|
||||
};
|
||||
@@ -268,7 +269,8 @@ class SnoopFilter : public SimObject
|
||||
* made to the snoop filter while performing the lookup must be undone.
|
||||
* This structure keeps track of the state previous to such changes.
|
||||
*/
|
||||
struct ReqLookupResult {
|
||||
struct ReqLookupResult
|
||||
{
|
||||
/** Iterator used to store the result from lookupRequest. */
|
||||
SnoopFilterCache::iterator it;
|
||||
|
||||
@@ -312,7 +314,8 @@ class SnoopFilter : public SimObject
|
||||
};
|
||||
|
||||
/** Statistics */
|
||||
struct SnoopFilterStats : public Stats::Group {
|
||||
struct SnoopFilterStats : public Stats::Group
|
||||
{
|
||||
SnoopFilterStats(Stats::Group *parent);
|
||||
|
||||
Stats::Scalar totRequests;
|
||||
|
||||
Reference in New Issue
Block a user