From 2faaa5570cd2a1a0b90c2cc9ac1a2c7d17a42200 Mon Sep 17 00:00:00 2001 From: Alessandro Vinciguerra Date: Wed, 15 Mar 2023 21:47:00 +0100 Subject: [PATCH] Reformat reduction macros --- .clang-format | 2 +- src/Field/BareField.hpp | 6 +++--- src/Particle/ParticleAttrib.hpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.clang-format b/.clang-format index 46bb4bb3b..66e07b9fd 100644 --- a/.clang-format +++ b/.clang-format @@ -21,4 +21,4 @@ IndentGotoLabels: false NamespaceIndentation: All PackConstructorInitializers: Never ReflowComments: true -StatementMacros: ['DefineUnaryOperation', 'DefineBinaryOperation'] +StatementMacros: ['DefineUnaryOperation', 'DefineBinaryOperation', 'DefineReduction', 'DefineParticleReduction'] diff --git a/src/Field/BareField.hpp b/src/Field/BareField.hpp index f2e7f17b3..43cdcd4a4 100644 --- a/src/Field/BareField.hpp +++ b/src/Field/BareField.hpp @@ -168,8 +168,8 @@ namespace ippl { } DefineReduction(Sum, sum, valL += myVal, MPI_SUM) - DefineReduction(Max, max, if (myVal > valL) valL = myVal, MPI_MAX) - DefineReduction(Min, min, if (myVal < valL) valL = myVal, MPI_MIN) - DefineReduction(Prod, prod, valL *= myVal, MPI_PROD) + DefineReduction(Max, max, if (myVal > valL) valL = myVal, MPI_MAX) + DefineReduction(Min, min, if (myVal < valL) valL = myVal, MPI_MIN) + DefineReduction(Prod, prod, valL *= myVal, MPI_PROD) } // namespace ippl diff --git a/src/Particle/ParticleAttrib.hpp b/src/Particle/ParticleAttrib.hpp index eaf2bc1bf..2ef1bb619 100644 --- a/src/Particle/ParticleAttrib.hpp +++ b/src/Particle/ParticleAttrib.hpp @@ -252,7 +252,7 @@ namespace ippl { } DefineParticleReduction(Sum, sum, valL += myVal, MPI_SUM) - DefineParticleReduction(Max, max, if (myVal > valL) valL = myVal, MPI_MAX) - DefineParticleReduction(Min, min, if (myVal < valL) valL = myVal, MPI_MIN) - DefineParticleReduction(Prod, prod, valL *= myVal, MPI_PROD) + DefineParticleReduction(Max, max, if (myVal > valL) valL = myVal, MPI_MAX) + DefineParticleReduction(Min, min, if (myVal < valL) valL = myVal, MPI_MIN) + DefineParticleReduction(Prod, prod, valL *= myVal, MPI_PROD) } // namespace ippl