5 #include <dash/internal/Unit.h> 7 #include <cpp17/cstddef.h> 11 #include <type_traits> 16 typedef enum MemArrange {
17 MEM_ARRANGE_UNDEFINED = 0,
24 typedef enum DistributionType {
43 #if defined(DASH_ENABLE_DEFAULT_INDEX_TYPE_LONG) 44 typedef long default_signed_index;
45 typedef unsigned long default_unsigned_index;
46 #elif defined(DASH_ENABLE_DEFAULT_INDEX_TYPE_INT) 47 typedef int default_signed_index;
48 typedef unsigned int default_unsigned_index;
50 typedef ssize_t default_signed_index;
51 typedef size_t default_unsigned_index;
80 ::std::array<IndexType, NumDimensions> coords;
87 ::std::array<SizeType, NumDimensions> sizes;
95 template<
typename Type>
103 template <
typename T>
110 template<
typename Type>
189 template <std::
size_t Size>
190 struct dart_pun_datatype_size
191 :
public std::integral_constant<dart_datatype_t, DART_TYPE_UNDEFINED>
195 struct dart_pun_datatype_size<1>
196 :
public std::integral_constant<dart_datatype_t, DART_TYPE_BYTE>
200 struct dart_pun_datatype_size<2>
201 :
public std::integral_constant<dart_datatype_t, DART_TYPE_SHORT>
205 struct dart_pun_datatype_size<4>
206 :
public std::integral_constant<dart_datatype_t, DART_TYPE_INT>
210 struct dart_pun_datatype_size<8>
211 :
public std::integral_constant<dart_datatype_t, DART_TYPE_LONGLONG>
216 template <
typename T>
223 == DART_TYPE_UNDEFINED,
224 internal::dart_pun_datatype_size<sizeof(T)>,
237 public std::integral_constant<bool,
238 std::is_standard_layout<T>::value
239 #ifdef DASH_HAVE_STD_TRIVIALLY_COPYABLE
240 && std::is_trivially_copyable<T>::value
241 #elif defined DASH_HAVE_TRIVIAL_COPY_INTRINSIC
242 && __has_trivial_copy(T)
251 template <
typename T>
253 :
public std::integral_constant<bool, std::is_arithmetic<T>::value>
260 template <
typename T>
262 :
public std::integral_constant<
264 dash::dart_datatype<T>::value != DART_TYPE_UNDEFINED >
275 template<
class T,
class EqualTo>
278 template<
class U,
class V>
279 static auto test(U*) -> decltype(std::declval<U>() == std::declval<V>());
280 template<
typename,
typename>
281 static auto test(...) -> std::false_type;
283 using type =
typename std::is_same<bool, decltype(test<T, EqualTo>(0))>::type;
286 template<
class T,
class EqualTo = T>
305 ? nvalues *
sizeof(T) : nvalues)
320 dash::unit_id<dash::local_unit, dart_team_unit_t>
333 dash::unit_id<dash::global_unit, dart_global_unit_t>
350 typedef typename std::max_align_t max_align_t;
354 #endif // DASH__TYPES_H_ internal::default_signed_index gptrdiff_t
Difference type for global pointers.
constexpr team_unit_t UNDEFINED_TEAM_UNIT_ID
Invalid local unit ID.
internal::default_unsigned_index default_extent_t
Unsigned integer type used as default for extent values.
internal::default_unsigned_index default_size_t
Unsigned integer type used as default for size values.
This class is a simple memory pool which holds allocates elements of size ValueType.
struct dash::unit_id< dash::global_unit, dart_global_unit_t > global_unit_t
Unit ID to use for global IDs.
intptr_t dart_datatype_t
Raw data types supported by the DART interface.
int dim_t
Scalar type for a dimension value, with 0 indicating the first dimension.
Type trait for mapping to punned DART data type for reduce operations.
internal::default_signed_index default_index_t
Signed integer type used as default for index values.
Type trait indicating whether a type can be used for global atomic operations.
#define DART_TYPE_BYTE
integral data types
constexpr global_unit_t UNDEFINED_GLOBAL_UNIT_ID
Invalid global unit ID.
Type trait for mapping to DART data types.
#define DART_TYPE_FLOAT
floating point data types
struct dash::unit_id< dash::local_unit, dart_team_unit_t > team_unit_t
Unit ID to use for team-local IDs.
Type trait indicating whether a type has a comparision operator== defined.
Type trait indicating whether the specified type is eligible for elements of DASH containers...
#define DART_UNDEFINED_UNIT_ID
Undefined unit ID.
Convencience wrapper to determine the DART type and number of elements required for the given templat...
Type trait indicating whether a type can be used for arithmetic operations in global memory space...