1 #ifndef DASH__PATTERN_PROPERTIES_H__ 2 #define DASH__PATTERN_PROPERTIES_H__ 4 #include <dash/Types.h> 157 pattern_layout_tag::type::blocked, Tags ...
163 pattern_layout_tag::type::blocked, Tags ...
175 pattern_layout_tag::type::canonical, Tags ...>
186 pattern_layout_tag::type::canonical, Tags ...
192 pattern_layout_tag::type::canonical, Tags ...
204 pattern_layout_tag::type::linear, Tags ...>
216 pattern_layout_tag::type::linear, Tags ...
314 static const bool balanced =
false;
317 static const bool unbalanced =
false;
320 static const bool neighbor =
false;
324 static const bool shifted =
false;
327 static const bool diagonal =
false;
331 static const bool multiple =
false;
335 static const bool cyclic =
false;
353 static const bool balanced;
359 pattern_mapping_tag::type::balanced, Tags ...
371 pattern_mapping_tag::type::unbalanced, Tags ...>
375 static const bool unbalanced;
381 pattern_mapping_tag::type::unbalanced, Tags ...
382 >::unbalanced =
true;
393 pattern_mapping_tag::type::neighbor, Tags ...>
397 static const bool neighbor;
403 pattern_mapping_tag::type::neighbor, Tags ...
415 pattern_mapping_tag::type::shifted, Tags ...>
420 static const bool shifted;
426 pattern_mapping_tag::type::shifted, Tags ...
438 pattern_mapping_tag::type::diagonal, Tags ...>
442 static const bool diagonal;
448 pattern_mapping_tag::type::diagonal, Tags ...
460 pattern_mapping_tag::type::multiple, Tags ...>
465 static const bool multiple;
471 pattern_mapping_tag::type::multiple, Tags ...
483 pattern_mapping_tag::type::cyclic, Tags ...>
488 static const bool cyclic;
494 pattern_mapping_tag::type::cyclic, Tags ...
562 static const bool rectangular =
false;
566 static const bool minimal =
false;
569 static const bool regular =
false;
572 static const bool balanced =
false;
575 static const bool unbalanced =
false;
578 static const bool ndimensional =
false;
581 static const bool dynamic =
false;
601 static const bool rectangular;
607 pattern_partitioning_tag::type::rectangular, Tags ...
608 >::rectangular =
true;
620 pattern_partitioning_tag::type::minimal, Tags ...>
625 static const bool minimal;
631 pattern_partitioning_tag::type::minimal, Tags ...
644 pattern_partitioning_tag::type::regular, Tags ...>
648 static const bool regular;
654 pattern_partitioning_tag::type::regular, Tags ...
667 pattern_partitioning_tag::type::balanced, Tags ...>
671 static const bool balanced;
677 pattern_partitioning_tag::type::balanced, Tags ...
690 pattern_partitioning_tag::type::unbalanced, Tags ...>
694 static const bool unbalanced;
700 pattern_partitioning_tag::type::unbalanced, Tags ...
701 >::unbalanced =
true;
713 pattern_partitioning_tag::type::ndimensional, Tags ...>
717 static const bool ndimensional;
723 pattern_partitioning_tag::type::ndimensional, Tags ...
724 >::ndimensional =
true;
736 pattern_partitioning_tag::type::dynamic, Tags ...>
740 static const bool dynamic;
746 pattern_partitioning_tag::type::dynamic, Tags ...
755 template<
typename PatternType>
758 typedef typename PatternType::partitioning_properties
762 template<
typename PatternType>
765 typedef typename PatternType::mapping_properties
769 template<
typename PatternType>
772 typedef typename PatternType::layout_properties
776 template<
typename PatternType>
779 typedef typename PatternType::index_type
781 typedef typename PatternType::size_type
784 typedef typename dash::pattern_partitioning_traits<PatternType>::type
786 typedef typename dash::pattern_mapping_traits<PatternType>::type
788 typedef typename dash::pattern_layout_traits<PatternType>::type
791 typedef typename std::decay<
792 decltype(std::declval<PatternType>().blockspec())
795 typedef typename std::decay<
796 decltype(std::declval<PatternType>().local_blockspec())
798 local_blockspec_type;
813 typename PartitioningConstraints,
814 typename MappingConstraints,
815 typename LayoutConstraints,
819 const PatternType & pattern)
822 typedef typename dash::pattern_traits< PatternType >::partitioning
825 typedef typename dash::pattern_traits< PatternType >::mapping
828 typedef typename dash::pattern_traits< PatternType >::layout
834 static_assert(!PartitioningConstraints::rectangular ||
835 partitioning_traits::rectangular,
836 "Pattern does not implement rectangular partitioning");
837 static_assert(!PartitioningConstraints::minimal ||
838 partitioning_traits::minimal,
839 "Pattern does not implement minimal partitioning");
840 static_assert(!PartitioningConstraints::regular ||
841 partitioning_traits::regular,
842 "Pattern does not implement regular partitioning");
843 static_assert(!PartitioningConstraints::balanced ||
844 partitioning_traits::balanced,
845 "Pattern does not implement balanced partitioning");
846 static_assert(!PartitioningConstraints::unbalanced ||
847 partitioning_traits::unbalanced,
848 "Pattern does not implement unbalanced partitioning");
851 static_assert(!MappingConstraints::balanced ||
852 mapping_traits::balanced,
853 "Pattern does not implement balanced mapping");
854 static_assert(!MappingConstraints::unbalanced ||
855 mapping_traits::unbalanced,
856 "Pattern does not implement unbalanced mapping");
857 static_assert(!MappingConstraints::neighbor ||
858 mapping_traits::neighbor,
859 "Pattern does not implement neighbor mapping");
860 static_assert(!MappingConstraints::shifted ||
861 mapping_traits::shifted,
862 "Pattern does not implement shifted mapping");
863 static_assert(!MappingConstraints::diagonal ||
864 mapping_traits::diagonal,
865 "Pattern does not implement diagonal mapping");
866 static_assert(!MappingConstraints::cyclic ||
867 mapping_traits::cyclic,
868 "Pattern does not implement cyclic mapping");
871 static_assert(!LayoutConstraints::blocked ||
872 layout_traits::blocked,
873 "Pattern does not implement blocked layout");
874 static_assert(!LayoutConstraints::canonical ||
875 layout_traits::canonical,
876 "Pattern does not implement canonical layout");
877 static_assert(!LayoutConstraints::linear ||
878 layout_traits::linear,
879 "Pattern does not implement linear layout");
892 typename PartitioningConstraints,
893 typename MappingConstraints,
894 typename LayoutConstraints,
900 typedef typename dash::pattern_traits< PatternType >::partitioning
903 typedef typename dash::pattern_traits< PatternType >::mapping
906 typedef typename dash::pattern_traits< PatternType >::layout
909 typedef std::integral_constant<
914 ( !PartitioningConstraints::rectangular ||
915 partitioning_traits::rectangular )
917 ( !PartitioningConstraints::minimal ||
918 partitioning_traits::minimal )
920 ( !PartitioningConstraints::regular ||
921 partitioning_traits::regular )
923 ( !PartitioningConstraints::balanced ||
924 partitioning_traits::balanced )
926 ( !PartitioningConstraints::unbalanced ||
927 partitioning_traits::unbalanced )
932 ( !MappingConstraints::balanced ||
933 mapping_traits::balanced )
935 ( !MappingConstraints::unbalanced ||
936 mapping_traits::unbalanced )
938 ( !MappingConstraints::neighbor ||
939 mapping_traits::neighbor )
941 ( !MappingConstraints::shifted ||
942 mapping_traits::shifted )
944 ( !MappingConstraints::diagonal ||
945 mapping_traits::diagonal )
947 ( !MappingConstraints::cyclic ||
948 mapping_traits::cyclic )
953 ( !LayoutConstraints::blocked ||
954 layout_traits::blocked )
956 ( !LayoutConstraints::canonical ||
957 layout_traits::canonical )
959 ( !LayoutConstraints::linear ||
960 layout_traits::linear )
987 std::ostream & operator<<(
991 std::ostringstream ss;
992 ss <<
"dash::pattern_layout_properties< ";
1009 return operator<<(os, ss.str());
1013 std::ostream & operator<<(
1017 std::ostringstream ss;
1018 ss <<
"dash::pattern_mapping_properties< ";
1023 ss <<
"unbalanced ";
1038 return operator<<(os, ss.str());
1042 std::ostream & operator<<(
1046 std::ostringstream ss;
1047 ss <<
"dash::pattern_partitioning_properties< ";
1049 ss <<
"rectangular ";
1061 ss <<
"unbalanced ";
1064 return operator<<(os, ss.str());
1071 #endif // DASH__PATTERN_PROPERTIES_H__ static const bool neighbor
Adjacent blocks in any dimension are located at a remote unit.
static const bool balanced
Mapping properties defaults:
All blocks have identical size.
This class is a simple memory pool which holds allocates elements of size ValueType.
static const bool cyclic
Blocks are assigned to processes like dealt from a deck of cards in every hyperplane, starting from first unit.
Local element order corresponds to a logical linearization within single blocks (if blocked) or withi...
Units are mapped to blocks in diagonal chains in at least one hyperplane.
Traits for compile-time pattern constraints checking, suitable as a helper for template definitions e...
static const bool linear
Local element order corresponds to a logical linearization within single blocks (blocked) or within e...
Adjacent blocks in any dimension are located at a remote unit.
All local indices are mapped to a single logical index domain and thus not indexed blockwise...
static const bool canonical
All local indices are mapped to a single logical index domain.
static const bool rectangular
Partitioning properties defaults:
static const bool balanced
All blocks have identical size.
Row major storage order, used by default.
The number of blocks assigned to units may differ.
static const bool row_major
Layout properties defaults:
Column major storage order.
Minimal number of blocks in every dimension, typically at most one block per unit.
Block extents are constant for every dimension.
The number of assigned blocks is identical for every unit.
Units are mapped to blocks in diagonal chains in all hyperplanes.
static const bool diagonal
Units are mapped to blocks in diagonal chains in all hyperplanes.
All blocks have identical extents.
Elements are contiguous in local memory within a single block and thus indexed blockwise.
Container type for mapping properties of models satisfying the Pattern concept.
static const bool col_major
Column major storage order.
static const bool unbalanced
Size of blocks may differ.
Size of blocks may differ.
bool check_pattern_constraints(const PatternType &pattern)
Traits for compile- and run-time pattern constraints checking, suitable for property checks where det...
Units are mapped to more than one block.
static const bool blocked
Elements are contiguous in local memory within a single block.
static const bool regular
All blocks have identical extents.
Unspecified mapping property.
Unspecified layout property.
static const bool unbalanced
The number of blocks assigned to units may differ.
static const bool minimal
Minimal number of blocks in every dimension, typically at most one block per unit.
Data range is partitioned in at least two dimensions.
static const bool shifted
Units are mapped to blocks in diagonal chains in at least one hyperplane.
Generic type of mapping properties of a model satisfying the Pattern concept.