Three small classes to deal with data on/shared between different ranks.
DistributedDataLayout describes a 1D set of data partitioned over several ranks. Essentially it handles the window/slice indexing that is currently done in AllAtOnceSystem and also provides a method to test whether a global index is_local(). Used by the SharedArray and AllAtOnceSystem.
SharedArray is an array that every rank has a copy of, but each rank is only responsible for part of. Any rank can access any data in the array, but can only modify the data it owns.
SynchronisedArray (I don't like this name but I'm not sure what else to call it yet) is an array that is owned by one rank but every rank has a copy. Any rank can access the data, but only the owning rank can modify it.
Three small classes to deal with data on/shared between different ranks.
DistributedDataLayout
describes a 1D set of data partitioned over several ranks. Essentially it handles the window/slice indexing that is currently done inAllAtOnceSystem
and also provides a method to test whether a global indexis_local()
. Used by theSharedArray
andAllAtOnceSystem
.SharedArray
is an array that every rank has a copy of, but each rank is only responsible for part of. Any rank can access any data in the array, but can only modify the data it owns.SynchronisedArray
(I don't like this name but I'm not sure what else to call it yet) is an array that is owned by one rank but every rank has a copy. Any rank can access the data, but only the owning rank can modify it.