From 8cb7a1a88741b7a5b558ec0f182fec86fda2cd11 Mon Sep 17 00:00:00 2001 From: paboyle Date: Sat, 13 Jan 2018 00:17:16 +0000 Subject: [PATCH] Format --- lib/communicator/Communicator.h | 6 +++--- lib/communicator/Communicator_base.cc | 6 +++--- lib/communicator/Communicator_base.h | 16 ++++++++-------- lib/communicator/Communicator_mpi3.cc | 8 ++++---- lib/communicator/Communicator_none.cc | 10 +++++----- lib/communicator/SharedMemory.h | 18 +++++++++--------- lib/communicator/SharedMemoryMPI.cc | 8 ++++---- lib/communicator/SharedMemoryNone.cc | 8 ++++---- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lib/communicator/Communicator.h b/lib/communicator/Communicator.h index d4ec5a13..c332c04a 100644 --- a/lib/communicator/Communicator.h +++ b/lib/communicator/Communicator.h @@ -1,4 +1,4 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -23,8 +23,8 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #ifndef GRID_COMMUNICATOR_H #define GRID_COMMUNICATOR_H diff --git a/lib/communicator/Communicator_base.cc b/lib/communicator/Communicator_base.cc index c5650d35..b10c1a04 100644 --- a/lib/communicator/Communicator_base.cc +++ b/lib/communicator/Communicator_base.cc @@ -1,4 +1,4 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -23,8 +23,8 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #include #include #include diff --git a/lib/communicator/Communicator_base.h b/lib/communicator/Communicator_base.h index 016bb7b4..cd64abb7 100644 --- a/lib/communicator/Communicator_base.h +++ b/lib/communicator/Communicator_base.h @@ -1,5 +1,5 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -24,8 +24,8 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #ifndef GRID_COMMUNICATOR_BASE_H #define GRID_COMMUNICATOR_BASE_H @@ -73,7 +73,7 @@ public: CartesianCommunicator(const std::vector &pdimensions_in); virtual ~CartesianCommunicator(); - private: +private: //////////////////////////////////////////////// // Private initialise from an MPI communicator @@ -81,7 +81,7 @@ public: //////////////////////////////////////////////// void InitFromMPICommunicator(const std::vector &processors, Grid_MPI_Comm communicator_base); - public: +public: //////////////////////////////////////////////////////////////////////////////////////// // Wraps MPI_Cart routines, or implements equivalent on other impls @@ -196,9 +196,9 @@ public: void AllToAll(void *in,void *out,uint64_t words ,uint64_t bytes); template void Broadcast(int root,obj &data) - { - Broadcast(root,(void *)&data,sizeof(data)); - }; + { + Broadcast(root,(void *)&data,sizeof(data)); + }; }; diff --git a/lib/communicator/Communicator_mpi3.cc b/lib/communicator/Communicator_mpi3.cc index 8022b775..dbe570f8 100644 --- a/lib/communicator/Communicator_mpi3.cc +++ b/lib/communicator/Communicator_mpi3.cc @@ -23,8 +23,8 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #include #include @@ -53,8 +53,8 @@ void CartesianCommunicator::Init(int *argc, char ***argv) GlobalSharedMemory::Init(communicator_world); GlobalSharedMemory::SharedMemoryAllocate( - GlobalSharedMemory::MAX_MPI_SHM_BYTES, - GlobalSharedMemory::Hugepages); + GlobalSharedMemory::MAX_MPI_SHM_BYTES, + GlobalSharedMemory::Hugepages); } /////////////////////////////////////////////////////////////////////////// diff --git a/lib/communicator/Communicator_none.cc b/lib/communicator/Communicator_none.cc index 9606e5b9..12a84995 100644 --- a/lib/communicator/Communicator_none.cc +++ b/lib/communicator/Communicator_none.cc @@ -1,4 +1,4 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -23,8 +23,8 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #include NAMESPACE_BEGIN(Grid); @@ -38,8 +38,8 @@ void CartesianCommunicator::Init(int *argc, char *** arv) { GlobalSharedMemory::Init(communicator_world); GlobalSharedMemory::SharedMemoryAllocate( - GlobalSharedMemory::MAX_MPI_SHM_BYTES, - GlobalSharedMemory::Hugepages); + GlobalSharedMemory::MAX_MPI_SHM_BYTES, + GlobalSharedMemory::Hugepages); } CartesianCommunicator::CartesianCommunicator(const std::vector &processors,const CartesianCommunicator &parent,int &srank) diff --git a/lib/communicator/SharedMemory.h b/lib/communicator/SharedMemory.h index 4987b057..1e213b86 100644 --- a/lib/communicator/SharedMemory.h +++ b/lib/communicator/SharedMemory.h @@ -48,15 +48,15 @@ Author: Peter Boyle NAMESPACE_BEGIN(Grid); #if defined (GRID_COMMS_MPI3) - typedef MPI_Comm Grid_MPI_Comm; - typedef MPI_Request CommsRequest_t; +typedef MPI_Comm Grid_MPI_Comm; +typedef MPI_Request CommsRequest_t; #else - typedef int CommsRequest_t; - typedef int Grid_MPI_Comm; +typedef int CommsRequest_t; +typedef int Grid_MPI_Comm; #endif class GlobalSharedMemory { - private: +private: static const int MAXLOG2RANKSPERNODE = 16; // Init once lock on the buffer allocation @@ -64,7 +64,7 @@ class GlobalSharedMemory { static int _ShmAlloc; static uint64_t _ShmAllocBytes; - public: +public: static int ShmSetup(void) { return _ShmSetup; } static int ShmAlloc(void) { return _ShmAlloc; } static uint64_t ShmAllocBytes(void) { return _ShmAllocBytes; } @@ -104,14 +104,14 @@ class GlobalSharedMemory { ////////////////////////////// class SharedMemory { - private: +private: static const int MAXLOG2RANKSPERNODE = 16; size_t heap_top; size_t heap_bytes; size_t heap_size; - protected: +protected: Grid_MPI_Comm ShmComm; // for barriers int ShmRank; @@ -119,7 +119,7 @@ class SharedMemory std::vector ShmCommBufs; std::vector ShmRanks;// Mapping comm ranks to Shm ranks - public: +public: SharedMemory() {}; /////////////////////////////////////////////////////////////////////////////////////// // set the buffers & sizes diff --git a/lib/communicator/SharedMemoryMPI.cc b/lib/communicator/SharedMemoryMPI.cc index b10e6615..3184d071 100644 --- a/lib/communicator/SharedMemoryMPI.cc +++ b/lib/communicator/SharedMemoryMPI.cc @@ -292,10 +292,10 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags) } #endif - //////////////////////////////////////////////////////// - // Global shared functionality finished - // Now move to per communicator functionality - //////////////////////////////////////////////////////// +//////////////////////////////////////////////////////// +// Global shared functionality finished +// Now move to per communicator functionality +//////////////////////////////////////////////////////// void SharedMemory::SetCommunicator(Grid_MPI_Comm comm) { int rank, size; diff --git a/lib/communicator/SharedMemoryNone.cc b/lib/communicator/SharedMemoryNone.cc index efd9e585..928c0332 100644 --- a/lib/communicator/SharedMemoryNone.cc +++ b/lib/communicator/SharedMemoryNone.cc @@ -84,10 +84,10 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags) _ShmAlloc=1; }; - //////////////////////////////////////////////////////// - // Global shared functionality finished - // Now move to per communicator functionality - //////////////////////////////////////////////////////// +//////////////////////////////////////////////////////// +// Global shared functionality finished +// Now move to per communicator functionality +//////////////////////////////////////////////////////// void SharedMemory::SetCommunicator(Grid_MPI_Comm comm) { assert(GlobalSharedMemory::ShmAlloc()==1);