9 #ifndef DART_TYPES_H_INCLUDED 10 #define DART_TYPES_H_INCLUDED 22 #define DART_INTERFACE_ON 102 typedef uintptr_t dart_operation_t ;
108 #define DART_OP_MINMAX_MIN 0 114 #define DART_OP_MINMAX_MAX 1 123 #define DART_TYPE_UNDEFINED (dart_datatype_t)(0) 124 #define DART_TYPE_BYTE (dart_datatype_t)(1) 126 #define DART_TYPE_SHORT (dart_datatype_t)(2) 127 #define DART_TYPE_INT (dart_datatype_t)(3) 128 #define DART_TYPE_UINT (dart_datatype_t)(4) 129 #define DART_TYPE_LONG (dart_datatype_t)(5) 130 #define DART_TYPE_ULONG (dart_datatype_t)(6) 131 #define DART_TYPE_LONGLONG (dart_datatype_t)(7) 132 #define DART_TYPE_ULONGLONG (dart_datatype_t)(8) 133 #define DART_TYPE_FLOAT (dart_datatype_t)(9) 135 #define DART_TYPE_DOUBLE (dart_datatype_t)(10) 136 #define DART_TYPE_LONG_DOUBLE (dart_datatype_t)(11) 137 #define DART_TYPE_LAST (dart_datatype_t)(12) 142 #if (UINT32_MAX == SIZE_MAX) 143 # define DART_TYPE_SIZET DART_TYPE_ULONG 144 #elif (UINT64_MAX == SIZE_MAX) 145 # define DART_TYPE_SIZET DART_TYPE_ULONGLONG 147 # error "Cannot determine DART type for size_t!" 160 #define DART_UNDEFINED_UNIT_ID ((dart_unit_t)(-1)) 169 constexpr dart_global_unit(dart_unit_t uid) : id(uid) { }
183 constexpr dart_local_unit(dart_unit_t uid) : id(uid) { }
206 #define DART_TEAM_UNIT_ID(__u) (dart_create_team_unit(__u)) 228 #define DART_GLOBAL_UNIT_ID(__u) (dart_create_global_unit(__u)) 237 #define DART_UNDEFINED_TEAM_UNIT_ID DART_TEAM_UNIT_ID(DART_UNDEFINED_UNIT_ID) 246 #define DART_UNDEFINED_GLOBAL_UNIT_ID DART_GLOBAL_UNIT_ID(DART_UNDEFINED_UNIT_ID) 258 #define DART_UNDEFINED_TEAM_ID ((dart_team_t)(-1)) 292 DART_LOCALITY_SCOPE_UNDEFINED = -1,
331 #if defined(HOST_NAME_MAX) 332 #define DART_LOCALITY_HOST_MAX_SIZE (HOST_NAME_MAX) 333 #elif defined(_POSIX_HOST_NAME_MAX) 334 #define DART_LOCALITY_HOST_MAX_SIZE (_POSIX_HOST_NAME_MAX) 336 #define DART_LOCALITY_HOST_MAX_SIZE ((int)(256)) 339 #define DART_LOCALITY_DOMAIN_TAG_MAX_SIZE ((int)(32)) 341 #define DART_LOCALITY_MAX_DOMAIN_SCOPES ((int)(12)) 344 #define DART_LOCALITY_UNIT_MAX_CPUS ((int)(64)) 346 #define DART_LOCALITY_MAX_NUMA_ID ((int)(16)) 348 #define DART_LOCALITY_MAX_CACHE_LEVELS ((int)( 5)) 655 int shared_mem_bytes;
711 dart_datatype_t basetype,
714 dart_datatype_t * newtype);
735 dart_datatype_t basetype,
737 const size_t blocklen[],
738 const size_t offset[],
739 dart_datatype_t * newtype);
755 dart_datatype_t * newtype);
811 dart_datatype_t dtype,
813 dart_operation_t * new_op);
823 #define DART_INTERFACE_OFF #define DART_LOCALITY_HOST_MAX_SIZE
Maximum size of a host name string in dart_hwinfo_t.
int max_cpu_mhz
Maximum clock frequency of CPUs in the domain.
#define DART_LOCALITY_MAX_DOMAIN_SCOPES
Maximum number of domain scopes in dart_hwinfo_t.
Interconnect topology scope, components may be heterogenous.
Locality and topology information of a single unit.
int numa_memory_bytes
Maximum memory per numa node in bytes.
dart_thread_support_level_t
Levels of thread-support offered by DART.
struct dart_global_unit dart_global_unit_t
Data type for storing a global unit ID.
int core_id
The unit's affine core, unique identifier within a processing module.
int num_cores
Total number of CPUs in the associated domain.
Locality of homogenous components in the same NUMA domain at process-level, i.e.
Node-level locality scope, components may be heterogenous.
dart_ret_t dart_op_destroy(dart_operation_t *op)
Destroy a operation object created through dart_op_create and set op to DART_OP_UNDEFINED.
Signal abort after failed assert.
Group of domains in specific locality scope, used as parent scope of domains in a user-defined group ...
dart_global_unit_t * unit_ids
Global IDs of units in the domain.
intptr_t dart_datatype_t
Raw data types supported by the DART interface.
int32_t dart_unit_t
Data type for storing a unit ID.
dart_team_t team
Team associated with the domain.
dart_hwinfo_t hwinfo
Hardware specification of the unit's affinity.
int num_domains
Number of subordinate domains.
No support for thread-based concurrency in DART is provided.
dart_ret_t dart_type_destroy(dart_datatype_t *dart_type)
Destroy a data type that was previously created using dart_type_create_strided or dart_type_create_in...
int system_memory_bytes
Maximum allocatable memory per node in bytes.
int level
Level in the domain locality hierarchy.
static dart_global_unit_t dart_create_global_unit(dart_unit_t unit)
Create a dart_global_unit_t from a dart_unit_t.
A domain is a group of processing entities such as cores in a specific NUMA domain or a Intel MIC ent...
Global locality scope, components may be heterogenous.
static dart_team_unit_t dart_create_team_unit(dart_unit_t unit)
Create a dart_team_unit_t from a dart_unit_t.
int min_cpu_mhz
Minimum clock frequency of CPUs in the domain.
int num_units
Number of units in the domain.
Locality at physical processing core level.
struct dart_local_unit dart_team_unit_t
Data type for storing a unit ID relative to a team.
Support for thread-based concurrency is provided by DART and the underlying runtime.
dart_locality_scope_pos_t pos
The module's parent scope and its relative position in the scope.
int global_index
The domain's global index within its scope.
Data type for storing a unit ID relative to a team.
Invalid operation or parameters.
dart_ret_t dart_type_create_strided(dart_datatype_t basetype, size_t stride, size_t blocklen, dart_datatype_t *newtype)
Create a strided data type using blocks of size blocklen and a stride of stride.
dart_locality_scope_t scope
The domain's scope identifier.
int max_threads
Maximum number of CPU threads per core.
Locality of homogenous components in different NUMA domains.
DART has not been initialized.
Number of operations defined, not an actual operation!
dart_locality_scope_t scope
Locality scope of the domain.
Locality at processor uncore (system agent) level.
dart_ret_t dart_type_create_custom(size_t num_bytes, dart_datatype_t *newtype)
Create a custom data type of size num_bytes bytes.
#define DART_LOCALITY_DOMAIN_TAG_MAX_SIZE
Maximum size of a domain tag string in dart_hwinfo_t.
An operation is still pending.
dart_ret_t dart_type_create_indexed(dart_datatype_t basetype, size_t count, const size_t blocklen[], const size_t offset[], dart_datatype_t *newtype)
Create an indexed data type using count blocks of size blocklen[i] with offsets offset[i] for each 0 ...
dart_ret_t
Return values of functions in the DART interface.
Hardware locality information for a single locality domain.
int16_t dart_team_t
Data type for storing a team ID.
Data type for storing a global unit ID.
Locality at level of physical CPU cache.
Missing data encountered.
int relative_index
The domain's index within its parent domain.
int min_threads
Minimum number of CPU threads per core.
Locality in a group of hetereogenous components in different NUMA domains.
#define DART_UNDEFINED_UNIT_ID
Undefined unit ID.
int index
The domain's relative index among its siblings in the scope.
int max_shmem_mbps
Maximum local shared memory bandwidth in MB/s.
struct dart_domain_locality_s * parent
Pointer to descriptor of parent domain or 0 if no parent domain is specified.
dart_team_unit_t unit
Unit ID relative to team.
int cpu_id
The unit's affine processing unit (SMP), unique identifier within a processing module.
DART has not been initialized.
Locality at level of physical processor package.
#define DART_LOCALITY_MAX_CACHE_LEVELS
Maximum number of cache levels supported in dart_hwinfo_t.
Locality at logical CPU level (SMT thread).
dart_ret_t dart_op_create(dart_operator_t op, void *userdata, bool commute, dart_datatype_t dtype, bool dtype_is_tmp, dart_operation_t *new_op)
Create a new operation new_op that can be used in collective reduction operations, i.e., dart_reduce, dart_allreduce.
struct dart_domain_locality_s ** children
Array of subordinate domains of size num_domains or 0 if no subdomains are specified.
dart_locality_scope_t
Scopes of locality domains.
void(* dart_operator_t)(const void *invec, void *inoutvec, size_t len, void *user_data)
The operator called from a reduction operation.
int is_symmetric
Whether sub-domains have identical hardware configuration.