misc: Fix coding style for enum's opening braces

The systemc dir was not included in this fix.

First it was identified that there were only occurrences
at 0, 1, and 2 levels of indentation (and 2 of 2 spaces,
1 of 3 spaces and 2 of 12 spaces), using:

    grep -nrE --exclude-dir=systemc \
        "^ *enum [A-Za-z].* {$" src/

Then the following commands were run to replace:

    <indent level>enum X ... {

by:

    <indent level>enum X ...
    <indent level>{

Level 0:
    grep -nrl --exclude-dir=systemc \
        "^enum [A-Za-z].* {$" src/ | \
        xargs sed -Ei \
        's/^enum ([A-Za-z].*) \{$/enum \1\n\{/g'

Level 1:
    grep -nrl --exclude-dir=systemc \
        "^    enum [A-Za-z].* {$" src/ | \
        xargs sed -Ei \
        's/^    enum ([A-Za-z].*) \{$/    enum \1\n    \{/g'

and so on.

Change-Id: Ib186cf379049098ceaec20dfe4d1edcedd5f940d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43326
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-03-19 19:05:04 -03:00
committed by Daniel Carvalho
parent 08913caec2
commit 7f1de4e686
104 changed files with 370 additions and 187 deletions

View File

@@ -65,7 +65,8 @@ class GPUCommandProcessor : public HSADevice
void setShader(Shader *shader);
Shader* shader();
enum AgentCmd {
enum AgentCmd
{
Nop = 0,
Steal = 1
};

View File

@@ -47,7 +47,8 @@ typedef std::bitset<std::numeric_limits<unsigned long long>::digits>
VectorMask;
typedef std::shared_ptr<GPUDynInst> GPUDynInstPtr;
enum InstMemoryHop : int {
enum InstMemoryHop : int
{
Initiate = 0,
CoalsrSend = 1,
CoalsrRecv = 2,
@@ -56,7 +57,8 @@ enum InstMemoryHop : int {
InstMemoryHopMax = 5
};
enum BlockMemoryHop : int {
enum BlockMemoryHop : int
{
BlockSend = 0,
BlockRecv = 1
};

View File

@@ -70,7 +70,8 @@ class ScheduleStage
// Stats related variables and methods
const std::string& name() const { return _name; }
enum SchNonRdyType {
enum SchNonRdyType
{
SCH_SCALAR_ALU_NRDY,
SCH_VECTOR_ALU_NRDY,
SCH_VECTOR_MEM_ISSUE_NRDY,
@@ -92,13 +93,15 @@ class ScheduleStage
SCH_RDY,
SCH_NRDY_CONDITIONS
};
enum schopdnonrdytype_e {
enum schopdnonrdytype_e
{
SCH_VRF_OPD_NRDY,
SCH_SRF_OPD_NRDY,
SCH_RF_OPD_NRDY,
SCH_RF_OPD_NRDY_CONDITIONS
};
enum schrfaccessnonrdytype_e {
enum schrfaccessnonrdytype_e
{
SCH_VRF_RD_ACCESS_NRDY,
SCH_VRF_WR_ACCESS_NRDY,
SCH_SRF_RD_ACCESS_NRDY,

View File

@@ -60,7 +60,8 @@ struct ComputeUnitParams;
class ScoreboardCheckStage
{
public:
enum nonrdytype_e {
enum nonrdytype_e
{
NRDY_ILLEGAL,
NRDY_WF_STOP,
NRDY_IB_EMPTY,

View File

@@ -59,7 +59,8 @@
class Wavefront : public SimObject
{
public:
enum status_e {
enum status_e
{
// wavefront is stalled
S_STOPPED,
// wavefront is returning from a kernel