From d1be8bc5601fb62bb99594ecb0837f15c54c313b Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sat, 1 Apr 2017 04:47:35 +0200 Subject: [PATCH 01/10] Revert "fixed ambiguous ctor of BlockPattern" This reverts commit 3c5cd953edd75190e2f5b1315e47f00aa9a71019. --- dash/include/dash/pattern/BlockPattern.h | 72 ++++++++++++++++++++++ dash/include/dash/pattern/BlockPattern1D.h | 61 ++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/dash/include/dash/pattern/BlockPattern.h b/dash/include/dash/pattern/BlockPattern.h index fda2620fe..20954e3f7 100644 --- a/dash/include/dash/pattern/BlockPattern.h +++ b/dash/include/dash/pattern/BlockPattern.h @@ -288,6 +288,78 @@ class BlockPattern DASH_LOG_TRACE("BlockPattern()", "BlockPattern initialized"); } + /** + * Constructor, initializes a pattern from explicit instances of + * \c SizeSpec, \c DistributionSpec and a \c Team. + * + * Examples: + * + * \code + * // A 5x3 rectangle with blocked distribution in the first dimension + * Pattern p1(SizeSpec<2>(5,3), + * DistributionSpec<2>(BLOCKED, NONE), + * // The team containing the units to which the pattern + * // maps the global indices. Defaults to all all units: + * dash::Team::All()); + * // Same as + * Pattern p1(SizeSpec<2>(5,3), + * DistributionSpec<2>(BLOCKED, NONE), + * // How teams are arranged in all dimensions, default is + * // an extent of all units in first, and 1 in all higher + * // dimensions: + * TeamSpec<2>(dash::Team::All(), 1), + * // The team containing the units to which the pattern + * // maps the global indices. Defaults to all all units: + * dash::Team::All()); + * // Same as + * Pattern p1(5,3, BLOCKED); + * // Same as + * Pattern p1(SizeSpec<2>(5,3), + * DistributionSpec<2>(BLOCKED, NONE)); + * // Same as + * Pattern p1(SizeSpec<2>(5,3), + * DistributionSpec<2>(BLOCKED, NONE), + * TeamSpec<2>(dash::Team::All(), 1)); + * \endcode + */ + BlockPattern( + /// Pattern size (extent, number of elements) in every dimension + const SizeSpec_t & sizespec, + /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of + /// all dimensions. Defaults to BLOCKED in first, and NONE in higher + /// dimensions + const DistributionSpec_t & dist = DistributionSpec_t(), + /// Team containing units to which this pattern maps its elements + Team & team = dash::Team::All()) + : _distspec(dist), + _team(&team), + _teamspec(_distspec, *_team), + _nunits(_teamspec.size()), + _memory_layout(sizespec.extents()), + _blocksize_spec(initialize_blocksizespec( + sizespec, + _distspec, + _teamspec)), + _blockspec(initialize_blockspec( + sizespec, + _distspec, + _blocksize_spec, + _teamspec)), + _local_memory_layout( + initialize_local_extents(_team->myid())), + _local_blockspec(initialize_local_blockspec( + _blockspec, + _blocksize_spec, + _distspec, + _teamspec, + _local_memory_layout)), + _local_capacity(initialize_local_capacity()) + { + DASH_LOG_TRACE("BlockPattern()", "(sizespec, dist, team)"); + initialize_local_range(); + DASH_LOG_TRACE("BlockPattern()", "BlockPattern initialized"); + } + /** * Copy constructor. */ diff --git a/dash/include/dash/pattern/BlockPattern1D.h b/dash/include/dash/pattern/BlockPattern1D.h index 83116acb6..3def037cc 100644 --- a/dash/include/dash/pattern/BlockPattern1D.h +++ b/dash/include/dash/pattern/BlockPattern1D.h @@ -258,6 +258,67 @@ class BlockPattern<1, Arrangement, IndexType> _lbegin_lend(initialize_local_range(_local_size)) { } + /** + * Constructor, initializes a pattern from explicit instances of + * \c SizeSpec, \c DistributionSpec, \c TeamSpec and a \c Team. + * + * Examples: + * + * \code + * // 500 elements with blocked distribution: + * Pattern p1(SizeSpec<1>(500), + * DistributionSpec<1>(BLOCKED), + * TeamSpec<1>(dash::Team::All()), + * // The team containing the units to which the pattern + * // maps the global indices. Defaults to all all units: + * dash::Team::All()); + * // Same as + * Pattern p1(500, BLOCKED); + * // Same as + * Pattern p1(SizeSpec<1>(500), + * DistributionSpec<1>(BLOCKED)); + * // Same as + * Pattern p1(SizeSpec<1>(500), + * DistributionSpec<1>(BLOCKED), + * TeamSpec<1>(dash::Team::All())); + * \endcode + */ + BlockPattern( + /// Pattern size (extent, number of elements) in every dimension + const SizeSpec_t sizespec, + /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of + /// all dimensions. Defaults to BLOCKED in first, and NONE in higher + /// dimensions + const DistributionSpec_t dist = DistributionSpec_t(), + /// Team containing units to which this pattern maps its elements + Team & team = dash::Team::All()) + : _size(sizespec.size()), + _memory_layout(std::array {{ _size }}), + _distspec(dist), + _team(&team), + _teamspec(_distspec, *_team), + _nunits(_team->size()), + _blocksize(initialize_blocksize( + _size, + _distspec, + _nunits)), + _nblocks(initialize_num_blocks( + _size, + _blocksize, + _nunits)), + _local_size( + initialize_local_extent(_team->myid())), + _local_memory_layout(std::array {{ _local_size }}), + _nlblocks(initialize_num_local_blocks( + _nblocks, + _blocksize, + _distspec, + _nunits, + _local_size)), + _local_capacity(initialize_local_capacity()), + _lbegin_lend(initialize_local_range(_local_size)) + { } + /** * Move constructor. */ From 51a11a68bd2bce52197cba15e979a7b6192b2ee4 Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sat, 1 Apr 2017 04:58:28 +0200 Subject: [PATCH 02/10] removed default parameters to solve ambiguous ctors of BlockPattern --- dash/include/dash/pattern/BlockPattern.h | 7 +++---- dash/include/dash/pattern/BlockPattern1D.h | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dash/include/dash/pattern/BlockPattern.h b/dash/include/dash/pattern/BlockPattern.h index 20954e3f7..c8c2c282f 100644 --- a/dash/include/dash/pattern/BlockPattern.h +++ b/dash/include/dash/pattern/BlockPattern.h @@ -249,11 +249,10 @@ class BlockPattern /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t & sizespec, /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of - /// all dimensions. Defaults to BLOCKED in first, and NONE in higher - /// dimensions - const DistributionSpec_t & dist = DistributionSpec_t(), + /// all dimensions. + const DistributionSpec_t & dist, /// Cartesian arrangement of units within the team - const TeamSpec_t & teamspec = TeamSpec_t::TeamSpec(), + const TeamSpec_t & teamspec, /// Team containing units to which this pattern maps its elements dash::Team & team = dash::Team::All()) : _distspec(dist), diff --git a/dash/include/dash/pattern/BlockPattern1D.h b/dash/include/dash/pattern/BlockPattern1D.h index 3def037cc..37b737399 100644 --- a/dash/include/dash/pattern/BlockPattern1D.h +++ b/dash/include/dash/pattern/BlockPattern1D.h @@ -222,10 +222,9 @@ class BlockPattern<1, Arrangement, IndexType> /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t sizespec, /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC or NONE). - /// Defaults to BLOCKED. - const DistributionSpec_t dist = DistributionSpec_t(), + const DistributionSpec_t dist, /// Cartesian arrangement of units within the team - const TeamSpec_t teamspec = TeamSpec_t::TeamSpec(), + const TeamSpec_t teamspec, /// Team containing units to which this pattern maps its elements dash::Team & team = dash::Team::All()) : _size(sizespec.size()), From a69fe6cf1c0b68c1a2bf516d9cf04affca6af887 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Sat, 1 Apr 2017 10:29:23 +0200 Subject: [PATCH 03/10] Check for the correct team in a global array --- dash/test/container/ArrayTest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/test/container/ArrayTest.cc b/dash/test/container/ArrayTest.cc index 56885652d..4b32c73eb 100644 --- a/dash/test/container/ArrayTest.cc +++ b/dash/test/container/ArrayTest.cc @@ -222,6 +222,7 @@ TEST_F(ArrayTest, TeamSplit) LOG_MESSAGE("... Team split finished"); dash::Array array_a(ext_x, myteam); + ASSERT_EQ_U(array_a.team(), myteam); array_a.barrier(); // Check if array is allocated From f013b1680109ed2643602f277f4993566d7cb9b4 Mon Sep 17 00:00:00 2001 From: Felix Moessbauer Date: Thu, 30 Mar 2017 20:01:46 +0200 Subject: [PATCH 04/10] concept fixes in CSRPattern --- dash/include/dash/pattern/CSRPattern.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dash/include/dash/pattern/CSRPattern.h b/dash/include/dash/pattern/CSRPattern.h index c600f5d4b..23c0437da 100644 --- a/dash/include/dash/pattern/CSRPattern.h +++ b/dash/include/dash/pattern/CSRPattern.h @@ -565,7 +565,23 @@ class CSRPattern<1, Arrangement, IndexType> "Expected dimension = 0, got " << dim); return _local_size; } - + + /** + * The actual number of elements in this pattern that are local to the + * calling unit, by dimension. + * + * \see local_extent() + * \see blocksize() + * \see local_size() + * \see extent() + * + * \see DashPatternConcept + */ + constexpr std::array + local_extents() const noexcept + { + return std::array {{ _local_sizes[_team->myid()] }}; + } /** * The actual number of elements in this pattern that are local to the * given unit, by dimension. @@ -1047,7 +1063,7 @@ class CSRPattern<1, Arrangement, IndexType> * * \see DashPatternConcept */ - constexpr const std::array & + constexpr const std::array extents() const noexcept { return std::array {{ _size }}; From f4acaad1e00e155952e4d9e5eef63eac6956c5ca Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sat, 1 Apr 2017 14:06:52 +0200 Subject: [PATCH 05/10] Added ctor to CSRPattern for compatibility to other patterns --- dash/include/dash/pattern/CSRPattern.h | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/dash/include/dash/pattern/CSRPattern.h b/dash/include/dash/pattern/CSRPattern.h index 23c0437da..5a2099899 100644 --- a/dash/include/dash/pattern/CSRPattern.h +++ b/dash/include/dash/pattern/CSRPattern.h @@ -201,6 +201,54 @@ class CSRPattern<1, Arrangement, IndexType> DASH_LOG_TRACE("CSRPattern()", "CSRPattern initialized"); } + /** + * Constructor, initializes a pattern from explicit instances of + * \c SizeSpec, \c DistributionSpec, \c TeamSpec and \c Team. + * + */ + CSRPattern( + /// Size spec of the pattern. + const SizeSpec_t & sizespec, + /// Distribution spec. + const DistributionSpec_t & distspec, + /// Cartesian arrangement of units within the team + const TeamSpec_t & teamspec, + /// Team containing units to which this pattern maps its elements. + Team & team = dash::Team::All()) + : _size(sizespec.size()), + _local_sizes(initialize_local_sizes( + _size, + distspec, + team)), + _block_offsets(initialize_block_offsets( + _local_sizes)), + _memory_layout(std::array {{ _size }}), + _blockspec(initialize_blockspec( + _size, + _local_sizes)), + _distspec(DistributionSpec_t()), + _team(&team), + _teamspec( + teamspec, + _distspec, + *_team), + _nunits(_team->size()), + _local_size( + initialize_local_extent( + _team->myid(), + _local_sizes)), + _local_memory_layout(std::array {{ _local_size }}), + _local_capacity(initialize_local_capacity(_local_sizes)) + { + DASH_LOG_TRACE("CSRPattern()", "(sizespec, dist, team)"); + DASH_ASSERT_EQ( + _local_sizes.size(), _nunits, + "Number of given local sizes " << _local_sizes.size() << " " << + "does not match number of units" << _nunits); + initialize_local_range(); + DASH_LOG_TRACE("CSRPattern()", "CSRPattern initialized"); + } + /** * Constructor, initializes a pattern from explicit instances of * \c SizeSpec, \c DistributionSpec and \c Team. From c974159ff4c052e33b82135b078be382b5aef926 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Sat, 1 Apr 2017 19:14:24 +0200 Subject: [PATCH 06/10] Make PatternArguments temporary to reduce pattern memory footprint --- dash/include/dash/pattern/BlockPattern.h | 53 ++++++----- dash/include/dash/pattern/BlockPattern1D.h | 59 ++++++------ dash/include/dash/pattern/CSRPattern.h | 77 +++++++--------- dash/include/dash/pattern/DynamicPattern.h | 91 +++++++++---------- .../include/dash/pattern/LoadBalancePattern.h | 1 - dash/include/dash/pattern/SeqTilePattern.h | 54 ++++++----- dash/include/dash/pattern/ShiftTilePattern.h | 54 +++++------ .../include/dash/pattern/ShiftTilePattern1D.h | 56 ++++++------ dash/include/dash/pattern/TilePattern.h | 53 ++++++----- dash/include/dash/pattern/TilePattern1D.h | 56 ++++++------ 10 files changed, 279 insertions(+), 275 deletions(-) diff --git a/dash/include/dash/pattern/BlockPattern.h b/dash/include/dash/pattern/BlockPattern.h index c8c2c282f..a6f80a4cd 100644 --- a/dash/include/dash/pattern/BlockPattern.h +++ b/dash/include/dash/pattern/BlockPattern.h @@ -108,7 +108,6 @@ class BlockPattern } local_coords_t; private: - PatternArguments_t _arguments; /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of /// all dimensions. Defaults to BLOCKED in first, and NONE in higher /// dimensions @@ -187,30 +186,7 @@ class BlockPattern /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _teamspec(_arguments.teamspec()), - _nunits(_teamspec.size()), - _memory_layout(_arguments.sizespec().extents()), - _blocksize_spec(initialize_blocksizespec( - _arguments.sizespec(), - _distspec, - _teamspec)), - _blockspec(initialize_blockspec( - _arguments.sizespec(), - _distspec, - _blocksize_spec, - _teamspec)), - _local_memory_layout( - initialize_local_extents(_team->myid())), - _local_blockspec(initialize_local_blockspec( - _blockspec, - _blocksize_spec, - _distspec, - _teamspec, - _local_memory_layout)), - _local_capacity(initialize_local_capacity()) + : BlockPattern(PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("BlockPattern()", "Constructor with argument list"); initialize_local_range(); @@ -1425,6 +1401,33 @@ class BlockPattern } private: + + BlockPattern(const PatternArguments_t & arguments) + : _distspec(arguments.distspec()), + _team(&arguments.team()), + _teamspec(arguments.teamspec()), + _nunits(_teamspec.size()), + _memory_layout(arguments.sizespec().extents()), + _blocksize_spec(initialize_blocksizespec( + arguments.sizespec(), + _distspec, + _teamspec)), + _blockspec(initialize_blockspec( + arguments.sizespec(), + _distspec, + _blocksize_spec, + _teamspec)), + _local_memory_layout( + initialize_local_extents(_team->myid())), + _local_blockspec(initialize_local_blockspec( + _blockspec, + _blocksize_spec, + _distspec, + _teamspec, + _local_memory_layout)), + _local_capacity(initialize_local_capacity()) + {} + /** * Initialize block size specs from memory layout, team spec and * distribution spec. diff --git a/dash/include/dash/pattern/BlockPattern1D.h b/dash/include/dash/pattern/BlockPattern1D.h index 37b737399..ebc21a439 100644 --- a/dash/include/dash/pattern/BlockPattern1D.h +++ b/dash/include/dash/pattern/BlockPattern1D.h @@ -102,7 +102,6 @@ class BlockPattern<1, Arrangement, IndexType> } local_coords_t; private: - PatternArguments_t _arguments; /// Extent of the linear pattern. SizeType _size = 0; /// Global memory layout of the pattern. @@ -156,7 +155,7 @@ class BlockPattern<1, Arrangement, IndexType> * \endcode */ template - constexpr BlockPattern( + BlockPattern( /// Argument list consisting of the pattern size (extent, number of /// elements) in every dimension followed by optional distribution /// types. @@ -165,32 +164,7 @@ class BlockPattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _memory_layout(std::array {{ _size }}), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _blocksize(initialize_blocksize( - _size, - _distspec, - _nunits)), - _nblocks(initialize_num_blocks( - _size, - _blocksize, - _nunits)), - _local_size( - initialize_local_extent(_team->myid())), - _local_memory_layout(std::array {{ _local_size }}), - _nlblocks(initialize_num_local_blocks( - _nblocks, - _blocksize, - _distspec, - _nunits, - _local_size)), - _local_capacity(initialize_local_capacity()), - _lbegin_lend(initialize_local_range(_local_size)) + : BlockPattern(PatternArguments_t(arg, args...)) { } /** @@ -1128,6 +1102,35 @@ class BlockPattern<1, Arrangement, IndexType> } private: + + BlockPattern(const PatternArguments_t & arguments) + : _size(arguments.sizespec().size()), + _memory_layout(std::array {{ _size }}), + _distspec(arguments.distspec()), + _team(&arguments.team()), + _teamspec(arguments.teamspec()), + _nunits(_team->size()), + _blocksize(initialize_blocksize( + _size, + _distspec, + _nunits)), + _nblocks(initialize_num_blocks( + _size, + _blocksize, + _nunits)), + _local_size( + initialize_local_extent(_team->myid())), + _local_memory_layout(std::array {{ _local_size }}), + _nlblocks(initialize_num_local_blocks( + _nblocks, + _blocksize, + _distspec, + _nunits, + _local_size)), + _local_capacity(initialize_local_capacity()), + _lbegin_lend(initialize_local_range(_local_size)) + {} + /** * Initialize block size specs from memory layout, team spec and * distribution spec. diff --git a/dash/include/dash/pattern/CSRPattern.h b/dash/include/dash/pattern/CSRPattern.h index 5a2099899..46935f11b 100644 --- a/dash/include/dash/pattern/CSRPattern.h +++ b/dash/include/dash/pattern/CSRPattern.h @@ -121,7 +121,6 @@ class CSRPattern<1, Arrangement, IndexType> } local_coords_t; private: - PatternArguments_t _arguments; /// Extent of the linear pattern. SizeType _size = 0; /// Number of local elements for every unit in the active team. @@ -169,28 +168,7 @@ class CSRPattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _local_sizes(initialize_local_sizes( - _size, - _arguments.distspec(), - _arguments.team())), - _block_offsets(initialize_block_offsets( - _local_sizes)), - _memory_layout(std::array {{ _size }}), - _blockspec(initialize_blockspec( - _size, - _local_sizes)), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _local_size( - initialize_local_extent( - _team->myid(), - _local_sizes)), - _local_memory_layout(std::array {{ _local_size }}), - _local_capacity(initialize_local_capacity(_local_sizes)) + : CSRPattern(PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("CSRPattern()", "Constructor with argument list"); DASH_ASSERT_EQ( @@ -310,25 +288,7 @@ class CSRPattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _local_sizes(local_sizes), - _block_offsets(initialize_block_offsets( - _local_sizes)), - _memory_layout(std::array {{ _size }}), - _blockspec(initialize_blockspec( - _size, - _local_sizes)), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _local_size( - initialize_local_extent( - _team->myid(), - _local_sizes)), - _local_memory_layout(std::array {{ _local_size }}), - _local_capacity(initialize_local_capacity(_local_sizes)) + : CSRPattern(local_sizes, PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("CSRPattern()", "Constructor with argument list"); DASH_ASSERT_EQ( @@ -1180,6 +1140,39 @@ class CSRPattern<1, Arrangement, IndexType> private: + CSRPattern( + const PatternArguments_t & arguments) + : CSRPattern( + initialize_local_sizes( + arguments.sizespec().size(), + arguments.distspec(), + arguments.team()), + arguments) + {} + + CSRPattern( + const std::vector & local_sizes, + const PatternArguments_t & arguments) + : _size(arguments.sizespec().size()), + _local_sizes(local_sizes), + _block_offsets(initialize_block_offsets( + _local_sizes)), + _memory_layout(std::array {{ _size }}), + _blockspec(initialize_blockspec( + _size, + _local_sizes)), + _distspec(arguments.distspec()), + _team(&arguments.team()), + _teamspec(arguments.teamspec()), + _nunits(_team->size()), + _local_size( + initialize_local_extent( + _team->myid(), + _local_sizes)), + _local_memory_layout(std::array {{ _local_size }}), + _local_capacity(initialize_local_capacity(_local_sizes)) + {} + /** * Initialize the size (number of mapped elements) of the Pattern. */ diff --git a/dash/include/dash/pattern/DynamicPattern.h b/dash/include/dash/pattern/DynamicPattern.h index 292912c8d..5d2d244c6 100644 --- a/dash/include/dash/pattern/DynamicPattern.h +++ b/dash/include/dash/pattern/DynamicPattern.h @@ -134,32 +134,8 @@ class DynamicPattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _local_sizes(initialize_local_sizes( - _size, - _arguments.distspec(), - _arguments.team())), - _block_offsets(initialize_block_offsets( - _local_sizes)), - _memory_layout(std::array { _size }), - _blockspec(initialize_blockspec( - _size, - _local_sizes)), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _myid(_team->myid()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _blocksize(initialize_blocksize( - _size, - _distspec, - _nunits)), - _nblocks(_nunits), - _local_size( - initialize_local_extent(_team->myid())), - _local_memory_layout(std::array { _local_size }), - _local_capacity(initialize_local_capacity()) + : DynamicPattern(PatternArguments_t(arg, args...)) + { DASH_LOG_TRACE("DynamicPattern()", "Constructor with argument list"); DASH_ASSERT_EQ( @@ -235,29 +211,7 @@ class DynamicPattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _local_sizes(local_sizes), - _block_offsets(initialize_block_offsets( - _local_sizes)), - _memory_layout(std::array { _size }), - _blockspec(initialize_blockspec( - _size, - _local_sizes)), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _myid(_team->myid()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _blocksize(initialize_blocksize( - _size, - _distspec, - _nunits)), - _nblocks(_nunits), - _local_size( - initialize_local_extent(_team->myid())), - _local_memory_layout(std::array { _local_size }), - _local_capacity(initialize_local_capacity()) + : DynamicPattern(local_sizes, PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("DynamicPattern()", "Constructor with argument list"); DASH_ASSERT_EQ( @@ -1252,6 +1206,44 @@ class DynamicPattern<1, Arrangement, IndexType> } private: + + + DynamicPattern(const PatternArguments_t & arguments) + : DynamicPattern( + initialize_local_sizes( + arguments.sizespec().size(), + arguments.distspec(), + arguments.team()), + arguments) + {} + + DynamicPattern( + const std::vector & local_sizes, + const PatternArguments_t & arguments) + : _size(arguments.sizespec().size()), + _local_sizes(local_sizes), + _block_offsets(initialize_block_offsets( + _local_sizes)), + _memory_layout(std::array { _size }), + _blockspec(initialize_blockspec( + _size, + _local_sizes)), + _distspec(arguments.distspec()), + _team(&arguments.team()), + _myid(_team->myid()), + _teamspec(arguments.teamspec()), + _nunits(_team->size()), + _blocksize(initialize_blocksize( + _size, + _distspec, + _nunits)), + _nblocks(_nunits), + _local_size( + initialize_local_extent(_team->myid())), + _local_memory_layout(std::array { _local_size }), + _local_capacity(initialize_local_capacity()) + {} + /** * Initialize the size (number of mapped elements) of the Pattern. */ @@ -1451,7 +1443,6 @@ class DynamicPattern<1, Arrangement, IndexType> } private: - PatternArguments_t _arguments; /// Extent of the linear pattern. SizeType _size; /// Number of local elements for every unit in the active team. diff --git a/dash/include/dash/pattern/LoadBalancePattern.h b/dash/include/dash/pattern/LoadBalancePattern.h index b7c008f89..ae5e679b7 100644 --- a/dash/include/dash/pattern/LoadBalancePattern.h +++ b/dash/include/dash/pattern/LoadBalancePattern.h @@ -1281,7 +1281,6 @@ class LoadBalancePattern< } private: - PatternArguments_t _arguments; /// Extent of the linear pattern. SizeType _size; /// Load balance weight by CPU capacity of every unit in the team. diff --git a/dash/include/dash/pattern/SeqTilePattern.h b/dash/include/dash/pattern/SeqTilePattern.h index 4f48346b5..7b84ebfa6 100644 --- a/dash/include/dash/pattern/SeqTilePattern.h +++ b/dash/include/dash/pattern/SeqTilePattern.h @@ -119,7 +119,6 @@ class SeqTilePattern } local_coords_t; private: - PatternArguments_t _arguments; /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of /// all dimensions. Defaults to BLOCKED in first, and NONE in higher /// dimensions @@ -197,30 +196,8 @@ class SeqTilePattern /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _myid(_team->myid()), - _teamspec(_arguments.teamspec()), - _memory_layout(_arguments.sizespec().extents()), - _nunits(_teamspec.size()), - _blocksize_spec(initialize_blocksizespec( - _arguments.sizespec(), - _distspec, - _teamspec)), - _blockspec(initialize_blockspec( - _arguments.sizespec(), - _distspec, - _blocksize_spec, - _teamspec)), - _local_blockspec(initialize_local_blockspec( - _blockspec, - _blocksize_spec, - _teamspec)), - _local_memory_layout( - initialize_local_extents(_myid)), - _local_capacity( - initialize_local_capacity(_local_memory_layout)) { + : SeqTilePattern(PatternArguments_t(arg, args...)) + { DASH_LOG_TRACE("SeqTilePattern()", "Constructor with Argument list"); initialize_local_range(); } @@ -1495,6 +1472,33 @@ class SeqTilePattern } private: + + SeqTilePattern(const PatternArguments_t & arguments) + : _distspec(arguments.distspec()), + _team(&arguments.team()), + _myid(_team->myid()), + _teamspec(arguments.teamspec()), + _memory_layout(arguments.sizespec().extents()), + _nunits(_teamspec.size()), + _blocksize_spec(initialize_blocksizespec( + arguments.sizespec(), + _distspec, + _teamspec)), + _blockspec(initialize_blockspec( + arguments.sizespec(), + _distspec, + _blocksize_spec, + _teamspec)), + _local_blockspec(initialize_local_blockspec( + _blockspec, + _blocksize_spec, + _teamspec)), + _local_memory_layout( + initialize_local_extents(_myid)), + _local_capacity( + initialize_local_capacity(_local_memory_layout)) + {} + /** * Initialize block size specs from memory layout, team spec and * distribution spec. diff --git a/dash/include/dash/pattern/ShiftTilePattern.h b/dash/include/dash/pattern/ShiftTilePattern.h index 534a2ec26..28c27cc66 100644 --- a/dash/include/dash/pattern/ShiftTilePattern.h +++ b/dash/include/dash/pattern/ShiftTilePattern.h @@ -113,7 +113,6 @@ class ShiftTilePattern } local_coords_t; private: - PatternArguments_t _arguments; /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of /// all dimensions. Defaults to BLOCKED in first, and NONE in higher /// dimensions @@ -195,32 +194,7 @@ class ShiftTilePattern /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - // Degrading to 1-dimensional team spec for now: -// _teamspec(_distspec, *_team), - _teamspec(_arguments.teamspec()), - _memory_layout(_arguments.sizespec().extents()), - _nunits(_teamspec.size()), - _major_tiled_dim(initialize_major_tiled_dim(_distspec)), - _minor_tiled_dim((_major_tiled_dim + 1) % NumDimensions), - _blocksize_spec(initialize_blocksizespec( - _arguments.sizespec(), - _distspec, - _teamspec)), - _blockspec(initialize_blockspec( - _arguments.sizespec(), - _distspec, - _blocksize_spec, - _teamspec)), - _local_blockspec(initialize_local_blockspec( - _blockspec, - _major_tiled_dim, - _nunits)), - _local_memory_layout( - initialize_local_extents(_team->myid())), - _local_capacity(initialize_local_capacity()) { + : ShiftTilePattern(PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("ShiftTilePattern()", "Constructor with Argument list"); initialize_local_range(); } @@ -1470,6 +1444,32 @@ class ShiftTilePattern } private: + + ShiftTilePattern(const PatternArguments_t & arguments) + : _distspec(arguments.distspec()), + _team(&arguments.team()), + _teamspec(arguments.teamspec()), + _memory_layout(arguments.sizespec().extents()), + _nunits(_teamspec.size()), + _major_tiled_dim(initialize_major_tiled_dim(_distspec)), + _minor_tiled_dim((_major_tiled_dim + 1) % NumDimensions), + _blocksize_spec(initialize_blocksizespec( + arguments.sizespec(), + _distspec, + _teamspec)), + _blockspec(initialize_blockspec( + arguments.sizespec(), + _distspec, + _blocksize_spec, + _teamspec)), + _local_blockspec(initialize_local_blockspec( + _blockspec, + _major_tiled_dim, + _nunits)), + _local_memory_layout( + initialize_local_extents(_team->myid())), + _local_capacity(initialize_local_capacity()) + {} /** * Initialize block size specs from memory layout, team spec and * distribution spec. diff --git a/dash/include/dash/pattern/ShiftTilePattern1D.h b/dash/include/dash/pattern/ShiftTilePattern1D.h index 92a96ac58..68fb21d75 100644 --- a/dash/include/dash/pattern/ShiftTilePattern1D.h +++ b/dash/include/dash/pattern/ShiftTilePattern1D.h @@ -106,7 +106,6 @@ class ShiftTilePattern<1, Arrangement, IndexType> } local_coords_t; private: - PatternArguments_t _arguments; /// Extent of the linear pattern. SizeType _size; /// Global memory layout of the pattern. @@ -167,31 +166,7 @@ class ShiftTilePattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _memory_layout(std::array { _size }), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _blocksize(initialize_blocksize( - _size, - _distspec, - _nunits)), - _nblocks(initialize_num_blocks( - _size, - _blocksize, - _nunits)), - _local_size( - initialize_local_extent(_team->myid())), - _local_memory_layout(std::array { _local_size }), - _nlblocks(initialize_num_local_blocks( - _nblocks, - _blocksize, - _distspec, - _nunits, - _local_size)), - _local_capacity(initialize_local_capacity()) { + : ShiftTilePattern(PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("ShiftTilePattern<1>()", "Constructor with argument list"); initialize_local_range(); DASH_LOG_TRACE("ShiftTilePattern<1>()", "ShiftTilePattern initialized"); @@ -1107,6 +1082,35 @@ class ShiftTilePattern<1, Arrangement, IndexType> return 1; } +private: + + ShiftTilePattern(const PatternArguments_t &arguments) + : _size(arguments.sizespec().size()), + _memory_layout(std::array { _size }), + _distspec(arguments.distspec()), + _team(&arguments.team()), + _teamspec(arguments.teamspec()), + _nunits(_team->size()), + _blocksize(initialize_blocksize( + _size, + _distspec, + _nunits)), + _nblocks(initialize_num_blocks( + _size, + _blocksize, + _nunits)), + _local_size( + initialize_local_extent(_team->myid())), + _local_memory_layout(std::array { _local_size }), + _nlblocks(initialize_num_local_blocks( + _nblocks, + _blocksize, + _distspec, + _nunits, + _local_size)), + _local_capacity(initialize_local_capacity()) + {} + /** * Initialize block size specs from memory layout, team spec and * distribution spec. diff --git a/dash/include/dash/pattern/TilePattern.h b/dash/include/dash/pattern/TilePattern.h index 78282c1c8..3a9bb6380 100644 --- a/dash/include/dash/pattern/TilePattern.h +++ b/dash/include/dash/pattern/TilePattern.h @@ -114,7 +114,6 @@ class TilePattern } local_coords_t; private: - PatternArguments_t _arguments; /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of /// all dimensions. Defaults to BLOCKED in first, and NONE in higher /// dimensions @@ -192,30 +191,7 @@ class TilePattern /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _myid(_team->myid()), - _teamspec(_arguments.teamspec()), - _memory_layout(_arguments.sizespec().extents()), - _nunits(_teamspec.size()), - _blocksize_spec(initialize_blocksizespec( - _arguments.sizespec(), - _distspec, - _teamspec)), - _blockspec(initialize_blockspec( - _arguments.sizespec(), - _distspec, - _blocksize_spec, - _teamspec)), - _local_blockspec(initialize_local_blockspec( - _blockspec, - _blocksize_spec, - _teamspec)), - _local_memory_layout( - initialize_local_extents(_myid)), - _local_capacity( - initialize_local_capacity(_local_memory_layout)) + : TilePattern(PatternArguments_t(arg, args...)) { DASH_LOG_TRACE("TilePattern()", "Constructor with Argument list"); initialize_local_range(); @@ -1521,6 +1497,33 @@ class TilePattern } private: + + TilePattern(const PatternArguments_t & arguments) + : _distspec(arguments.distspec()), + _team(&arguments.team()), + _myid(_team->myid()), + _teamspec(arguments.teamspec()), + _memory_layout(arguments.sizespec().extents()), + _nunits(_teamspec.size()), + _blocksize_spec(initialize_blocksizespec( + arguments.sizespec(), + _distspec, + _teamspec)), + _blockspec(initialize_blockspec( + arguments.sizespec(), + _distspec, + _blocksize_spec, + _teamspec)), + _local_blockspec(initialize_local_blockspec( + _blockspec, + _blocksize_spec, + _teamspec)), + _local_memory_layout( + initialize_local_extents(_myid)), + _local_capacity( + initialize_local_capacity(_local_memory_layout)) + {} + /** * Initialize block size specs from memory layout, team spec and * distribution spec. diff --git a/dash/include/dash/pattern/TilePattern1D.h b/dash/include/dash/pattern/TilePattern1D.h index 79ee429ff..eaef59708 100644 --- a/dash/include/dash/pattern/TilePattern1D.h +++ b/dash/include/dash/pattern/TilePattern1D.h @@ -104,7 +104,6 @@ class TilePattern<1, Arrangement, IndexType> } local_coords_t; private: - PatternArguments_t _arguments; /// Extent of the linear pattern. SizeType _size; /// Global memory layout of the pattern. @@ -165,31 +164,8 @@ class TilePattern<1, Arrangement, IndexType> /// elements) in every dimension followed by optional distribution /// types. Args && ... args) - : _arguments(arg, args...), - _size(_arguments.sizespec().size()), - _memory_layout(std::array {{ _size }}), - _distspec(_arguments.distspec()), - _team(&_arguments.team()), - _teamspec(_arguments.teamspec()), - _nunits(_team->size()), - _blocksize(initialize_blocksize( - _size, - _distspec, - _nunits)), - _nblocks(initialize_num_blocks( - _size, - _blocksize, - _nunits)), - _local_size( - initialize_local_extent(_team->myid())), - _local_memory_layout(std::array {{ _local_size }}), - _nlblocks(initialize_num_local_blocks( - _nblocks, - _blocksize, - _distspec, - _nunits, - _local_size)), - _local_capacity(initialize_local_capacity()) { + : TilePattern(PatternArguments_t(arg, args...)) + { DASH_LOG_TRACE("TilePattern<1>()", "Constructor with argument list"); initialize_local_range(); DASH_LOG_TRACE("TilePattern<1>()", "TilePattern initialized"); @@ -1055,6 +1031,34 @@ class TilePattern<1, Arrangement, IndexType> return 1; } +private: + TilePattern(const PatternArguments_t & arguments) + : _size(arguments.sizespec().size()), + _memory_layout(std::array {{ _size }}), + _distspec(arguments.distspec()), + _team(&arguments.team()), + _teamspec(arguments.teamspec()), + _nunits(_team->size()), + _blocksize(initialize_blocksize( + _size, + _distspec, + _nunits)), + _nblocks(initialize_num_blocks( + _size, + _blocksize, + _nunits)), + _local_size( + initialize_local_extent(_team->myid())), + _local_memory_layout(std::array {{ _local_size }}), + _nlblocks(initialize_num_local_blocks( + _nblocks, + _blocksize, + _distspec, + _nunits, + _local_size)), + _local_capacity(initialize_local_capacity()) + {} + /** * Initialize block size specs from memory layout, team spec and * distribution spec. From 3a9a16e81f358bb1cc5daacf76ea1696c2a5ea13 Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sun, 2 Apr 2017 15:16:23 +0200 Subject: [PATCH 07/10] Added ctor to DynamicPattern for compatibility to other patterns --- dash/include/dash/pattern/DynamicPattern.h | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/dash/include/dash/pattern/DynamicPattern.h b/dash/include/dash/pattern/DynamicPattern.h index 5d2d244c6..18b75e3d9 100644 --- a/dash/include/dash/pattern/DynamicPattern.h +++ b/dash/include/dash/pattern/DynamicPattern.h @@ -146,6 +146,58 @@ class DynamicPattern<1, Arrangement, IndexType> DASH_LOG_TRACE("DynamicPattern()", "DynamicPattern initialized"); } + /** + * Constructor, initializes a pattern from explicit instances of + * \c SizeSpec, \c DistributionSpec, \c TeamSpec and \c Team. + * + */ + DynamicPattern( + /// Size spec of the pattern. + const SizeSpec_t & sizespec, + /// Distribution spec. + const DistributionSpec_t & distspec, + /// Cartesian arrangement of units within the team + const TeamSpec_t & teamspec, + /// Team containing units to which this pattern maps its elements. + Team & team = dash::Team::All()) + : _size(sizespec.size()), + _local_sizes(initialize_local_sizes( + _size, + distspec, + team)), + _block_offsets(initialize_block_offsets( + _local_sizes)), + _memory_layout(std::array { _size }), + _blockspec(initialize_blockspec( + _size, + _local_sizes)), + _distspec(DistributionSpec_t()), + _team(&team), + _myid(_team->myid()), + _teamspec( + teamspec, + _distspec, + *_team), + _nunits(_team->size()), + _blocksize(initialize_blocksize( + _size, + _distspec, + _nunits)), + _nblocks(_nunits), + _local_size( + initialize_local_extent(_team->myid())), + _local_memory_layout(std::array { _local_size }), + _local_capacity(initialize_local_capacity()) + { + DASH_LOG_TRACE("DynamicPattern()", "(sizespec, dist, team)"); + DASH_ASSERT_EQ( + _local_sizes.size(), _nunits, + "Number of given local sizes " << _local_sizes.size() << " " << + "does not match number of units" << _nunits); + initialize_local_range(); + DASH_LOG_TRACE("DynamicPattern()", "DynamicPattern initialized"); + } + /** * Constructor, initializes a pattern from explicit instances of * \c SizeSpec, \c DistributionSpec and \c Team. From 0ee1ffcad75118de968e99f0102132f775446eed Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sun, 2 Apr 2017 15:29:06 +0200 Subject: [PATCH 08/10] removed default parameters of ctor (ambiguity) of 1D versions of TilePatterns --- dash/include/dash/pattern/ShiftTilePattern1D.h | 5 ++--- dash/include/dash/pattern/TilePattern1D.h | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dash/include/dash/pattern/ShiftTilePattern1D.h b/dash/include/dash/pattern/ShiftTilePattern1D.h index 68fb21d75..407349546 100644 --- a/dash/include/dash/pattern/ShiftTilePattern1D.h +++ b/dash/include/dash/pattern/ShiftTilePattern1D.h @@ -201,10 +201,9 @@ class ShiftTilePattern<1, Arrangement, IndexType> /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t & sizespec, /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC or NONE). - /// Defaults to BLOCKED. - const DistributionSpec_t & dist = DistributionSpec_t(), + const DistributionSpec_t & dist, /// Cartesian arrangement of units within the team - const TeamSpec_t & teamspec = TeamSpec_t::TeamSpec(), + const TeamSpec_t & teamspec, /// Team containing units to which this pattern maps its elements dash::Team & team = dash::Team::All()) : _size(sizespec.size()), diff --git a/dash/include/dash/pattern/TilePattern1D.h b/dash/include/dash/pattern/TilePattern1D.h index eaef59708..b3974af16 100644 --- a/dash/include/dash/pattern/TilePattern1D.h +++ b/dash/include/dash/pattern/TilePattern1D.h @@ -200,10 +200,9 @@ class TilePattern<1, Arrangement, IndexType> /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t sizespec, /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC or NONE). - /// Defaults to BLOCKED. - const DistributionSpec_t dist = DistributionSpec_t(), + const DistributionSpec_t dist, /// Cartesian arrangement of units within the team - const TeamSpec_t teamspec = TeamSpec_t::TeamSpec(), + const TeamSpec_t teamspec, /// Team containing units to which this pattern maps its elements dash::Team & team = dash::Team::All()) : _size(sizespec.size()), From 4991ba3f2d0f9fe43859482230bbc79d6b968230 Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sun, 2 Apr 2017 15:34:25 +0200 Subject: [PATCH 09/10] minor adjustments in the documentation --- dash/include/dash/pattern/BlockPattern1D.h | 7 +++---- dash/include/dash/pattern/ShiftTilePattern1D.h | 7 +++---- dash/include/dash/pattern/TilePattern1D.h | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/dash/include/dash/pattern/BlockPattern1D.h b/dash/include/dash/pattern/BlockPattern1D.h index ebc21a439..593c5c5f8 100644 --- a/dash/include/dash/pattern/BlockPattern1D.h +++ b/dash/include/dash/pattern/BlockPattern1D.h @@ -233,7 +233,7 @@ class BlockPattern<1, Arrangement, IndexType> /** * Constructor, initializes a pattern from explicit instances of - * \c SizeSpec, \c DistributionSpec, \c TeamSpec and a \c Team. + * \c SizeSpec, \c DistributionSpec and a \c Team. * * Examples: * @@ -259,9 +259,8 @@ class BlockPattern<1, Arrangement, IndexType> BlockPattern( /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t sizespec, - /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of - /// all dimensions. Defaults to BLOCKED in first, and NONE in higher - /// dimensions + /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE). + /// Defaults to BLOCKED. const DistributionSpec_t dist = DistributionSpec_t(), /// Team containing units to which this pattern maps its elements Team & team = dash::Team::All()) diff --git a/dash/include/dash/pattern/ShiftTilePattern1D.h b/dash/include/dash/pattern/ShiftTilePattern1D.h index 407349546..96d31daf8 100644 --- a/dash/include/dash/pattern/ShiftTilePattern1D.h +++ b/dash/include/dash/pattern/ShiftTilePattern1D.h @@ -240,7 +240,7 @@ class ShiftTilePattern<1, Arrangement, IndexType> /** * Constructor, initializes a pattern from explicit instances of - * \c SizeSpec, \c DistributionSpec, \c TeamSpec and a \c Team. + * \c SizeSpec, \c DistributionSpec and a \c Team. * * Examples: * @@ -266,9 +266,8 @@ class ShiftTilePattern<1, Arrangement, IndexType> ShiftTilePattern( /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t & sizespec, - /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of - /// all dimensions. Defaults to BLOCKED in first, and NONE in higher - /// dimensions + /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE). + /// Defaults to BLOCKED in first. const DistributionSpec_t & dist = DistributionSpec_t(), /// Team containing units to which this pattern maps its elements Team & team = dash::Team::All()) diff --git a/dash/include/dash/pattern/TilePattern1D.h b/dash/include/dash/pattern/TilePattern1D.h index b3974af16..597d9f514 100644 --- a/dash/include/dash/pattern/TilePattern1D.h +++ b/dash/include/dash/pattern/TilePattern1D.h @@ -239,7 +239,7 @@ class TilePattern<1, Arrangement, IndexType> /** * Constructor, initializes a pattern from explicit instances of - * \c SizeSpec, \c DistributionSpec, \c TeamSpec and a \c Team. + * \c SizeSpec, \c DistributionSpec and a \c Team. * * Examples: * @@ -265,9 +265,8 @@ class TilePattern<1, Arrangement, IndexType> TilePattern( /// Pattern size (extent, number of elements) in every dimension const SizeSpec_t & sizespec, - /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of - /// all dimensions. Defaults to BLOCKED in first, and NONE in higher - /// dimensions + /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE). + /// Defaults to BLOCKED in first. const DistributionSpec_t & dist = DistributionSpec_t(), /// Team containing units to which this pattern maps its elements Team & team = dash::Team::All()) From c708583d13f6daa3afbf27f1acfe71e706db10f9 Mon Sep 17 00:00:00 2001 From: Daniel Diefenthaler Date: Sun, 2 Apr 2017 15:38:02 +0200 Subject: [PATCH 10/10] minor adjustment in the documentation --- dash/include/dash/pattern/ShiftTilePattern.h | 3 +-- dash/include/dash/pattern/TilePattern.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dash/include/dash/pattern/ShiftTilePattern.h b/dash/include/dash/pattern/ShiftTilePattern.h index 28c27cc66..a63460c49 100644 --- a/dash/include/dash/pattern/ShiftTilePattern.h +++ b/dash/include/dash/pattern/ShiftTilePattern.h @@ -236,8 +236,7 @@ class ShiftTilePattern /// ShiftTilePattern size (extent, number of elements) in every dimension const SizeSpec_t & sizespec, /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of - /// all dimensions. Defaults to BLOCKED in first, and NONE in higher - /// dimensions + /// all dimensions. const DistributionSpec_t & dist, /// Cartesian arrangement of units within the team const TeamSpec_t & teamspec, diff --git a/dash/include/dash/pattern/TilePattern.h b/dash/include/dash/pattern/TilePattern.h index 3a9bb6380..28f313fb7 100644 --- a/dash/include/dash/pattern/TilePattern.h +++ b/dash/include/dash/pattern/TilePattern.h @@ -234,8 +234,7 @@ class TilePattern /// TilePattern size (extent, number of elements) in every dimension const SizeSpec_t & sizespec, /// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of - /// all dimensions. Defaults to BLOCKED in first, and NONE in higher - /// dimensions + /// all dimensions. const DistributionSpec_t & dist, /// Cartesian arrangement of units within the team const TeamSpec_t & teamspec,