Legion Runtime
Loading...
Searching...
No Matches
legion_types.h
Go to the documentation of this file.
1/* Copyright 2024 Stanford University, NVIDIA Corporation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef __LEGION_TYPES_H__
17#define __LEGION_TYPES_H__
18
23#include <stdio.h>
24#include <stdlib.h>
25#include <assert.h>
26#include <string.h>
27#include <stdint.h>
28#include <limits.h>
29
30#include <map>
31#include <set>
32#include <list>
33#include <limits>
34#include <deque>
35#include <vector>
36#include <optional>
37#include <typeinfo>
38#include <type_traits>
39#include <string_view>
40#include <unordered_set>
41#include <unordered_map>
42
44
45// Make sure we have the appropriate defines in place for including realm
46#include "realm.h"
47#include "realm/id.h"
48#include "realm/dynamic_templates.h"
49
50// this may be set before including legion.h to eliminate deprecation warnings
51// for just the Legion API
52#ifndef LEGION_DEPRECATED
53#if __cplusplus >= 201402L
54#define LEGION_DEPRECATED(x) [[deprecated(x)]]
55#else
56#define LEGION_DEPRECATED(x)
57#endif
58#endif
59
60// Macros for disabling and re-enabling deprecated warnings
61#if defined(__PGIC__)
62// PGI has to go first because it also responds to GCC defines
63#define LEGION_DISABLE_DEPRECATED_WARNINGS \
64 _Pragma("warning (push)") \
65 _Pragma("diag_suppress 1445")
66#define LEGION_REENABLE_DEPRECATED_WARNINGS \
67 _Pragma("warning (pop)")
68#elif defined(__GNUC__)
69#define LEGION_DISABLE_DEPRECATED_WARNINGS \
70 _Pragma("GCC diagnostic push") \
71 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
72#define LEGION_REENABLE_DEPRECATED_WARNINGS \
73 _Pragma("GCC diagnostic pop")
74#elif defined(__clang__)
75#define LEGION_DISABLE_DEPRECATED_WARNINGS \
76 _Pragma("clang diagnostic push") \
77 _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
78#define LEGION_REENABLE_DEPRECATED_WARNINGS \
79 _Pragma("clang diagnostic pop")
80#elif defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
81#define LEGION_DISABLE_DEPRECATED_WARNINGS \
82 _Pragma("warning push") \
83 _Pragma("warning disable 1478")
84#define LEGION_REENABLE_DEPRECATED_WARNINGS \
85 _Pragma("warning pop")
86#else
87#warning "Don't know how to suppress deprecated warnings for this compiler"
88#define LEGION_DISABLE_DEPRECATED_WARNINGS
89#define LEGION_REENABLE_DEPRECATED_WARNINGS
90#endif
91
92// If we're doing full LEGION_SPY then turn off event pruning
93#ifdef LEGION_SPY
94#ifndef LEGION_DISABLE_EVENT_PRUNING
95#define LEGION_DISABLE_EVENT_PRUNING
96#endif
97#endif
98
99// forward declarations from bitmask.h
100template<typename T, unsigned int MAX,
101 unsigned SHIFT, unsigned MASK> class BitMask;
102template<typename T, unsigned int MAX,
103 unsigned SHIFT, unsigned MASK> class TLBitMask;
104#ifdef __SSE2__
105template<unsigned int MAX> class SSEBitMask;
106template<unsigned int MAX> class SSETLBitMask;
107#endif
108#ifdef __AVX__
109template<unsigned int MAX> class AVXBitMask;
110template<unsigned int MAX> class AVXTLBitMask;
111#endif
112#ifdef __ALTIVEC__
113template<unsigned int MAX> class PPCBitMask;
114template<unsigned int MAX> class PPCTLBitMask;
115#endif
116#ifdef __ARM_NEON
117template<unsigned int MAX> class NeonBitMask;
118template<unsigned int MAX> class NeonTLBitMask;
119#endif
120template<typename DT, unsigned BLOAT, bool BIDIR> class CompoundBitMask;
121
122namespace BindingLib { class Utility; } // BindingLib namespace
123
124namespace Legion {
125
126 typedef ::legion_error_t LegionErrorType;
127 typedef ::legion_privilege_mode_t PrivilegeMode;
128 typedef ::legion_allocate_mode_t AllocateMode;
129 typedef ::legion_coherence_property_t CoherenceProperty;
130 typedef ::legion_region_flags_t RegionFlags;
131 typedef ::legion_projection_type_t ProjectionType;
132 typedef ::legion_partition_kind_t PartitionKind;
133 typedef ::legion_external_resource_t ExternalResource;
134 typedef ::legion_timing_measurement_t TimingMeasurement;
135 typedef ::legion_dependence_type_t DependenceType;
136 typedef ::legion_mappable_type_id_t MappableType;
137 typedef ::legion_file_mode_t LegionFileMode;
138 typedef ::legion_execution_constraint_t ExecutionConstraintKind;
139 typedef ::legion_layout_constraint_t LayoutConstraintKind;
140 typedef ::legion_equality_kind_t EqualityKind;
141 typedef ::legion_dimension_kind_t DimensionKind;
142 typedef ::legion_isa_kind_t ISAKind;
143 typedef ::legion_resource_constraint_t ResourceKind;
144 typedef ::legion_launch_constraint_t LaunchKind;
145 typedef ::legion_specialized_constraint_t SpecializedKind;
146 typedef ::legion_unbounded_pool_scope_t UnboundPoolScope;
147
148 // Forward declarations for user level objects
149 // legion.h
150 class IndexSpace;
151 template<int DIM, typename T> class IndexSpaceT;
152 class IndexPartition;
153 template<int DIM, typename T> class IndexPartitionT;
154 class FieldSpace;
155 class LogicalRegion;
156 template<int DIM, typename T> class LogicalRegionT;
157 class LogicalPartition;
158 template<int DIM, typename T> class LogicalPartitionT;
159 class IndexAllocator;
160 class FieldAllocator;
161 class UntypedBuffer;
162 class ArgumentMap;
163 class Lock;
164 struct LockRequest;
165 class Grant;
166 class PhaseBarrier;
167 struct RegionRequirement;
168 struct OutputRequirement;
169 struct IndexSpaceRequirement;
170 struct FieldSpaceRequirement;
171 struct TaskLauncher;
172 struct IndexTaskLauncher;
173 typedef IndexTaskLauncher IndexLauncher; // for backwards compatibility
174 struct InlineLauncher;
175 struct CopyLauncher;
176 struct AcquireLauncher;
177 struct ReleaseLauncher;
178 struct FillLauncher;
179 struct LayoutConstraintRegistrar;
180 struct TaskVariantRegistrar;
181 class Future;
182 class FutureMap;
183 class Predicate;
184 class PhysicalRegion;
185 class OutputRegion;
186 class ExternalResources;
187 class UntypedDeferredValue;
188 template<typename>
189 class DeferredValue;
190 template<typename, bool>
191 class DeferredReduction;
192 template<typename, int, typename, bool>
193 class DeferredBuffer;
194 template<typename COORD_T>
195 class UntypedDeferredBuffer;
196 template<PrivilegeMode,typename,int,typename,typename,bool>
197 class FieldAccessor;
198 template<typename, bool, int, typename, typename, bool>
199 class ReductionAccessor;
200 template<typename, int, typename, typename, bool>
201 class PaddingAccessor;
202#ifdef LEGION_MULTI_REGION_ACCESSOR
203 template<typename, int,typename,typename,bool,bool,int>
204 class MultiRegionAccessor;
205#endif
206 template<typename,int,typename,typename>
208 namespace ArraySyntax {
209 template<typename, PrivilegeMode> class AccessorRefHelper;
210 template<typename> class AffineRefHelper;
211 }
212 class PieceIterator;
213 template<int,typename>
214 class PieceIteratorT;
215 template<PrivilegeMode,typename,int,typename>
216 class SpanIterator;
217 struct InputArgs;
219 class ProjectionFunctor;
220 class ShardingFunctor;
221 class Task;
222 class Copy;
223 class InlineMapping;
224 class Acquire;
225 class Release;
226 class Close;
227 class Fill;
228 class Partition;
229 class MustEpoch;
231 class Runtime;
232 class LegionHandshake;
233 class MPILegionHandshake;
234 // For backwards compatibility
236 // Helper for saving instantiated template functions
237 struct SerdezRedopFns;
238 // Some typedefs for making things nicer for users with C++11 support
239 template<typename FT, int N, typename T = ::legion_coord_t>
240 using GenericAccessor = Realm::GenericAccessor<FT,N,T>;
241 template<typename FT, int N, typename T = ::legion_coord_t>
242 using AffineAccessor = Realm::AffineAccessor<FT,N,T>;
243 template<typename FT, int N, typename T = ::legion_coord_t>
244 using MultiAffineAccessor = Realm::MultiAffineAccessor<FT,N,T>;
245
246 // Forward declarations for wrapper tasks
247 // legion.h
248 class LegionTaskWrapper;
249 class LegionSerialization;
250
251 // Forward declarations for C wrapper objects
252 // legion_c_util.h
253 class TaskResult;
254 class CObjectWrapper;
255
256 // legion_domain.h
257 class DomainPoint;
258 class Domain;
259 class IndexSpaceAllocator;
260
261 // legion_utilities.h
262 class Serializer;
263 class Deserializer;
264
265 // legion_constraint.h
266 class ISAConstraint;
267 class ProcessorConstraint;
268 class ResourceConstraint;
269 class LaunchConstraint;
270 class ColocationConstraint;
271 class ExecutionConstraintSet;
272
273 class SpecializedConstraint;
274 class MemoryConstraint;
275 class FieldConstraint;
276 class PaddingConstraint;
277 class OrderingConstraint;
278 class TilingConstraint;
279 class DimensionConstraint;
280 class AlignmentConstraint;
281 class OffsetConstraint;
282 class PointerConstraint;
283 class LayoutConstraintSet;
284 class TaskLayoutConstraintSet;
285
286 namespace Mapping {
287 class PhysicalInstance;
288 class CollectiveView;
289 class MapperEvent;
290 class ProfilingRequestSet;
291 class Mapper;
292 class MapperRuntime;
293 class AutoLock;
294 class DefaultMapper;
295 class ShimMapper;
296 class TestMapper;
297 class DebugMapper;
298 class ReplayMapper;
299
300 // The following types are effectively overlaid on the Realm versions
301 // to allow for Legion-specific profiling measurements
302 enum ProfilingMeasurementID {
303 PMID_LEGION_FIRST = Realm::PMID_REALM_LAST,
304 PMID_RUNTIME_OVERHEAD,
305 };
306 };
307
308 namespace Internal {
309
310 enum OpenState {
311 NOT_OPEN = 0,
312 OPEN_READ_ONLY = 1,
313 OPEN_READ_WRITE = 2, // unknown dirty information below
314 OPEN_REDUCE = 3, // make sure to check reduction value
315 };
316
317 // Internal reduction operators
318 // Currently we don't use any, but 0 is reserved
319 enum {
320 REDOP_ID_AVAILABLE = 1,
321 };
322
323 // Realm dependent partitioning kinds
324 enum DepPartOpKind {
325 DEP_PART_UNION = 0, // a single union
326 DEP_PART_UNIONS = 1, // many parallel unions
327 DEP_PART_UNION_REDUCTION = 2, // union reduction to a single space
328 DEP_PART_INTERSECTION = 3, // a single intersection
329 DEP_PART_INTERSECTIONS = 4, // many parallel intersections
330 DEP_PART_INTERSECTION_REDUCTION = 5, // intersection reduction to a space
331 DEP_PART_DIFFERENCE = 6, // a single difference
332 DEP_PART_DIFFERENCES = 7, // many parallel differences
333 DEP_PART_EQUAL = 8, // an equal partition operation
334 DEP_PART_BY_FIELD = 9, // create a partition from a field
335 DEP_PART_BY_IMAGE = 10, // create partition by image
336 DEP_PART_BY_IMAGE_RANGE = 11, // create partition by image range
337 DEP_PART_BY_PREIMAGE = 12, // create partition by preimage
338 DEP_PART_BY_PREIMAGE_RANGE = 13, // create partition by preimage range
339 DEP_PART_ASSOCIATION = 14, // create an association
340 DEP_PART_WEIGHTS = 15, // create partition by weights
341 };
342
343 // Collective copy kinds
344 enum CollectiveKind {
345 COLLECTIVE_NONE = 0,
346 // Filling a collective instance (both normal and reductions)
347 COLLECTIVE_FILL = 1,
348 // Broadcasting one normal instance to a collective normal instance
349 COLLECTIVE_BROADCAST = 2,
350 // Reducing a collective reduction instance to either a
351 // single normal or a single reduction instance
352 COLLECTIVE_REDUCTION = 3,
353 // Performing an all-reduce from a collective reduction instance
354 // to a collective normal or reduction instance using a butterfly
355 // network reduction (both instances using the same nodes)
356 COLLECTIVE_BUTTERFLY_ALLREDUCE = 4,
357 // Performing an all-reduce by doing a reduction down to a single
358 // instance and then broadcasting the result out from that instance
359 // (instances don't exist on the same set of nodes)
360 COLLECTIVE_HOURGLASS_ALLREDUCE = 5,
361 // Copy from one collective normal instanace to another collective
362 // normal instance for each of the points in the destination
363 COLLECTIVE_POINT_TO_POINT = 6,
364 // Apply a reduction from a single reduction instance to
365 // a collective normal instance
366 COLLECTIVE_REDUCECAST = 7,
367 // Degenerate case: apply a copy-across from a collective reduction
368 // instance to any kind of other instance without doing an all-reduce
369 COLLECTIVE_HAMMER_REDUCTION = 8,
370 };
371
372 // Enumeration of Legion runtime tasks
373 enum LgTaskID {
374 LG_SCHEDULER_ID,
375 LG_TRIGGER_READY_ID,
376 LG_TRIGGER_EXECUTION_ID,
377 LG_TRIGGER_COMMIT_ID,
378 LG_DEFERRED_EXECUTION_ID,
379 LG_DEFERRED_COMPLETION_ID,
380 LG_DEFERRED_COMMIT_ID,
381 LG_PRE_PIPELINE_ID,
382 LG_TRIGGER_DEPENDENCE_ID,
383 LG_DEFERRED_MAPPED_ID,
384 LG_TRIGGER_OP_ID,
385 LG_TRIGGER_TASK_ID,
386 LG_DEFER_MAPPER_SCHEDULER_TASK_ID,
387 LG_CONTRIBUTE_COLLECTIVE_ID,
388 LG_FUTURE_CALLBACK_TASK_ID,
389 LG_CALLBACK_RELEASE_TASK_ID,
390 LG_FUTURE_BROADCAST_TASK_ID,
391 LG_TOP_FINISH_TASK_ID,
392 LG_MAPPER_TASK_ID,
393 LG_DISJOINTNESS_TASK_ID,
394 LG_DEFER_TIMING_MEASUREMENT_TASK_ID,
395 LG_TASK_IMPL_SEMANTIC_INFO_REQ_TASK_ID,
396 LG_INDEX_SPACE_SEMANTIC_INFO_REQ_TASK_ID,
397 LG_INDEX_PART_SEMANTIC_INFO_REQ_TASK_ID,
398 LG_FIELD_SPACE_SEMANTIC_INFO_REQ_TASK_ID,
399 LG_FIELD_SEMANTIC_INFO_REQ_TASK_ID,
400 LG_DEFER_FIELD_INFOS_TASK_ID,
401 LG_REGION_SEMANTIC_INFO_REQ_TASK_ID,
402 LG_PARTITION_SEMANTIC_INFO_REQ_TASK_ID,
403 LG_INDEX_SPACE_DEFER_CHILD_TASK_ID,
404 LG_INDEX_PART_DEFER_CHILD_TASK_ID,
405 LG_INDEX_PART_DEFER_SHARD_RECTS_TASK_ID,
406 LG_DEFERRED_ENQUEUE_TASK_ID,
407 LG_DEFER_MAPPER_MESSAGE_TASK_ID,
408 LG_DEFER_MAPPER_COLLECTION_TASK_ID,
409 LG_REMOTE_VIEW_CREATION_TASK_ID,
410 LG_DEFER_PERFORM_MAPPING_TASK_ID,
411 LG_FINALIZE_OUTPUT_TREE_TASK_ID,
412 LG_MISPREDICATION_TASK_ID,
413 LG_DEFER_TRIGGER_CHILDREN_COMMIT_TASK_ID,
414 LG_ORDER_CONCURRENT_LAUNCH_TASK_ID,
415 LG_DEFER_MATERIALIZED_VIEW_TASK_ID,
416 LG_DEFER_REDUCTION_VIEW_TASK_ID,
417 LG_DEFER_PHI_VIEW_REGISTRATION_TASK_ID,
418 LG_DEFER_COMPOSITE_COPY_TASK_ID,
419 LG_TIGHTEN_INDEX_SPACE_TASK_ID,
420 LG_REPLAY_SLICE_TASK_ID,
421 LG_TRANSITIVE_REDUCTION_TASK_ID,
422 LG_DELETE_TEMPLATE_TASK_ID,
423 LG_DEFER_MAKE_OWNER_TASK_ID,
424 LG_DEFER_APPLY_STATE_TASK_ID,
425 LG_COPY_FILL_AGGREGATION_TASK_ID,
426 LG_COPY_FILL_DELETION_TASK_ID,
427 LG_FINALIZE_EQ_SETS_TASK_ID,
428 LG_FINALIZE_OUTPUT_EQ_SET_TASK_ID,
429 LG_DEFERRED_COPY_ACROSS_TASK_ID,
430 LG_DEFER_REMOTE_OP_DELETION_TASK_ID,
431 LG_DEFER_REMOTE_INSTANCE_TASK_ID,
432 LG_DEFER_REMOTE_REDUCTION_TASK_ID,
433 LG_DEFER_REMOTE_UPDATE_TASK_ID,
434 LG_DEFER_REMOTE_ACQUIRE_TASK_ID,
435 LG_DEFER_REMOTE_RELEASE_TASK_ID,
436 LG_DEFER_REMOTE_COPIES_ACROSS_TASK_ID,
437 LG_DEFER_REMOTE_OVERWRITE_TASK_ID,
438 LG_DEFER_REMOTE_FILTER_TASK_ID,
439 LG_DEFER_PERFORM_TRAVERSAL_TASK_ID,
440 LG_DEFER_PERFORM_ANALYSIS_TASK_ID,
441 LG_DEFER_PERFORM_REMOTE_TASK_ID,
442 LG_DEFER_PERFORM_UPDATE_TASK_ID,
443 LG_DEFER_PERFORM_REGISTRATION_TASK_ID,
444 LG_DEFER_PERFORM_OUTPUT_TASK_ID,
445 LG_DEFER_PHYSICAL_MANAGER_TASK_ID,
446 LG_DEFER_DELETE_PHYSICAL_MANAGER_TASK_ID,
447 LG_DEFER_VERIFY_PARTITION_TASK_ID,
448 LG_DEFER_RELEASE_ACQUIRED_TASK_ID,
449 LG_DEFER_COPY_ACROSS_TASK_ID,
450 LG_DEFER_COLLECTIVE_MESSAGE_TASK_ID,
451 LG_MALLOC_INSTANCE_TASK_ID,
452 LG_FREE_INSTANCE_TASK_ID,
453 LG_DEFER_TRACE_UPDATE_TASK_ID,
454 LG_DEFER_DELETE_FUTURE_INSTANCE_TASK_ID,
455 LG_FREE_EXTERNAL_TASK_ID,
456 LG_DEFER_CONSENSUS_MATCH_TASK_ID,
457 LG_DEFER_COLLECTIVE_TASK_ID,
458 LG_DEFER_ISSUE_FILL_TASK_ID,
459 LG_DEFER_MUST_EPOCH_RETURN_TASK_ID,
460 LG_DEFER_DELETION_COMMIT_TASK_ID,
461 LG_YIELD_TASK_ID,
462 LG_AUTO_TRACE_PROCESS_REPEATS_TASK_ID,
463 // this marks the beginning of task IDs tracked by the shutdown algorithm
464 LG_BEGIN_SHUTDOWN_TASK_IDS,
465 LG_RETRY_SHUTDOWN_TASK_ID = LG_BEGIN_SHUTDOWN_TASK_IDS,
466 // Message ID goes at the end so we can append additional
467 // message IDs here for the profiler and separate meta-tasks
468 LG_MESSAGE_ID,
469 LG_LAST_TASK_ID, // This one should always be last
470 };
471
472 // Make this a macro so we can keep it close to
473 // declaration of the task IDs themselves
474#define LG_TASK_DESCRIPTIONS(name) \
475 const char *name[LG_LAST_TASK_ID] = { \
476 "Scheduler", \
477 "Trigger Ready", \
478 "Trigger Execution", \
479 "Trigger Commit", \
480 "Deferred Execution", \
481 "Deferred Completion", \
482 "Deferred Commit", \
483 "Prepipeline Stage", \
484 "Logical Dependence Analysis", \
485 "Deferred Mapped", \
486 "Trigger Operation Mapping", \
487 "Trigger Task Mapping", \
488 "Defer Mapper Scheduler", \
489 "Contribute Collective", \
490 "Future Callback", \
491 "Future Callback Release", \
492 "Future Broadcast", \
493 "Top Finish", \
494 "Mapper Task", \
495 "Disjointness Test", \
496 "Defer Timing Measurement", \
497 "Task Impl Semantic Request", \
498 "Index Space Semantic Request", \
499 "Index Partition Semantic Request", \
500 "Field Space Semantic Request", \
501 "Field Semantic Request", \
502 "Defer Field Infos Request", \
503 "Region Semantic Request", \
504 "Partition Semantic Request", \
505 "Defer Index Space Child Request", \
506 "Defer Index Partition Child Request", \
507 "Defer Index Partition Find Shard Rects", \
508 "Deferred Enqueue Task", \
509 "Deferred Mapper Message", \
510 "Deferred Mapper Instance Collective", \
511 "Remote View Creation", \
512 "Defer Task Perform Mapping", \
513 "Finalize Output Regions Eq KD Tree", \
514 "Handle Mapping Mispredication", \
515 "Defer Trigger Children Commit", \
516 "Order Concurrent Launch", \
517 "Defer Materialized View Registration", \
518 "Defer Reduction View Registration", \
519 "Defer Phi View Registration", \
520 "Defer Composite Copy", \
521 "Tighten Index Space", \
522 "Replay Physical Trace", \
523 "Template Transitive Reduction", \
524 "Delete Physical Template", \
525 "Defer Equivalence Set Make Owner", \
526 "Defer Equivalence Set Apply State", \
527 "Copy Fill Aggregation", \
528 "Copy Fill Deletion", \
529 "Finalize Equivalence Sets", \
530 "Finalize Output Equivalence Set", \
531 "Deferred Copy Across", \
532 "Defer Remote Op Deletion", \
533 "Defer Remote Instance Request", \
534 "Defer Remote Reduction Request", \
535 "Defer Remote Update Equivalence Set", \
536 "Defer Remote Acquire", \
537 "Defer Remote Release", \
538 "Defer Remote Copy Across", \
539 "Defer Remote Overwrite Equivalence Set", \
540 "Defer Remote Filter Equivalence Set", \
541 "Defer Physical Analysis Traversal Stage", \
542 "Defer Physical Analysis Analyze Equivalence Set Stage", \
543 "Defer Physical Analysis Remote Stage", \
544 "Defer Physical Analysis Update Stage", \
545 "Defer Physical Analysis Registration Stage", \
546 "Defer Physical Analysis Output Stage", \
547 "Defer Physical Manager Registration", \
548 "Defer Physical Manager Deletion", \
549 "Defer Verify Partition", \
550 "Defer Release Acquired Instances", \
551 "Defer Copy-Across Execution for Preimages", \
552 "Defer Collective Instance Message", \
553 "Malloc Instance", \
554 "Free Instance", \
555 "Defer Trace Update", \
556 "Defer Delete Future Instance", \
557 "Free External Allocation", \
558 "Defer Consensus Match", \
559 "Defer Collective Async", \
560 "Defer Issue Fill", \
561 "Defer Must Epoch Return Resources", \
562 "Defer Deletion Commit", \
563 "Yield", \
564 "Auto Trace Find Repeats", \
565 "Retry Shutdown", \
566 "Remote Message", \
567 };
568
569 enum MappingCallKind {
570 GET_MAPPER_NAME_CALL,
571 GET_MAPER_SYNC_MODEL_CALL,
572 SELECT_TASK_OPTIONS_CALL,
573 PREMAP_TASK_CALL,
574 SLICE_TASK_CALL,
575 MAP_TASK_CALL,
576 REPLICATE_TASK_CALL,
577 SELECT_VARIANT_CALL,
578 POSTMAP_TASK_CALL,
579 TASK_SELECT_SOURCES_CALL,
580 TASK_SPECULATE_CALL,
581 TASK_REPORT_PROFILING_CALL,
582 TASK_SELECT_SHARDING_FUNCTOR_CALL,
583 MAP_INLINE_CALL,
584 INLINE_SELECT_SOURCES_CALL,
585 INLINE_REPORT_PROFILING_CALL,
586 MAP_COPY_CALL,
587 COPY_SELECT_SOURCES_CALL,
588 COPY_SPECULATE_CALL,
589 COPY_REPORT_PROFILING_CALL,
590 COPY_SELECT_SHARDING_FUNCTOR_CALL,
591 CLOSE_SELECT_SOURCES_CALL,
592 CLOSE_REPORT_PROFILING_CALL,
593 CLOSE_SELECT_SHARDING_FUNCTOR_CALL,
594 MAP_ACQUIRE_CALL,
595 ACQUIRE_SPECULATE_CALL,
596 ACQUIRE_REPORT_PROFILING_CALL,
597 ACQUIRE_SELECT_SHARDING_FUNCTOR_CALL,
598 MAP_RELEASE_CALL,
599 RELEASE_SELECT_SOURCES_CALL,
600 RELEASE_SPECULATE_CALL,
601 RELEASE_REPORT_PROFILING_CALL,
602 RELEASE_SELECT_SHARDING_FUNCTOR_CALL,
603 SELECT_PARTITION_PROJECTION_CALL,
604 MAP_PARTITION_CALL,
605 PARTITION_SELECT_SOURCES_CALL,
606 PARTITION_REPORT_PROFILING_CALL,
607 PARTITION_SELECT_SHARDING_FUNCTOR_CALL,
608 FILL_SELECT_SHARDING_FUNCTOR_CALL,
609 MAP_FUTURE_MAP_REDUCTION_CALL,
610 CONFIGURE_CONTEXT_CALL,
611 SELECT_TUNABLE_VALUE_CALL,
612 MUST_EPOCH_SELECT_SHARDING_FUNCTOR_CALL,
613 MAP_MUST_EPOCH_CALL,
614 MAP_DATAFLOW_GRAPH_CALL,
615 MEMOIZE_OPERATION_CALL,
616 SELECT_TASKS_TO_MAP_CALL,
617 SELECT_STEAL_TARGETS_CALL,
618 PERMIT_STEAL_REQUEST_CALL,
619 HANDLE_MESSAGE_CALL,
620 HANDLE_TASK_RESULT_CALL,
621 HANDLE_INSTANCE_COLLECTION_CALL,
622 APPLICATION_MAPPER_CALL,
623 LAST_MAPPER_CALL,
624 };
625
626#define MAPPER_CALL_NAMES(name) \
627 const char *name[LAST_MAPPER_CALL] = { \
628 "get_mapper_name", \
629 "get_mapper_sync_model", \
630 "select_task_options", \
631 "premap_task", \
632 "slice_task", \
633 "map_task", \
634 "replicate_task", \
635 "select_task_variant", \
636 "postmap_task", \
637 "select_task_sources", \
638 "speculate (for task)", \
639 "report profiling (for task)", \
640 "select sharding functor (for task)", \
641 "map_inline", \
642 "select_inline_sources", \
643 "report profiling (for inline)", \
644 "map_copy", \
645 "select_copy_sources", \
646 "speculate (for copy)", \
647 "report_profiling (for copy)", \
648 "select sharding functor (for copy)", \
649 "select_close_sources", \
650 "report_profiling (for close)", \
651 "select sharding functor (for close)", \
652 "map_acquire", \
653 "speculate (for acquire)", \
654 "report_profiling (for acquire)", \
655 "select sharding functor (for acquire)", \
656 "map_release", \
657 "select_release_sources", \
658 "speculate (for release)", \
659 "report_profiling (for release)", \
660 "select sharding functor (for release)", \
661 "select partition projection", \
662 "map_partition", \
663 "select_partition_sources", \
664 "report_profiling (for partition)", \
665 "select sharding functor (for partition)", \
666 "select sharding functor (for fill)", \
667 "map future map reduction", \
668 "configure_context", \
669 "select_tunable_value", \
670 "select sharding functor (for must epoch)", \
671 "map_must_epoch", \
672 "map_dataflow_graph", \
673 "memoize_operation", \
674 "select_tasks_to_map", \
675 "select_steal_targets", \
676 "permit_steal_request", \
677 "handle_message", \
678 "handle_task_result", \
679 "handle_instance_collection", \
680 "application mapper call", \
681 }
682
683 // Methodology for assigning priorities to meta-tasks:
684 // Minimum and low priority are for things like profiling
685 // that we don't want to interfere with normal execution.
686 // Resource priority is reserved for tasks that have been
687 // granted resources like reservations. Running priority
688 // is the highest and guarantees that we drain out any
689 // previously running tasks over starting new ones. The rest
690 // of the priorities are classified as either 'throughput'
691 // or 'latency' sensitive. Under each of these two major
692 // categories there are four sub-priorities:
693 // - work: general work to be done
694 // - deferred: work that was already scheduled but
695 // for which a continuation had to be
696 // made so we don't want to wait behind
697 // work that hasn't started yet
698 // - messsage: a message from a remote node that we
699 // should handle sooner than our own
700 // work since work on the other node is
701 // blocked waiting on our response
702 // - response: a response message from a remote node
703 // that we should handle to unblock work
704 // on our own node
705 enum LgPriority {
706 LG_MIN_PRIORITY = INT_MIN,
707 LG_LOW_PRIORITY = -1,
708 // Throughput priorities
709 LG_THROUGHPUT_WORK_PRIORITY = 0,
710 LG_THROUGHPUT_DEFERRED_PRIORITY = 1,
711 LG_THROUGHPUT_MESSAGE_PRIORITY = 2,
712 LG_THROUGHPUT_RESPONSE_PRIORITY = 3,
713 // Latency priorities
714 LG_LATENCY_WORK_PRIORITY = 4,
715 LG_LATENCY_DEFERRED_PRIORITY = 5,
716 LG_LATENCY_MESSAGE_PRIORITY = 6,
717 LG_LATENCY_RESPONSE_PRIORITY = 7,
718 // Resource priorities
719 LG_RESOURCE_PRIORITY = 8,
720 // Running priorities
721 LG_RUNNING_PRIORITY = 9,
722 };
723
724 enum VirtualChannelKind {
725 // The default and work virtual channels are unordered
726 DEFAULT_VIRTUAL_CHANNEL = 0, // latency priority
727 THROUGHPUT_VIRTUAL_CHANNEL = 1, // throughput priority
728 LAST_UNORDERED_VIRTUAL_CHANNEL = THROUGHPUT_VIRTUAL_CHANNEL,
729 // All the rest of these are ordered (latency-priority) channels
730 MAPPER_VIRTUAL_CHANNEL = 1,
731 TASK_VIRTUAL_CHANNEL = 2,
732 INDEX_SPACE_VIRTUAL_CHANNEL = 3,
733 FIELD_SPACE_VIRTUAL_CHANNEL = 4,
734 REFERENCE_VIRTUAL_CHANNEL = 6,
735 UPDATE_VIRTUAL_CHANNEL = 7, // deferred-priority
736 SUBSET_VIRTUAL_CHANNEL = 8,
737 COLLECTIVE_VIRTUAL_CHANNEL = 9,
738 LAYOUT_CONSTRAINT_VIRTUAL_CHANNEL = 10,
739 EXPRESSION_VIRTUAL_CHANNEL = 11,
740 MIGRATION_VIRTUAL_CHANNEL = 12,
741 TRACING_VIRTUAL_CHANNEL = 13,
742 RENDEZVOUS_VIRTUAL_CHANNEL = 14,
743 PROFILING_VIRTUAL_CHANNEL = 15,
744 MAX_NUM_VIRTUAL_CHANNELS = 16, // this one must be last
745 };
746
747 enum MessageKind {
748 SEND_STARTUP_BARRIER,
749 TASK_MESSAGE,
750 STEAL_MESSAGE,
751 ADVERTISEMENT_MESSAGE,
752 SEND_REGISTRATION_CALLBACK,
753 SEND_REMOTE_TASK_REPLAY,
754 SEND_REMOTE_TASK_PROFILING_RESPONSE,
755 SEND_SHARED_OWNERSHIP,
756 SEND_INDEX_SPACE_REQUEST,
757 SEND_INDEX_SPACE_RESPONSE,
758 SEND_INDEX_SPACE_RETURN,
759 SEND_INDEX_SPACE_SET,
760 SEND_INDEX_SPACE_CHILD_REQUEST,
761 SEND_INDEX_SPACE_CHILD_RESPONSE,
762 SEND_INDEX_SPACE_COLORS_REQUEST,
763 SEND_INDEX_SPACE_COLORS_RESPONSE,
764 SEND_INDEX_SPACE_GENERATE_COLOR_REQUEST,
765 SEND_INDEX_SPACE_GENERATE_COLOR_RESPONSE,
766 SEND_INDEX_SPACE_RELEASE_COLOR,
767 SEND_INDEX_PARTITION_NOTIFICATION,
768 SEND_INDEX_PARTITION_REQUEST,
769 SEND_INDEX_PARTITION_RESPONSE,
770 SEND_INDEX_PARTITION_RETURN,
771 SEND_INDEX_PARTITION_CHILD_REQUEST,
772 SEND_INDEX_PARTITION_CHILD_RESPONSE,
773 SEND_INDEX_PARTITION_CHILD_REPLICATION,
774 SEND_INDEX_PARTITION_DISJOINT_UPDATE,
775 SEND_INDEX_PARTITION_SHARD_RECTS_REQUEST,
776 SEND_INDEX_PARTITION_SHARD_RECTS_RESPONSE,
777 SEND_INDEX_PARTITION_REMOTE_INTERFERENCE_REQUEST,
778 SEND_INDEX_PARTITION_REMOTE_INTERFERENCE_RESPONSE,
779 SEND_FIELD_SPACE_NODE,
780 SEND_FIELD_SPACE_REQUEST,
781 SEND_FIELD_SPACE_RETURN,
782 SEND_FIELD_SPACE_ALLOCATOR_REQUEST,
783 SEND_FIELD_SPACE_ALLOCATOR_RESPONSE,
784 SEND_FIELD_SPACE_ALLOCATOR_INVALIDATION,
785 SEND_FIELD_SPACE_ALLOCATOR_FLUSH,
786 SEND_FIELD_SPACE_ALLOCATOR_FREE,
787 SEND_FIELD_SPACE_INFOS_REQUEST,
788 SEND_FIELD_SPACE_INFOS_RESPONSE,
789 SEND_FIELD_ALLOC_REQUEST,
790 SEND_FIELD_SIZE_UPDATE,
791 SEND_FIELD_FREE,
792 SEND_FIELD_FREE_INDEXES,
793 SEND_FIELD_SPACE_LAYOUT_INVALIDATION,
794 SEND_LOCAL_FIELD_ALLOC_REQUEST,
795 SEND_LOCAL_FIELD_ALLOC_RESPONSE,
796 SEND_LOCAL_FIELD_FREE,
797 SEND_LOCAL_FIELD_UPDATE,
798 SEND_TOP_LEVEL_REGION_REQUEST,
799 SEND_TOP_LEVEL_REGION_RETURN,
800 INDEX_SPACE_DESTRUCTION_MESSAGE,
801 INDEX_PARTITION_DESTRUCTION_MESSAGE,
802 FIELD_SPACE_DESTRUCTION_MESSAGE,
803 LOGICAL_REGION_DESTRUCTION_MESSAGE,
804 INDIVIDUAL_REMOTE_FUTURE_SIZE,
805 INDIVIDUAL_REMOTE_OUTPUT_REGISTRATION,
806 INDIVIDUAL_REMOTE_MAPPED,
807 INDIVIDUAL_REMOTE_COMPLETE,
808 INDIVIDUAL_REMOTE_COMMIT,
809 INDIVIDUAL_CONCURRENT_REQUEST,
810 INDIVIDUAL_CONCURRENT_RESPONSE,
811 SLICE_REMOTE_MAPPED,
812 SLICE_REMOTE_COMPLETE,
813 SLICE_REMOTE_COMMIT,
814 SLICE_RENDEZVOUS_CONCURRENT_MAPPED,
815 SLICE_COLLECTIVE_ALLREDUCE_REQUEST,
816 SLICE_COLLECTIVE_ALLREDUCE_RESPONSE,
817 SLICE_CONCURRENT_ALLREDUCE_REQUEST,
818 SLICE_CONCURRENT_ALLREDUCE_RESPONSE,
819 SLICE_FIND_INTRA_DEP,
820 SLICE_REMOTE_COLLECTIVE_RENDEZVOUS,
821 SLICE_REMOTE_VERSIONING_COLLECTIVE_RENDEZVOUS,
822 SLICE_REMOTE_OUTPUT_EXTENTS,
823 SLICE_REMOTE_OUTPUT_REGISTRATION,
824 DISTRIBUTED_REMOTE_REGISTRATION,
825 DISTRIBUTED_DOWNGRADE_REQUEST,
826 DISTRIBUTED_DOWNGRADE_RESPONSE,
827 DISTRIBUTED_DOWNGRADE_SUCCESS,
828 DISTRIBUTED_DOWNGRADE_UPDATE,
829 DISTRIBUTED_DOWNGRADE_RESTART,
830 DISTRIBUTED_GLOBAL_ACQUIRE_REQUEST,
831 DISTRIBUTED_GLOBAL_ACQUIRE_RESPONSE,
832 DISTRIBUTED_VALID_ACQUIRE_REQUEST,
833 DISTRIBUTED_VALID_ACQUIRE_RESPONSE,
834 SEND_ATOMIC_RESERVATION_REQUEST,
835 SEND_ATOMIC_RESERVATION_RESPONSE,
836 SEND_PADDED_RESERVATION_REQUEST,
837 SEND_PADDED_RESERVATION_RESPONSE,
838 SEND_CREATED_REGION_CONTEXTS,
839 SEND_MATERIALIZED_VIEW,
840 SEND_FILL_VIEW,
841 SEND_FILL_VIEW_VALUE,
842 SEND_PHI_VIEW,
843 SEND_REDUCTION_VIEW,
844 SEND_REPLICATED_VIEW,
845 SEND_ALLREDUCE_VIEW,
846 SEND_INSTANCE_MANAGER,
847 SEND_MANAGER_UPDATE,
848 SEND_COLLECTIVE_DISTRIBUTE_FILL,
849 SEND_COLLECTIVE_DISTRIBUTE_POINT,
850 SEND_COLLECTIVE_DISTRIBUTE_POINTWISE,
851 SEND_COLLECTIVE_DISTRIBUTE_REDUCTION,
852 SEND_COLLECTIVE_DISTRIBUTE_BROADCAST,
853 SEND_COLLECTIVE_DISTRIBUTE_REDUCECAST,
854 SEND_COLLECTIVE_DISTRIBUTE_HOURGLASS,
855 SEND_COLLECTIVE_DISTRIBUTE_ALLREDUCE,
856 SEND_COLLECTIVE_HAMMER_REDUCTION,
857 SEND_COLLECTIVE_FUSE_GATHER,
858 SEND_COLLECTIVE_USER_REQUEST,
859 SEND_COLLECTIVE_USER_RESPONSE,
860 SEND_COLLECTIVE_REGISTER_USER,
861 SEND_COLLECTIVE_REMOTE_INSTANCES_REQUEST,
862 SEND_COLLECTIVE_REMOTE_INSTANCES_RESPONSE,
863 SEND_COLLECTIVE_NEAREST_INSTANCES_REQUEST,
864 SEND_COLLECTIVE_NEAREST_INSTANCES_RESPONSE,
865 SEND_COLLECTIVE_REMOTE_REGISTRATION,
866 SEND_COLLECTIVE_FINALIZE_MAPPING,
867 SEND_COLLECTIVE_VIEW_CREATION,
868 SEND_COLLECTIVE_VIEW_DELETION,
869 SEND_COLLECTIVE_VIEW_RELEASE,
870 SEND_COLLECTIVE_VIEW_NOTIFICATION,
871 SEND_COLLECTIVE_VIEW_MAKE_VALID,
872 SEND_COLLECTIVE_VIEW_MAKE_INVALID,
873 SEND_COLLECTIVE_VIEW_INVALIDATE_REQUEST,
874 SEND_COLLECTIVE_VIEW_INVALIDATE_RESPONSE,
875 SEND_COLLECTIVE_VIEW_ADD_REMOTE_REFERENCE,
876 SEND_COLLECTIVE_VIEW_REMOVE_REMOTE_REFERENCE,
877 SEND_CREATE_TOP_VIEW_REQUEST,
878 SEND_CREATE_TOP_VIEW_RESPONSE,
879 SEND_VIEW_REQUEST,
880 SEND_VIEW_REGISTER_USER,
881 SEND_VIEW_FIND_COPY_PRE_REQUEST,
882 SEND_VIEW_ADD_COPY_USER,
883 SEND_VIEW_FIND_LAST_USERS_REQUEST,
884 SEND_VIEW_FIND_LAST_USERS_RESPONSE,
885 SEND_MANAGER_REQUEST,
886 SEND_FUTURE_RESULT,
887 SEND_FUTURE_RESULT_SIZE,
888 SEND_FUTURE_SUBSCRIPTION,
889 SEND_FUTURE_CREATE_INSTANCE_REQUEST,
890 SEND_FUTURE_CREATE_INSTANCE_RESPONSE,
891 SEND_FUTURE_MAP_REQUEST,
892 SEND_FUTURE_MAP_RESPONSE,
893 SEND_FUTURE_MAP_POINTWISE,
894 SEND_REPL_COMPUTE_EQUIVALENCE_SETS,
895 SEND_REPL_OUTPUT_EQUIVALENCE_SET,
896 SEND_REPL_REFINE_EQUIVALENCE_SETS,
897 SEND_REPL_EQUIVALENCE_SET_NOTIFICATION,
898 SEND_REPL_BROADCAST_UPDATE,
899 SEND_REPL_CREATED_REGIONS,
900 SEND_REPL_TRACE_EVENT_REQUEST,
901 SEND_REPL_TRACE_EVENT_RESPONSE,
902 SEND_REPL_TRACE_EVENT_TRIGGER,
903 SEND_REPL_TRACE_FRONTIER_REQUEST,
904 SEND_REPL_TRACE_FRONTIER_RESPONSE,
905 SEND_REPL_TRACE_UPDATE,
906 SEND_REPL_FIND_TRACE_SETS,
907 SEND_REPL_IMPLICIT_RENDEZVOUS,
908 SEND_REPL_FIND_COLLECTIVE_VIEW,
909 SEND_REPL_POINTWISE_DEPENDENCE,
910 SEND_MAPPER_MESSAGE,
911 SEND_MAPPER_BROADCAST,
912 SEND_TASK_IMPL_SEMANTIC_REQ,
913 SEND_INDEX_SPACE_SEMANTIC_REQ,
914 SEND_INDEX_PARTITION_SEMANTIC_REQ,
915 SEND_FIELD_SPACE_SEMANTIC_REQ,
916 SEND_FIELD_SEMANTIC_REQ,
917 SEND_LOGICAL_REGION_SEMANTIC_REQ,
918 SEND_LOGICAL_PARTITION_SEMANTIC_REQ,
919 SEND_TASK_IMPL_SEMANTIC_INFO,
920 SEND_INDEX_SPACE_SEMANTIC_INFO,
921 SEND_INDEX_PARTITION_SEMANTIC_INFO,
922 SEND_FIELD_SPACE_SEMANTIC_INFO,
923 SEND_FIELD_SEMANTIC_INFO,
924 SEND_LOGICAL_REGION_SEMANTIC_INFO,
925 SEND_LOGICAL_PARTITION_SEMANTIC_INFO,
926 SEND_REMOTE_CONTEXT_REQUEST,
927 SEND_REMOTE_CONTEXT_RESPONSE,
928 SEND_REMOTE_CONTEXT_PHYSICAL_REQUEST,
929 SEND_REMOTE_CONTEXT_PHYSICAL_RESPONSE,
930 SEND_REMOTE_CONTEXT_FIND_COLLECTIVE_VIEW_REQUEST,
931 SEND_REMOTE_CONTEXT_FIND_COLLECTIVE_VIEW_RESPONSE,
932 SEND_REMOTE_CONTEXT_REFINE_EQUIVALENCE_SETS,
933 SEND_REMOTE_CONTEXT_POINTWISE_DEPENDENCE,
934 SEND_REMOTE_CONTEXT_FIND_TRACE_LOCAL_SETS_REQUEST,
935 SEND_REMOTE_CONTEXT_FIND_TRACE_LOCAL_SETS_RESPONSE,
936 SEND_COMPUTE_EQUIVALENCE_SETS_REQUEST,
937 SEND_COMPUTE_EQUIVALENCE_SETS_RESPONSE,
938 SEND_COMPUTE_EQUIVALENCE_SETS_PENDING,
939 SEND_OUTPUT_EQUIVALENCE_SET_REQUEST,
940 SEND_OUTPUT_EQUIVALENCE_SET_RESPONSE,
941 SEND_CANCEL_EQUIVALENCE_SETS_SUBSCRIPTION,
942 SEND_INVALIDATE_EQUIVALENCE_SETS_SUBSCRIPTION,
943 SEND_EQUIVALENCE_SET_CREATION,
944 SEND_EQUIVALENCE_SET_REUSE,
945 SEND_EQUIVALENCE_SET_REQUEST,
946 SEND_EQUIVALENCE_SET_RESPONSE,
947 SEND_EQUIVALENCE_SET_REPLICATION_REQUEST,
948 SEND_EQUIVALENCE_SET_REPLICATION_RESPONSE,
949 SEND_EQUIVALENCE_SET_MIGRATION,
950 SEND_EQUIVALENCE_SET_OWNER_UPDATE,
951 SEND_EQUIVALENCE_SET_CLONE_REQUEST,
952 SEND_EQUIVALENCE_SET_CLONE_RESPONSE,
953 SEND_EQUIVALENCE_SET_CAPTURE_REQUEST,
954 SEND_EQUIVALENCE_SET_CAPTURE_RESPONSE,
955 SEND_EQUIVALENCE_SET_REMOTE_REQUEST_INSTANCES,
956 SEND_EQUIVALENCE_SET_REMOTE_REQUEST_INVALID,
957 SEND_EQUIVALENCE_SET_REMOTE_REQUEST_ANTIVALID,
958 SEND_EQUIVALENCE_SET_REMOTE_UPDATES,
959 SEND_EQUIVALENCE_SET_REMOTE_ACQUIRES,
960 SEND_EQUIVALENCE_SET_REMOTE_RELEASES,
961 SEND_EQUIVALENCE_SET_REMOTE_COPIES_ACROSS,
962 SEND_EQUIVALENCE_SET_REMOTE_OVERWRITES,
963 SEND_EQUIVALENCE_SET_REMOTE_FILTERS,
964 SEND_EQUIVALENCE_SET_REMOTE_INSTANCES,
965 SEND_EQUIVALENCE_SET_FILTER_INVALIDATIONS,
966 SEND_INSTANCE_REQUEST,
967 SEND_INSTANCE_RESPONSE,
968 SEND_EXTERNAL_CREATE_REQUEST,
969 SEND_EXTERNAL_CREATE_RESPONSE,
970 SEND_EXTERNAL_ATTACH,
971 SEND_EXTERNAL_DETACH,
972 SEND_GC_PRIORITY_UPDATE,
973 SEND_GC_REQUEST,
974 SEND_GC_RESPONSE,
975 SEND_GC_ACQUIRE,
976 SEND_GC_FAILED,
977 SEND_GC_MISMATCH,
978 SEND_GC_NOTIFY,
979 SEND_GC_DEBUG_REQUEST,
980 SEND_GC_DEBUG_RESPONSE,
981 SEND_GC_RECORD_EVENT,
982 SEND_ACQUIRE_REQUEST,
983 SEND_ACQUIRE_RESPONSE,
984 SEND_VARIANT_BROADCAST,
985 SEND_CONSTRAINT_REQUEST,
986 SEND_CONSTRAINT_RESPONSE,
987 SEND_CONSTRAINT_RELEASE,
988 SEND_TOP_LEVEL_TASK_COMPLETE,
989 SEND_MPI_RANK_EXCHANGE,
990 SEND_REPLICATE_DISTRIBUTION,
991 SEND_REPLICATE_COLLECTIVE_VERSIONING,
992 SEND_REPLICATE_COLLECTIVE_MAPPING,
993 SEND_REPLICATE_VIRTUAL_RENDEZVOUS,
994 SEND_REPLICATE_STARTUP_COMPLETE,
995 SEND_REPLICATE_POST_MAPPED,
996 SEND_REPLICATE_TRIGGER_COMPLETE,
997 SEND_REPLICATE_TRIGGER_COMMIT,
998 SEND_CONTROL_REPLICATE_RENDEZVOUS_MESSAGE,
999 SEND_LIBRARY_MAPPER_REQUEST,
1000 SEND_LIBRARY_MAPPER_RESPONSE,
1001 SEND_LIBRARY_TRACE_REQUEST,
1002 SEND_LIBRARY_TRACE_RESPONSE,
1003 SEND_LIBRARY_PROJECTION_REQUEST,
1004 SEND_LIBRARY_PROJECTION_RESPONSE,
1005 SEND_LIBRARY_SHARDING_REQUEST,
1006 SEND_LIBRARY_SHARDING_RESPONSE,
1007 SEND_LIBRARY_CONCURRENT_REQUEST,
1008 SEND_LIBRARY_CONCURRENT_RESPONSE,
1009 SEND_LIBRARY_TASK_REQUEST,
1010 SEND_LIBRARY_TASK_RESPONSE,
1011 SEND_LIBRARY_REDOP_REQUEST,
1012 SEND_LIBRARY_REDOP_RESPONSE,
1013 SEND_LIBRARY_SERDEZ_REQUEST,
1014 SEND_LIBRARY_SERDEZ_RESPONSE,
1015 SEND_REMOTE_OP_REPORT_UNINIT,
1016 SEND_REMOTE_OP_PROFILING_COUNT_UPDATE,
1017 SEND_REMOTE_OP_COMPLETION_EFFECT,
1018 SEND_REMOTE_TRACE_UPDATE,
1019 SEND_REMOTE_TRACE_RESPONSE,
1020 SEND_FREE_EXTERNAL_ALLOCATION,
1021 SEND_NOTIFY_COLLECTED_INSTANCES,
1022 SEND_CREATE_MEMORY_POOL_REQUEST,
1023 SEND_CREATE_MEMORY_POOL_RESPONSE,
1024 SEND_CREATE_FUTURE_INSTANCE_REQUEST,
1025 SEND_CREATE_FUTURE_INSTANCE_RESPONSE,
1026 SEND_FREE_FUTURE_INSTANCE,
1027 SEND_REMOTE_DISTRIBUTED_ID_REQUEST,
1028 SEND_REMOTE_DISTRIBUTED_ID_RESPONSE,
1029 SEND_CONTROL_REPLICATION_FUTURE_ALLREDUCE,
1030 SEND_CONTROL_REPLICATION_FUTURE_BROADCAST,
1031 SEND_CONTROL_REPLICATION_FUTURE_REDUCTION,
1032 SEND_CONTROL_REPLICATION_VALUE_ALLREDUCE,
1033 SEND_CONTROL_REPLICATION_VALUE_BROADCAST,
1034 SEND_CONTROL_REPLICATION_VALUE_EXCHANGE,
1035 SEND_CONTROL_REPLICATION_BUFFER_BROADCAST,
1036 SEND_CONTROL_REPLICATION_SHARD_SYNC_TREE,
1037 SEND_CONTROL_REPLICATION_SHARD_EVENT_TREE,
1038 SEND_CONTROL_REPLICATION_SINGLE_TASK_TREE,
1039 SEND_CONTROL_REPLICATION_CROSS_PRODUCT_PARTITION,
1040 SEND_CONTROL_REPLICATION_SHARDING_GATHER_COLLECTIVE,
1041 SEND_CONTROL_REPLICATION_INDIRECT_COPY_EXCHANGE,
1042 SEND_CONTROL_REPLICATION_FIELD_DESCRIPTOR_EXCHANGE,
1043 SEND_CONTROL_REPLICATION_FIELD_DESCRIPTOR_GATHER,
1044 SEND_CONTROL_REPLICATION_DEPPART_RESULT_SCATTER,
1045 SEND_CONTROL_REPLICATION_BUFFER_EXCHANGE,
1046 SEND_CONTROL_REPLICATION_FUTURE_NAME_EXCHANGE,
1047 SEND_CONTROL_REPLICATION_MUST_EPOCH_MAPPING_BROADCAST,
1048 SEND_CONTROL_REPLICATION_MUST_EPOCH_MAPPING_EXCHANGE,
1049 SEND_CONTROL_REPLICATION_MUST_EPOCH_DEPENDENCE_EXCHANGE,
1050 SEND_CONTROL_REPLICATION_MUST_EPOCH_COMPLETION_EXCHANGE,
1051 SEND_CONTROL_REPLICATION_CHECK_COLLECTIVE_MAPPING,
1052 SEND_CONTROL_REPLICATION_CHECK_COLLECTIVE_SOURCES,
1053 SEND_CONTROL_REPLICATION_TEMPLATE_INDEX_EXCHANGE,
1054 SEND_CONTROL_REPLICATION_UNORDERED_EXCHANGE,
1055 SEND_CONTROL_REPLICATION_CONSENSUS_MATCH,
1056 SEND_CONTROL_REPLICATION_VERIFY_CONTROL_REPLICATION_EXCHANGE,
1057 SEND_CONTROL_REPLICATION_OUTPUT_SIZE_EXCHANGE,
1058 SEND_CONTROL_REPLICATION_INDEX_ATTACH_LAUNCH_SPACE,
1059 SEND_CONTROL_REPLICATION_INDEX_ATTACH_UPPER_BOUND,
1060 SEND_CONTROL_REPLICATION_INDEX_ATTACH_EXCHANGE,
1061 SEND_CONTROL_REPLICATION_SHARD_PARTICIPANTS_EXCHANGE,
1062 SEND_CONTROL_REPLICATION_IMPLICIT_SHARDING_FUNCTOR,
1063 SEND_CONTROL_REPLICATION_CREATE_FILL_VIEW,
1064 SEND_CONTROL_REPLICATION_VERSIONING_RENDEZVOUS,
1065 SEND_CONTROL_REPLICATION_VIEW_RENDEZVOUS,
1066 SEND_CONTROL_REPLICATION_CONCURRENT_MAPPING_RENDEZVOUS,
1067 SEND_CONTROL_REPLICATION_CONCURRENT_ALLREDUCE,
1068 SEND_CONTROL_REPLICATION_PROJECTION_TREE_EXCHANGE,
1069 SEND_CONTROL_REPLICATION_TIMEOUT_MATCH_EXCHANGE,
1070 SEND_CONTROL_REPLICATION_MASK_EXCHANGE,
1071 SEND_CONTROL_REPLICATION_PREDICATE_EXCHANGE,
1072 SEND_CONTROL_REPLICATION_CROSS_PRODUCT_EXCHANGE,
1073 SEND_CONTROL_REPLICATION_TRACING_SET_DEDUPLICATION,
1074 SEND_CONTROL_REPLICATION_POINTWISE_ALLREDUCE,
1075 SEND_CONTROL_REPLICATION_SLOW_BARRIER,
1076 SEND_PROFILER_EVENT_TRIGGER,
1077 SEND_PROFILER_EVENT_POISON,
1078 SEND_SHUTDOWN_NOTIFICATION,
1079 SEND_SHUTDOWN_RESPONSE,
1080 LAST_SEND_KIND, // This one must be last
1081 };
1082
1083#define LG_MESSAGE_DESCRIPTIONS(name) \
1084 const char *name[LAST_SEND_KIND] = { \
1085 "Send Startup Barrier", \
1086 "Task Message", \
1087 "Steal Message", \
1088 "Advertisement Message", \
1089 "Send Registration Callback", \
1090 "Send Remote Task Replay", \
1091 "Send Remote Task Profiling Response", \
1092 "Send Shared Ownership", \
1093 "Send Index Space Request", \
1094 "Send Index Space Response", \
1095 "Send Index Space Return", \
1096 "Send Index Space Set", \
1097 "Send Index Space Child Request", \
1098 "Send Index Space Child Response", \
1099 "Send Index Space Colors Request", \
1100 "Send Index Space Colors Response", \
1101 "Send Index Space Generate Color Request", \
1102 "Send Index Space Generate Color Response", \
1103 "Send Index Space Release Color", \
1104 "Send Index Partition Notification", \
1105 "Send Index Partition Request", \
1106 "Send Index Partition Response", \
1107 "Send Index Partition Return", \
1108 "Send Index Partition Child Request", \
1109 "Send Index Partition Child Response", \
1110 "Send Index Partition Child Replication", \
1111 "Send Index Partition Disjoint Update", \
1112 "Send Index Partition Shard Rects Request", \
1113 "Send Index Partition Shard Rects Response", \
1114 "Send Index Partition Remote Interference Request", \
1115 "Send Index Partition Remote Interference Response", \
1116 "Send Field Space Node", \
1117 "Send Field Space Request", \
1118 "Send Field Space Return", \
1119 "Send Field Space Allocator Request", \
1120 "Send Field Space Allocator Response", \
1121 "Send Field Space Allocator Invalidation", \
1122 "Send Field Space Allocator Flush", \
1123 "Send Field Space Allocator Free", \
1124 "Send Field Space Infos Request", \
1125 "Send Field Space Infos Response", \
1126 "Send Field Alloc Request", \
1127 "Send Field Size Update", \
1128 "Send Field Free", \
1129 "Send Field Free Indexes", \
1130 "Send Field Space Layout Invalidation", \
1131 "Send Local Field Alloc Request", \
1132 "Send Local Field Alloc Response", \
1133 "Send Local Field Free", \
1134 "Send Local Field Update", \
1135 "Send Top Level Region Request", \
1136 "Send Top Level Region Return", \
1137 "Index Space Destruction", \
1138 "Index Partition Destruction", \
1139 "Field Space Destruction", \
1140 "Logical Region Destruction", \
1141 "Individual Remote Future Size", \
1142 "Individual Remote Output Region Registration", \
1143 "Individual Remote Mapped", \
1144 "Individual Remote Complete", \
1145 "Individual Remote Commit", \
1146 "Individual Concurrent Request", \
1147 "Individual Concurrent Response", \
1148 "Slice Remote Mapped", \
1149 "Slice Remote Complete", \
1150 "Slice Remote Commit", \
1151 "Slice Rendezvous Concurrent Mapped", \
1152 "Slice Collective Unbounded Pools Allreduce Request", \
1153 "Slice Collective Unbounded Pools Allreduce Response", \
1154 "Slice Concurrent Allreduce Request", \
1155 "Slice Concurrent Allreduce Response", \
1156 "Slice Find Intra-Space Dependence", \
1157 "Slice Remote Collective Rendezvous", \
1158 "Slice Remote Collective Versioning Rendezvous", \
1159 "Slice Remote Output Region Extents", \
1160 "Slice Remote Output Region Registration", \
1161 "Distributed Remote Registration", \
1162 "Distributed Downgrade Request", \
1163 "Distributed Downgrade Response", \
1164 "Distributed Downgrade Success", \
1165 "Distributed Downgrade Update", \
1166 "Distributed Downgrade Restart", \
1167 "Distributed Global Acquire Request", \
1168 "Distributed Global Acquire Response", \
1169 "Distributed Valid Acquire Request", \
1170 "Distributed Valid Acquire Response", \
1171 "Send Atomic Reservation Request", \
1172 "Send Atomic Reservation Response", \
1173 "Send Padded Reservation Request", \
1174 "Send Padded Reservation Response", \
1175 "Send Created Region Contexts", \
1176 "Send Materialized View", \
1177 "Send Fill View", \
1178 "Send Fill View Value", \
1179 "Send Phi View", \
1180 "Send Reduction View", \
1181 "Send Replicated View", \
1182 "Send Allreduce View", \
1183 "Send Instance Manager", \
1184 "Send Manager Update", \
1185 "Send Collective Distribute Fill", \
1186 "Send Collective Distribute Point", \
1187 "Send Collective Distribute Pointwise", \
1188 "Send Collective Distribute Reduction", \
1189 "Send Collective Distribute Broadcast", \
1190 "Send Collective Distribute Reducecast", \
1191 "Send Collective Distribute Hourglass", \
1192 "Send Collective Distribute Allreduce", \
1193 "Send Collective Hammer Reduction", \
1194 "Send Collective Fuse Gather", \
1195 "Send Collective User Request", \
1196 "Send Collective User Response", \
1197 "Send Collective Individual Register User", \
1198 "Send Collective Remote Instances Request", \
1199 "Send Collective Remote Instances Response", \
1200 "Send Collective Nearest Instances Request", \
1201 "Send Collective Nearest Instances Response", \
1202 "Send Collective Remote Registration", \
1203 "Send Collective Finalize Mapping", \
1204 "Send Collective View Creation", \
1205 "Send Collective View Deletion", \
1206 "Send Collective View Release", \
1207 "Send Collective View Deletion Notification", \
1208 "Send Collective View Make Valid", \
1209 "Send Collective View Make Invalid", \
1210 "Send Collective View Invalidate Request", \
1211 "Send Collective View Invalidate Response", \
1212 "Send Collective View Add Remote Reference", \
1213 "Send Collective View Remove Remote Reference", \
1214 "Send Create Top View Request", \
1215 "Send Create Top View Response", \
1216 "Send View Request", \
1217 "Send View Register User", \
1218 "Send View Find Copy Preconditions Request", \
1219 "Send View Add Copy User", \
1220 "Send View Find Last Users Request", \
1221 "Send View Find Last Users Response", \
1222 "Send Manager Request", \
1223 "Send Future Result", \
1224 "Send Future Result Size", \
1225 "Send Future Subscription", \
1226 "Send Future Create Instance Request", \
1227 "Send Future Create Instance Response", \
1228 "Send Future Map Future Request", \
1229 "Send Future Map Future Response", \
1230 "Send Future Map Find Pointwise Dependence", \
1231 "Send Replicate Compute Equivalence Sets", \
1232 "Send Replicate Register Output Equivalence Set", \
1233 "Send Replicate Refine Equivalence Sets", \
1234 "Send Replicate Equivalence Set Notification", \
1235 "Send Replicate Broadcast Update", \
1236 "Send Replicate Created Regions Return", \
1237 "Send Replicate Trace Event Request", \
1238 "Send Replicate Trace Event Response", \
1239 "Send Replicate Trace Event Trigger", \
1240 "Send Replicate Trace Frontier Request", \
1241 "Send Replicate Trace Frontier Response", \
1242 "Send Replicate Trace Update", \
1243 "Send Replicate Find Trace Local Sets", \
1244 "Send Replicate Implicit Rendezvous", \
1245 "Send Replicate Find or Create Collective View", \
1246 "Send Replicate Find Pointwise Dependence", \
1247 "Send Mapper Message", \
1248 "Send Mapper Broadcast", \
1249 "Send Task Impl Semantic Req", \
1250 "Send Index Space Semantic Req", \
1251 "Send Index Partition Semantic Req", \
1252 "Send Field Space Semantic Req", \
1253 "Send Field Semantic Req", \
1254 "Send Logical Region Semantic Req", \
1255 "Send Logical Partition Semantic Req", \
1256 "Send Task Impl Semantic Info", \
1257 "Send Index Space Semantic Info", \
1258 "Send Index Partition Semantic Info", \
1259 "Send Field Space Semantic Info", \
1260 "Send Field Semantic Info", \
1261 "Send Logical Region Semantic Info", \
1262 "Send Logical Partition Semantic Info", \
1263 "Send Remote Context Request", \
1264 "Send Remote Context Response", \
1265 "Send Remote Context Physical Request", \
1266 "Send Remote Context Physical Response", \
1267 "Send Remote Context Find Collective View Request", \
1268 "Send Remote Context Find Collective View Response", \
1269 "Send Remote Context Refine Equivalence Sets", \
1270 "Send Remote Context Pointwise Dependence", \
1271 "Send Remote Context Find Trace Local Sets Request", \
1272 "Send Remote Context Find Trace Local Sets Response", \
1273 "Send Compute Equivalence Sets Request", \
1274 "Send Compute Equivalence Sets Response", \
1275 "Send Compute Equivalence Sets Pending", \
1276 "Send Register Output Equivalence Set Request", \
1277 "Send Register Output Equivalence Set Response", \
1278 "Send Cancel Equivalence Sets Subscription", \
1279 "Send Invalidate Equivalence Sets Subscription", \
1280 "Send Equivalence Set Creation", \
1281 "Send Equivalence Set Reuse", \
1282 "Send Equivalence Set Request", \
1283 "Send Equivalence Set Response", \
1284 "Send Equivalence Set Replication Request", \
1285 "Send Equivalence Set Replication Response", \
1286 "Send Equivalence Set Migration", \
1287 "Send Equivalence Set Owner Update", \
1288 "Send Equivalence Set Clone Request", \
1289 "Send Equivalence Set Clone Response", \
1290 "Send Equivalence Set Tracing Capture Request", \
1291 "Send Equivalence Set Tracing Capture Response", \
1292 "Send Equivalence Set Remote Request Instances", \
1293 "Send Equivalence Set Remote Request Invalid", \
1294 "Send Equivalence Set Remote Request Antivalid", \
1295 "Send Equivalence Set Remote Updates", \
1296 "Send Equivalence Set Remote Acquires", \
1297 "Send Equivalence Set Remote Releases", \
1298 "Send Equivalence Set Remote Copies Across", \
1299 "Send Equivalence Set Remote Overwrites", \
1300 "Send Equivalence Set Remote Filters", \
1301 "Send Equivalence Set Remote Instances", \
1302 "Send Equivalence Set Filter Invalidations", \
1303 "Send Instance Request", \
1304 "Send Instance Response", \
1305 "Send External Create Request", \
1306 "Send External Create Response", \
1307 "Send External Attach", \
1308 "Send External Detach", \
1309 "Send GC Priority Update", \
1310 "Send GC Request", \
1311 "Send GC Response", \
1312 "Send GC Acquire Request", \
1313 "Send GC Acquire Failed", \
1314 "Send GC Packed Reference Mismatch", \
1315 "Send GC Notify Collected", \
1316 "Send GC Debug Request", \
1317 "Send GC Debug Response", \
1318 "Send GC Record Event", \
1319 "Send Acquire Request", \
1320 "Send Acquire Response", \
1321 "Send Task Variant Broadcast", \
1322 "Send Constraint Request", \
1323 "Send Constraint Response", \
1324 "Send Constraint Release", \
1325 "Top Level Task Complete", \
1326 "Send MPI Rank Exchange", \
1327 "Send Replication Distribution", \
1328 "Send Replication Collective Versioning", \
1329 "Send Replication Collective Mapping", \
1330 "Send Replication Virtual Mapping Rendezvous", \
1331 "Send Replication Startup Complete", \
1332 "Send Replication Post Mapped", \
1333 "Send Replication Trigger Complete", \
1334 "Send Replication Trigger Commit", \
1335 "Send Control Replication Rendezvous Message", \
1336 "Send Library Mapper Request", \
1337 "Send Library Mapper Response", \
1338 "Send Library Trace Request", \
1339 "Send Library Trace Response", \
1340 "Send Library Projection Request", \
1341 "Send Library Projection Response", \
1342 "Send Library Sharding Request", \
1343 "Send Library Sharding Response", \
1344 "Send Library Concurrent Request", \
1345 "Send Library Concurrent Response", \
1346 "Send Library Task Request", \
1347 "Send Library Task Response", \
1348 "Send Library Redop Request", \
1349 "Send Library Redop Response", \
1350 "Send Library Serdez Request", \
1351 "Send Library Serdez Response", \
1352 "Remote Op Report Uninitialized", \
1353 "Remote Op Profiling Count Update", \
1354 "Remote Op Completion Effect", \
1355 "Send Remote Trace Update", \
1356 "Send Remote Trace Response", \
1357 "Send Free External Allocation", \
1358 "Send Notify Collected Instances", \
1359 "Send Create Memory Pool Request", \
1360 "Send Create Memory Pool Response", \
1361 "Send Create Future Instance Request", \
1362 "Send Create Future Instance Response", \
1363 "Send Free Future Instance", \
1364 "Send Remote Distributed ID Request", \
1365 "Send Remote Distributed ID Response", \
1366 "Control Replication Collective Future All-Reduce", \
1367 "Control Replication Collective Future Broadcast", \
1368 "Control Replication Collective Future Reduction", \
1369 "Control Replication Collective Value All-Reduce", \
1370 "Control Replication Collective Value Broadcast", \
1371 "Control Replication Collective Value Exchange", \
1372 "Control Replication Collective Buffer Broadcast", \
1373 "Control Replication Collective Shard Sync Tree", \
1374 "Control Replication Collective Shard Event Tree", \
1375 "Control Replication Collective Single Task Tree", \
1376 "Control Replication Collective Cross Product Partition", \
1377 "Control Replication Collective Sharding Gather Collective", \
1378 "Control Replication Collective Indirect Copy Exchange", \
1379 "Control Replication Collective Field Descriptor Exchange", \
1380 "Control Replication Collective Field Descriptor Gather", \
1381 "Control Replication Collective Deppart Result Scatter", \
1382 "Control Replication Collective Buffer Exchange", \
1383 "Control Replication Collective Future Name Exchange", \
1384 "Control Replication Collective Must Epoch Mapping Broadcast",\
1385 "Control Replication Collective Must Epoch Mapping Exchange", \
1386 "Control Replication Collective Must Epoch Dependence Exchange",\
1387 "Control Replication Collective Must Epoch Completion Exchange",\
1388 "Control Replication Collective Check Mapping", \
1389 "Control Replication Collective Check Sources", \
1390 "Control Replication Collective Template Index Exchange", \
1391 "Control Replication Collective Unordered Exchange", \
1392 "Control Replication Collective Consensus Match", \
1393 "Control Replication Collective Verify Control Replication Exchange",\
1394 "Control Replication Collective Output Size Exchange", \
1395 "Control Replication Collective Index Attach Launch Space", \
1396 "Control Replication Collective Index Attach Upper Bound", \
1397 "Control Replication Collective Index Attach Exchange", \
1398 "Control Replication Collective Shard Participants Exchange", \
1399 "Control Replication Collective Implicit Sharding Functor", \
1400 "Control Replication Collective Create Fill View", \
1401 "Control Replication Collective Versioning Rendezvous", \
1402 "Control Replication Collective View Rendezvous", \
1403 "Control Replication Collective Concurrent Mapping Rendezvous",\
1404 "Control Replication Collective Concurrent Allreduce", \
1405 "Control Replication Collective Projection Tree Exchange", \
1406 "Control Replication Collective Timeout Match Exchange", \
1407 "Control Replication Collective Mask Exchange", \
1408 "Control Replication Collective Predicate Exchange", \
1409 "Control Replication Collective Cross Product Exchange", \
1410 "Control Replication Collective Tracing Set Deduplication", \
1411 "Control Replication Collective Pointwise Allreduce", \
1412 "Control Replication Collective Slow Barrier", \
1413 "Send Profiler Event Trigger", \
1414 "Send Profiler Event Poison", \
1415 "Send Shutdown Notification", \
1416 "Send Shutdown Response", \
1417 };
1418
1419 // Runtime task numbering
1420 enum {
1421 LG_STARTUP_TASK_ID = Realm::Processor::TASK_ID_PROCESSOR_INIT,
1422 LG_SHUTDOWN_TASK_ID = Realm::Processor::TASK_ID_PROCESSOR_SHUTDOWN,
1423 LG_TASK_ID = Realm::Processor::TASK_ID_FIRST_AVAILABLE,
1424#ifdef LEGION_SEPARATE_META_TASKS
1425 LG_LEGION_PROFILING_ID = LG_TASK_ID+LG_LAST_TASK_ID+LAST_SEND_KIND,
1426 LG_ENDPOINT_TASK_ID = LG_TASK_ID+LG_LAST_TASK_ID+LAST_SEND_KIND+1,
1427 LG_APP_PROC_TASK_ID = LG_TASK_ID+LG_LAST_TASK_ID+LAST_SEND_KIND+2,
1428 LG_TASK_ID_AVAILABLE = LG_APP_PROC_TASK_ID+LG_LAST_TASK_ID,
1429#else
1430 LG_LEGION_PROFILING_ID = LG_TASK_ID+1,
1431 LG_ENDPOINT_TASK_ID = LG_TASK_ID+2,
1432 LG_APP_PROC_TASK_ID = LG_TASK_ID+3,
1433 LG_TASK_ID_AVAILABLE = LG_TASK_ID+4,
1434#endif
1435 };
1436
1437 enum RuntimeCallKind {
1438 // Mapper runtime call kinds
1439 MAPPER_SEND_MESSAGE_CALL,
1440 MAPPER_BROADCAST_CALL,
1441 MAPPER_UNPACK_INSTANCE_CALL,
1442 MAPPER_CREATE_EVENT_CALL,
1443 MAPPER_HAS_TRIGGERED_CALL,
1444 MAPPER_TRIGGER_EVENT_CALL,
1445 MAPPER_WAIT_EVENT_CALL,
1446 MAPPER_FIND_EXECUTION_CONSTRAINTS_CALL,
1447 MAPPER_FIND_TASK_LAYOUT_CONSTRAINTS_CALL,
1448 MAPPER_FIND_LAYOUT_CONSTRAINTS_CALL,
1449 MAPPER_REGISTER_LAYOUT_CALL,
1450 MAPPER_RELEASE_LAYOUT_CALL,
1451 MAPPER_CONSTRAINTS_CONFLICT_CALL,
1452 MAPPER_CONSTRAINTS_ENTAIL_CALL,
1453 MAPPER_FIND_VALID_VARIANTS_CALL,
1454 MAPPER_FIND_TASK_VARIANT_NAME_CALL,
1455 MAPPER_IS_LEAF_VARIANT_CALL,
1456 MAPPER_IS_INNER_VARIANT_CALL,
1457 MAPPER_IS_IDEMPOTENT_VARIANT_CALL,
1458 MAPPER_IS_REPLICABLE_VARIANT_CALL,
1459 MAPPER_REGISTER_TASK_VARIANT_CALL,
1460 MAPPER_FILTER_VARIANTS_CALL,
1461 MAPPER_FILTER_INSTANCES_CALL,
1462 MAPPER_CREATE_PHYSICAL_INSTANCE_CALL,
1463 MAPPER_FIND_OR_CREATE_PHYSICAL_INSTANCE_CALL,
1464 MAPPER_REDISTRICT_INSTANCE_CALL,
1465 MAPPER_FIND_PHYSICAL_INSTANCE_CALL,
1466 MAPPER_FIND_PHYSICAL_INSTANCES_CALL,
1467 MAPPER_SET_GC_PRIORITY_CALL,
1468 MAPPER_ACQUIRE_INSTANCE_CALL,
1469 MAPPER_ACQUIRE_INSTANCES_CALL,
1470 MAPPER_ACQUIRE_AND_FILTER_INSTANCES_CALL,
1471 MAPPER_RELEASE_INSTANCE_CALL,
1472 MAPPER_RELEASE_INSTANCES_CALL,
1473 MAPPER_SUBSCRIBE_INSTANCE_CALL,
1474 MAPPER_UNSUBSCRIBE_INSTANCE_CALL,
1475 MAPPER_COLLECT_INSTANCE_CALL,
1476 MAPPER_COLLECT_INSTANCES_CALL,
1477 MAPPER_ACQUIRE_FUTURE_CALL,
1478 MAPPER_ACQUIRE_POOL_CALL,
1479 MAPPER_RELEASE_POOL_CALL,
1480 MAPPER_CREATE_INDEX_SPACE_CALL,
1481 MAPPER_UNION_INDEX_SPACES_CALL,
1482 MAPPER_INTERSECT_INDEX_SPACES_CALL,
1483 MAPPER_SUBTRACT_INDEX_SPACES_CALL,
1484 MAPPER_INDEX_SPACE_EMPTY_CALL,
1485 MAPPER_INDEX_SPACES_OVERLAP_CALL,
1486 MAPPER_INDEX_SPACE_DOMINATES_CALL,
1487 MAPPER_HAS_INDEX_PARTITION_CALL,
1488 MAPPER_GET_INDEX_PARTITION_CALL,
1489 MAPPER_GET_INDEX_SUBSPACE_CALL,
1490 MAPPER_GET_INDEX_SPACE_DOMAIN_CALL,
1491 MAPPER_GET_INDEX_PARTITION_CS_CALL,
1492 MAPPER_GET_INDEX_PARTITION_CS_NAME_CALL,
1493 MAPPER_GET_INDEX_SPACE_PARTITION_COLORS_CALL,
1494 MAPPER_IS_INDEX_PARTITION_DISJOINT_CALL,
1495 MAPPER_IS_INDEX_PARTITION_COMPLETE_CALL,
1496 MAPPER_GET_INDEX_SPACE_COLOR_CALL,
1497 MAPPER_GET_INDEX_SPACE_COLOR_POINT_CALL,
1498 MAPPER_GET_INDEX_PARTITION_COLOR_CALL,
1499 MAPPER_GET_PARENT_INDEX_SPACE_CALL,
1500 MAPPER_HAS_PARENT_INDEX_PARTITION_CALL,
1501 MAPPER_GET_PARENT_INDEX_PARTITION_CALL,
1502 MAPPER_GET_INDEX_SPACE_DEPTH_CALL,
1503 MAPPER_GET_INDEX_PARTITION_DEPTH_CALL,
1504 MAPPER_GET_FIELD_SIZE_CALL,
1505 MAPPER_GET_FIELD_SPACE_FIELDS_CALL,
1506 MAPPER_GET_LOGICAL_PARTITION_CALL,
1507 MAPPER_GET_LOGICAL_PARTITION_BY_COLOR_CALL,
1508 MAPPER_GET_LOGICAL_PARTITION_BY_TREE_CALL,
1509 MAPPER_GET_LOGICAL_SUBREGION_CALL,
1510 MAPPER_GET_LOGICAL_SUBREGION_BY_COLOR_CALL,
1511 MAPPER_GET_LOGICAL_SUBREGION_BY_TREE_CALL,
1512 MAPPER_GET_LOGICAL_REGION_COLOR_CALL,
1513 MAPPER_GET_LOGICAL_REGION_COLOR_POINT_CALL,
1514 MAPPER_GET_LOGICAL_PARTITION_COLOR_CALL,
1515 MAPPER_GET_PARENT_LOGICAL_REGION_CALL,
1516 MAPPER_HAS_PARENT_LOGICAL_PARTITION_CALL,
1517 MAPPER_GET_PARENT_LOGICAL_PARTITION_CALL,
1518 MAPPER_RETRIEVE_SEMANTIC_INFO_CALL,
1519 MAPPER_RETRIEVE_NAME_CALL,
1520 MAPPER_AUTO_LOCK_CALL,
1521 MAPPER_FIND_COLLECTIVE_INSTANCES_IN_MEMORY,
1522 MAPPER_FIND_COLLECTIVE_INSTANCES_NEAREST_MEMORY,
1523 // Old runtime call kinds
1524 PACK_BASE_TASK_CALL,
1525 UNPACK_BASE_TASK_CALL,
1526 TASK_PRIVILEGE_CHECK_CALL,
1527 CLONE_TASK_CALL,
1528 COMPUTE_POINT_REQUIREMENTS_CALL,
1529 INTRA_TASK_ALIASING_CALL,
1530 ACTIVATE_SINGLE_CALL,
1531 DEACTIVATE_SINGLE_CALL,
1532 SELECT_INLINE_VARIANT_CALL,
1533 INLINE_CHILD_TASK_CALL,
1534 PACK_SINGLE_TASK_CALL,
1535 UNPACK_SINGLE_TASK_CALL,
1536 PACK_REMOTE_CONTEXT_CALL,
1537 HAS_CONFLICTING_INTERNAL_CALL,
1538 FIND_CONFLICTING_CALL,
1539 FIND_CONFLICTING_INTERNAL_CALL,
1540 CHECK_REGION_DEPENDENCE_CALL,
1541 FIND_PARENT_REGION_REQ_CALL,
1542 FIND_PARENT_REGION_CALL,
1543 CHECK_PRIVILEGE_CALL,
1544 TRIGGER_SINGLE_CALL,
1545 INITIALIZE_MAP_TASK_CALL,
1546 FINALIZE_MAP_TASK_CALL,
1547 VALIDATE_VARIANT_SELECTION_CALL,
1548 MAP_ALL_REGIONS_CALL,
1549 INITIALIZE_REGION_TREE_CONTEXTS_CALL,
1550 INVALIDATE_REGION_TREE_CONTEXTS_CALL,
1551 CREATE_INSTANCE_TOP_VIEW_CALL,
1552 LAUNCH_TASK_CALL,
1553 ACTIVATE_MULTI_CALL,
1554 DEACTIVATE_MULTI_CALL,
1555 SLICE_INDEX_SPACE_CALL,
1556 CLONE_MULTI_CALL,
1557 MULTI_TRIGGER_EXECUTION_CALL,
1558 PACK_MULTI_CALL,
1559 UNPACK_MULTI_CALL,
1560 ACTIVATE_INDIVIDUAL_CALL,
1561 DEACTIVATE_INDIVIDUAL_CALL,
1562 INDIVIDUAL_PERFORM_MAPPING_CALL,
1563 INDIVIDUAL_RETURN_VIRTUAL_CALL,
1564 INDIVIDUAL_TRIGGER_COMPLETE_CALL,
1565 INDIVIDUAL_TRIGGER_COMMIT_CALL,
1566 INDIVIDUAL_POST_MAPPED_CALL,
1567 INDIVIDUAL_PACK_TASK_CALL,
1568 INDIVIDUAL_UNPACK_TASK_CALL,
1569 INDIVIDUAL_PACK_REMOTE_COMPLETE_CALL,
1570 INDIVIDUAL_UNPACK_REMOTE_COMPLETE_CALL,
1571 POINT_ACTIVATE_CALL,
1572 POINT_DEACTIVATE_CALL,
1573 POINT_TASK_COMPLETE_CALL,
1574 POINT_TASK_COMMIT_CALL,
1575 POINT_PACK_TASK_CALL,
1576 POINT_UNPACK_TASK_CALL,
1577 POINT_TASK_POST_MAPPED_CALL,
1578 REMOTE_TASK_ACTIVATE_CALL,
1579 REMOTE_TASK_DEACTIVATE_CALL,
1580 REMOTE_UNPACK_CONTEXT_CALL,
1581 INDEX_ACTIVATE_CALL,
1582 INDEX_DEACTIVATE_CALL,
1583 INDEX_COMPUTE_FAT_PATH_CALL,
1584 INDEX_PREMAP_TASK_CALL,
1585 INDEX_DISTRIBUTE_CALL,
1586 INDEX_PERFORM_MAPPING_CALL,
1587 INDEX_COMPLETE_CALL,
1588 INDEX_COMMIT_CALL,
1589 INDEX_PERFORM_INLINING_CALL,
1590 INDEX_CLONE_AS_SLICE_CALL,
1591 INDEX_HANDLE_FUTURE,
1592 INDEX_RETURN_SLICE_MAPPED_CALL,
1593 INDEX_RETURN_SLICE_COMPLETE_CALL,
1594 INDEX_RETURN_SLICE_COMMIT_CALL,
1595 SLICE_ACTIVATE_CALL,
1596 SLICE_DEACTIVATE_CALL,
1597 SLICE_APPLY_VERSION_INFO_CALL,
1598 SLICE_DISTRIBUTE_CALL,
1599 SLICE_PERFORM_MAPPING_CALL,
1600 SLICE_LAUNCH_CALL,
1601 SLICE_MAP_AND_LAUNCH_CALL,
1602 SLICE_PACK_TASK_CALL,
1603 SLICE_UNPACK_TASK_CALL,
1604 SLICE_CLONE_AS_SLICE_CALL,
1605 SLICE_HANDLE_FUTURE_CALL,
1606 SLICE_CLONE_AS_POINT_CALL,
1607 SLICE_ENUMERATE_POINTS_CALL,
1608 SLICE_MAPPED_CALL,
1609 SLICE_COMPLETE_CALL,
1610 SLICE_COMMIT_CALL,
1611 REALM_SPAWN_META_CALL,
1612 REALM_SPAWN_TASK_CALL,
1613 REALM_CREATE_INSTANCE_CALL,
1614 REALM_ISSUE_COPY_CALL,
1615 REALM_ISSUE_FILL_CALL,
1616 REGION_TREE_LOGICAL_ANALYSIS_CALL,
1617 REGION_TREE_LOGICAL_FENCE_CALL,
1618 REGION_TREE_VERSIONING_ANALYSIS_CALL,
1619 REGION_TREE_ADVANCE_VERSION_NUMBERS_CALL,
1620 REGION_TREE_INITIALIZE_CONTEXT_CALL,
1621 REGION_TREE_INVALIDATE_CONTEXT_CALL,
1622 REGION_TREE_PREMAP_ONLY_CALL,
1623 REGION_TREE_PHYSICAL_REGISTER_ONLY_CALL,
1624 REGION_TREE_PHYSICAL_REGISTER_USERS_CALL,
1625 REGION_TREE_PHYSICAL_PERFORM_CLOSE_CALL,
1626 REGION_TREE_PHYSICAL_CLOSE_CONTEXT_CALL,
1627 REGION_TREE_PHYSICAL_COPY_ACROSS_CALL,
1628 REGION_TREE_PHYSICAL_REDUCE_ACROSS_CALL,
1629 REGION_TREE_PHYSICAL_CONVERT_MAPPING_CALL,
1630 REGION_TREE_PHYSICAL_FILL_FIELDS_CALL,
1631 REGION_TREE_PHYSICAL_ATTACH_EXTERNAL_CALL,
1632 REGION_TREE_PHYSICAL_DETACH_EXTERNAL_CALL,
1633 REGION_NODE_REGISTER_LOGICAL_USER_CALL,
1634 REGION_NODE_CLOSE_LOGICAL_NODE_CALL,
1635 REGION_NODE_SIPHON_LOGICAL_CHILDREN_CALL,
1636 REGION_NODE_SIPHON_LOGICAL_PROJECTION_CALL,
1637 REGION_NODE_PERFORM_LOGICAL_CLOSES_CALL,
1638 REGION_NODE_FIND_VALID_INSTANCE_VIEWS_CALL,
1639 REGION_NODE_FIND_VALID_REDUCTION_VIEWS_CALL,
1640 REGION_NODE_ISSUE_UPDATE_COPIES_CALL,
1641 REGION_NODE_SORT_COPY_INSTANCES_CALL,
1642 REGION_NODE_ISSUE_GROUPED_COPIES_CALL,
1643 REGION_NODE_ISSUE_UPDATE_REDUCTIONS_CALL,
1644 REGION_NODE_PREMAP_REGION_CALL,
1645 REGION_NODE_REGISTER_REGION_CALL,
1646 REGION_NODE_CLOSE_STATE_CALL,
1647 CURRENT_STATE_RECORD_VERSION_NUMBERS_CALL,
1648 CURRENT_STATE_ADVANCE_VERSION_NUMBERS_CALL,
1649 PHYSICAL_STATE_CAPTURE_STATE_CALL,
1650 PHYSICAL_STATE_APPLY_PATH_ONLY_CALL,
1651 PHYSICAL_STATE_APPLY_STATE_CALL,
1652 PHYSICAL_STATE_MAKE_LOCAL_CALL,
1653 MATERIALIZED_VIEW_FIND_LOCAL_PRECONDITIONS_CALL,
1654 MATERIALIZED_VIEW_FIND_LOCAL_COPY_PRECONDITIONS_CALL,
1655 MATERIALIZED_VIEW_FILTER_PREVIOUS_USERS_CALL,
1656 MATERIALIZED_VIEW_FILTER_CURRENT_USERS_CALL,
1657 MATERIALIZED_VIEW_FILTER_LOCAL_USERS_CALL,
1658 REDUCTION_VIEW_PERFORM_REDUCTION_CALL,
1659 REDUCTION_VIEW_PERFORM_DEFERRED_REDUCTION_CALL,
1660 REDUCTION_VIEW_PERFORM_DEFERRED_REDUCTION_ACROSS_CALL,
1661 REDUCTION_VIEW_FIND_COPY_PRECONDITIONS_CALL,
1662 REDUCTION_VIEW_FIND_USER_PRECONDITIONS_CALL,
1663 REDUCTION_VIEW_FILTER_LOCAL_USERS_CALL,
1664 PHYSICAL_TRACE_EXECUTE_CALL,
1665 PHYSICAL_TRACE_PRECONDITION_CHECK_CALL,
1666 PHYSICAL_TRACE_OPTIMIZE_CALL,
1667 LAST_RUNTIME_CALL_KIND, // This one must be last
1668 };
1669
1670#define RUNTIME_CALL_DESCRIPTIONS(name) \
1671 const char *name[Internal::LAST_RUNTIME_CALL_KIND] = { \
1672 "MapperRuntime::send_message", \
1673 "MapperRuntime::broadcast", \
1674 "MapperRuntime::unpack_physical_instance", \
1675 "MapperRuntime::create_mapper_event", \
1676 "MapperRuntime::has_mapper_event_triggered", \
1677 "MapperRuntime::trigger_mapper_event", \
1678 "MapperRuntime::wait_on_mapper_event", \
1679 "MapperRuntime::find_execution_constraints", \
1680 "MapperRuntime::find_task_layout_constraints", \
1681 "MapperRuntime::find_layout_constraints", \
1682 "MapperRuntime::register_layout", \
1683 "MapperRuntime::release_layout", \
1684 "MapperRuntime::do_constraints_conflict", \
1685 "MapperRuntime::do_constraints_entail", \
1686 "MapperRuntime::find_valid_variants", \
1687 "MapperRuntime::find_task_variant_name", \
1688 "MapperRuntime::is_leaf_variant", \
1689 "MapperRuntime::is_inner_variant", \
1690 "MapperRuntime::is_idempotent_variant", \
1691 "MapperRuntime::is_replicable_variant", \
1692 "MapperRuntime::register_task_variant", \
1693 "MapperRuntime::filter_variants", \
1694 "MapperRuntime::filter_instances", \
1695 "MapperRuntime::create_physical_instance", \
1696 "MapperRuntime::find_or_create_physical_instance", \
1697 "MapperRuntime::redistrict_instance", \
1698 "MapperRuntime::find_physical_instance", \
1699 "MapperRuntime::find_physical_instances", \
1700 "MapperRuntime::set_garbage_collection_priority", \
1701 "MapperRuntime::acquire_instance", \
1702 "MapperRuntime::acquire_instances", \
1703 "MapperRuntime::acquire_and_filter_instances", \
1704 "MapperRuntime::release_instance", \
1705 "MapperRuntime::release_instances", \
1706 "MapperRuntime::subscribe", \
1707 "MapperRuntime::unsubscribe", \
1708 "MapperRuntime::collect_instance", \
1709 "MapperRuntime::collect_instances", \
1710 "MapperRuntime::acquire_future", \
1711 "MapperRuntime::acquire_pool", \
1712 "MapperRuntime::release_pool", \
1713 "MapperRuntime::create_index_space", \
1714 "MapperRuntime::union_index_spaces", \
1715 "MapperRuntime::intersect_index_spaces", \
1716 "MapperRuntime::subtract_index_spaces", \
1717 "MapperRuntime::is_index_space_empty", \
1718 "MapperRuntime::index_spaces_overlap", \
1719 "MapperRuntime::index_space_dominates", \
1720 "MapperRuntime::has_index_partition", \
1721 "MapperRuntime::get_index_partition", \
1722 "MapperRuntime::get_index_subspace", \
1723 "MapperRuntime::get_index_space_domain", \
1724 "MapperRuntime::get_index_partition_color_space", \
1725 "MapperRuntime::get_index_partition_color_space_name", \
1726 "MapperRuntime::get_index_space_parition_colors", \
1727 "MapperRuntime::is_index_partition_disjoint", \
1728 "MapperRuntime::is_index_partition_complete", \
1729 "MapperRuntime::get_index_space_color", \
1730 "MapperRuntime::get_index_space_color_point", \
1731 "MapperRuntime::get_index_partition_color", \
1732 "MapperRuntime::get_parent_index_space", \
1733 "MapperRuntime::has_parent_index_partition", \
1734 "MapperRuntime::get_parent_index_partition", \
1735 "MapperRuntime::get_index_space_depth", \
1736 "MapperRuntime::get_index_partition_depth", \
1737 "MapperRuntime::get_field_size", \
1738 "MapperRuntime::get_field_space_fields", \
1739 "MapperRuntime::get_logical_partition", \
1740 "MapperRuntime::get_logical_partition_by_color", \
1741 "MapperRuntime::get_logical_partition_by_tree", \
1742 "MapperRuntime::get_logical_subregion", \
1743 "MapperRuntime::get_logical_subregion_by_color", \
1744 "MapperRuntime::get_logical_subregion_by_tree", \
1745 "MapperRuntime::get_logical_region_color", \
1746 "MapperRuntime::get_logical_region_color_point", \
1747 "MapperRuntime::get_logical_partition_color", \
1748 "MapperRuntime::get_parent_logical_region", \
1749 "MapperRuntime::has_parent_logical_partition", \
1750 "MapperRuntime::get_parent_logical_partition", \
1751 "MapperRuntime::retrieve_semantic_information", \
1752 "MapperRuntime::retrieve_name", \
1753 "MapperRuntime::AutoLock", \
1754 "CollectiveView::find_instances_in_memory", \
1755 "CollectiveView::find_instances_nearest_memory", \
1756 "Pack Base Task", \
1757 "Unpack Base Task", \
1758 "Task Privilege Check", \
1759 "Clone Base Task", \
1760 "Compute Point Requirements", \
1761 "Intra-Task Aliasing", \
1762 "Activate Single", \
1763 "Deactivate Single", \
1764 "Select Inline Variant", \
1765 "Inline Child Task", \
1766 "Pack Single Task", \
1767 "Unpack Single Task", \
1768 "Pack Remote Context", \
1769 "Has Conflicting Internal", \
1770 "Find Conflicting", \
1771 "Find Conflicting Internal", \
1772 "Check Region Dependence", \
1773 "Find Parent Region Requirement", \
1774 "Find Parent Region", \
1775 "Check Privilege", \
1776 "Trigger Single", \
1777 "Initialize Map Task", \
1778 "Finalized Map Task", \
1779 "Validate Variant Selection", \
1780 "Map All Regions", \
1781 "Initialize Region Tree Contexts", \
1782 "Invalidate Region Tree Contexts", \
1783 "Create Instance Top View", \
1784 "Launch Task", \
1785 "Activate Multi", \
1786 "Deactivate Multi", \
1787 "Slice Index Space", \
1788 "Clone Multi Call", \
1789 "Multi Trigger Execution", \
1790 "Pack Multi", \
1791 "Unpack Multi", \
1792 "Activate Individual", \
1793 "Deactivate Individual", \
1794 "Individual Perform Mapping", \
1795 "Individual Return Virtual", \
1796 "Individual Trigger Complete", \
1797 "Individual Trigger Commit", \
1798 "Individual Post Mapped", \
1799 "Individual Pack Task", \
1800 "Individual Unpack Task", \
1801 "Individual Pack Remote Complete", \
1802 "Individual Unpack Remote Complete", \
1803 "Activate Point", \
1804 "Deactivate Point", \
1805 "Point Task Complete", \
1806 "Point Task Commit", \
1807 "Point Task Pack", \
1808 "Point Task Unpack", \
1809 "Point Task Post Mapped", \
1810 "Remote Task Activate", \
1811 "Remote Task Deactivate", \
1812 "Remote Unpack Context", \
1813 "Index Activate", \
1814 "Index Deactivate", \
1815 "Index Compute Fat Path", \
1816 "Index PreMap Task", \
1817 "Index Distribute", \
1818 "Index Perform Mapping", \
1819 "Index Complete", \
1820 "Index Commit", \
1821 "Index Perform Inlining", \
1822 "Index Clone As Slice", \
1823 "Index Handle Future", \
1824 "Index Return Slice Mapped", \
1825 "Index Return Slice Complete", \
1826 "Index Return Slice Commit", \
1827 "Slice Activate", \
1828 "Slice Deactivate", \
1829 "Slice Apply Version Info", \
1830 "Slice Distribute", \
1831 "Slice Perform Mapping", \
1832 "Slice Launch", \
1833 "Slice Map and Launch", \
1834 "Slice Pack Task", \
1835 "Slice Unpack Task", \
1836 "Slice Clone As Slice", \
1837 "Slice Handle Future", \
1838 "Slice Cone as Point", \
1839 "Slice Enumerate Points", \
1840 "Slice Mapped", \
1841 "Slice Complete", \
1842 "Slice Commit", \
1843 "Realm Spawn Meta", \
1844 "Realm Spawn Task", \
1845 "Realm Create Instance", \
1846 "Realm Issue Copy", \
1847 "Realm Issue Fill", \
1848 "Region Tree Logical Analysis", \
1849 "Region Tree Logical Fence", \
1850 "Region Tree Versioning Analysis", \
1851 "Region Tree Advance Version Numbers", \
1852 "Region Tree Initialize Context", \
1853 "Region Tree Invalidate Context", \
1854 "Region Tree Premap Only", \
1855 "Region Tree Physical Register Only", \
1856 "Region Tree Physical Register Users", \
1857 "Region Tree Physical Perform Close", \
1858 "Region Tree Physical Close Context", \
1859 "Region Tree Physical Copy Across", \
1860 "Region Tree Physical Reduce Across", \
1861 "Region Tree Physical Convert Mapping", \
1862 "Region Tree Physical Fill Fields", \
1863 "Region Tree Physical Attach External", \
1864 "Region Tree Physical Detach External", \
1865 "Region Node Register Logical User", \
1866 "Region Node Close Logical Node", \
1867 "Region Node Siphon Logical Children", \
1868 "Region Node Siphon Logical Projection", \
1869 "Region Node Perform Logical Closes", \
1870 "Region Node Find Valid Instance Views", \
1871 "Region Node Find Valid Reduction Views", \
1872 "Region Node Issue Update Copies", \
1873 "Region Node Sort Copy Instances", \
1874 "Region Node Issue Grouped Copies", \
1875 "Region Node Issue Update Reductions", \
1876 "Region Node Premap Region", \
1877 "Region Node Register Region", \
1878 "Region Node Close State", \
1879 "Logical State Record Verison Numbers", \
1880 "Logical State Advance Version Numbers", \
1881 "Physical State Capture State", \
1882 "Physical State Apply Path Only", \
1883 "Physical State Apply State", \
1884 "Physical State Make Local", \
1885 "Materialized View Find Local Preconditions", \
1886 "Materialized View Find Local Copy Preconditions", \
1887 "Materialized View Filter Previous Users", \
1888 "Materialized View Filter Current Users", \
1889 "Materialized View Filter Local Users", \
1890 "Reduction View Perform Reduction", \
1891 "Reduction View Perform Deferred Reduction", \
1892 "Reduction View Perform Deferred Reduction Across", \
1893 "Reduction View Find Copy Preconditions", \
1894 "Reduction View Find User Preconditions", \
1895 "Reduction View Filter Local Users", \
1896 "Physical Trace Execute", \
1897 "Physical Trace Precondition Check", \
1898 "Physical Trace Optimize", \
1899 };
1900
1901 enum SemanticInfoKind {
1902 INDEX_SPACE_SEMANTIC,
1903 INDEX_PARTITION_SEMANTIC,
1904 FIELD_SPACE_SEMANTIC,
1905 FIELD_SEMANTIC,
1906 LOGICAL_REGION_SEMANTIC,
1907 LOGICAL_PARTITION_SEMANTIC,
1908 TASK_SEMANTIC,
1909 };
1910
1911 // Static locations for where collectives are allocated
1912 // These are just arbitrary numbers but they should appear
1913 // with at most one logical static collective kind
1914 // Ones that have been commented out are free to be reused
1915 enum CollectiveIndexLocation {
1916 //COLLECTIVE_LOC_0 = 0,
1917 COLLECTIVE_LOC_1 = 1,
1918 COLLECTIVE_LOC_2 = 2,
1919 COLLECTIVE_LOC_3 = 3,
1920 COLLECTIVE_LOC_4 = 4,
1921 COLLECTIVE_LOC_5 = 5,
1922 COLLECTIVE_LOC_6 = 6,
1923 COLLECTIVE_LOC_7 = 7,
1924 COLLECTIVE_LOC_8 = 8,
1925 COLLECTIVE_LOC_9 = 9,
1926 COLLECTIVE_LOC_10 = 10,
1927 COLLECTIVE_LOC_11 = 11,
1928 COLLECTIVE_LOC_12 = 12,
1929 COLLECTIVE_LOC_13 = 13,
1930 COLLECTIVE_LOC_14 = 14,
1931 COLLECTIVE_LOC_15 = 15,
1932 COLLECTIVE_LOC_16 = 16,
1933 COLLECTIVE_LOC_17 = 17,
1934 COLLECTIVE_LOC_18 = 18,
1935 COLLECTIVE_LOC_19 = 19,
1936 COLLECTIVE_LOC_20 = 20,
1937 COLLECTIVE_LOC_21 = 21,
1938 COLLECTIVE_LOC_22 = 22,
1939 COLLECTIVE_LOC_23 = 23,
1940 COLLECTIVE_LOC_24 = 24,
1941 COLLECTIVE_LOC_25 = 25,
1942 COLLECTIVE_LOC_26 = 26,
1943 COLLECTIVE_LOC_27 = 27,
1944 COLLECTIVE_LOC_28 = 28,
1945 COLLECTIVE_LOC_29 = 29,
1946 COLLECTIVE_LOC_30 = 30,
1947 COLLECTIVE_LOC_31 = 31,
1948 COLLECTIVE_LOC_32 = 32,
1949 COLLECTIVE_LOC_33 = 33,
1950 COLLECTIVE_LOC_34 = 34,
1951 COLLECTIVE_LOC_35 = 35,
1952 COLLECTIVE_LOC_36 = 36,
1953 COLLECTIVE_LOC_37 = 37,
1954 COLLECTIVE_LOC_38 = 38,
1955 COLLECTIVE_LOC_39 = 39,
1956 COLLECTIVE_LOC_40 = 40,
1957 COLLECTIVE_LOC_41 = 41,
1958 COLLECTIVE_LOC_42 = 42,
1959 COLLECTIVE_LOC_43 = 43,
1960 COLLECTIVE_LOC_44 = 44,
1961 COLLECTIVE_LOC_45 = 45,
1962 COLLECTIVE_LOC_46 = 46,
1963 COLLECTIVE_LOC_47 = 47,
1964 COLLECTIVE_LOC_48 = 48,
1965 COLLECTIVE_LOC_49 = 49,
1966 COLLECTIVE_LOC_50 = 50,
1967 COLLECTIVE_LOC_51 = 51,
1968 COLLECTIVE_LOC_52 = 52,
1969 COLLECTIVE_LOC_53 = 53,
1970 COLLECTIVE_LOC_54 = 54,
1971 COLLECTIVE_LOC_55 = 55,
1972 COLLECTIVE_LOC_56 = 56,
1973 COLLECTIVE_LOC_57 = 57,
1974 COLLECTIVE_LOC_58 = 58,
1975 COLLECTIVE_LOC_59 = 59,
1976 COLLECTIVE_LOC_60 = 60,
1977 COLLECTIVE_LOC_61 = 61,
1978 COLLECTIVE_LOC_62 = 62,
1979 COLLECTIVE_LOC_63 = 63,
1980 COLLECTIVE_LOC_64 = 64,
1981 COLLECTIVE_LOC_65 = 65,
1982 COLLECTIVE_LOC_66 = 66,
1983 COLLECTIVE_LOC_67 = 67,
1984 COLLECTIVE_LOC_68 = 68,
1985 COLLECTIVE_LOC_69 = 69,
1986 COLLECTIVE_LOC_70 = 70,
1987 COLLECTIVE_LOC_71 = 71,
1988 COLLECTIVE_LOC_72 = 72,
1989 COLLECTIVE_LOC_73 = 73,
1990 COLLECTIVE_LOC_74 = 74,
1991 COLLECTIVE_LOC_75 = 75,
1992 COLLECTIVE_LOC_76 = 76,
1993 COLLECTIVE_LOC_77 = 77,
1994 COLLECTIVE_LOC_78 = 78,
1995 COLLECTIVE_LOC_79 = 79,
1996 COLLECTIVE_LOC_80 = 80,
1997 COLLECTIVE_LOC_81 = 81,
1998 COLLECTIVE_LOC_82 = 82,
1999 COLLECTIVE_LOC_83 = 83,
2000 COLLECTIVE_LOC_84 = 84,
2001 COLLECTIVE_LOC_85 = 85,
2002 COLLECTIVE_LOC_86 = 86,
2003 COLLECTIVE_LOC_87 = 87,
2004 COLLECTIVE_LOC_88 = 88,
2005 COLLECTIVE_LOC_89 = 89,
2006 COLLECTIVE_LOC_90 = 90,
2007 COLLECTIVE_LOC_91 = 91,
2008 COLLECTIVE_LOC_92 = 92,
2009 COLLECTIVE_LOC_93 = 93,
2010 COLLECTIVE_LOC_94 = 94,
2011 COLLECTIVE_LOC_95 = 95,
2012 COLLECTIVE_LOC_96 = 96,
2013 COLLECTIVE_LOC_97 = 97,
2014 COLLECTIVE_LOC_98 = 98,
2015 COLLECTIVE_LOC_99 = 99,
2016 COLLECTIVE_LOC_100 = 100,
2017 COLLECTIVE_LOC_101 = 101,
2018 COLLECTIVE_LOC_102 = 102,
2019 COLLECTIVE_LOC_103 = 103,
2020 COLLECTIVE_LOC_104 = 104,
2021 COLLECTIVE_LOC_105 = 105,
2022 COLLECTIVE_LOC_106 = 106,
2023 COLLECTIVE_LOC_107 = 107,
2024 COLLECTIVE_LOC_108 = 108,
2025 COLLECTIVE_LOC_109 = 109,
2026 };
2027
2028 // legion_types.h
2029 class LocalLock;
2030 class AutoLock;
2031 class AutoTryLock;
2032 class LgEvent; // base event type for legion
2033 class ApEvent; // application event
2034 class ApUserEvent; // application user event
2035 class ApBarrier; // application barrier
2036 class RtEvent; // runtime event
2037 class RtUserEvent; // runtime user event
2038 class RtBarrier;
2039
2040 // legion_utilities.h
2041 struct RegionUsage;
2042 template<typename T> class Fraction;
2043 template<typename T, unsigned LOG2MAX> class BitPermutation;
2044
2045 // Forward declarations for runtime level objects
2046 // runtime.h
2047 class Collectable;
2048 class FieldAllocatorImpl;
2049 class ArgumentMapImpl;
2050 class FutureImpl;
2051 class FutureInstance;
2052 class FutureMapImpl;
2053 class ReplFutureMapImpl;
2054 class PhysicalRegionImpl;
2055 class OutputRegionImpl;
2056 class ExternalResourcesImpl;
2057 class PieceIteratorImpl;
2058 class GrantImpl;
2059 class PredicateImpl;
2060 class LegionHandshakeImpl;
2061 class ProcessorManager;
2062 class MemoryManager;
2063 class MemoryPool;
2064 class VirtualChannel;
2065 class MessageManager;
2066 class ShutdownManager;
2067 class TaskImpl;
2068 class VariantImpl;
2069 class LayoutConstraints;
2070 class ProjectionFunction;
2071 class ShardingFunction;
2072 class Runtime;
2073
2074 // legion_ops.h
2075 class Provenance;
2076 class Operation;
2077 class MemoizableOp;
2078 class PredicatedOp;
2079 class MapOp;
2080 class CopyOp;
2081 class IndexCopyOp;
2082 class PointCopyOp;
2083 class FenceOp;
2084 class FrameOp;
2085 class CreationOp;
2086 class DeletionOp;
2087 class InternalOp;
2088 class CloseOp;
2089 class MergeCloseOp;
2090 class PostCloseOp;
2091 class RefinementOp;
2092 class ResetOp;
2093 class AcquireOp;
2094 class ReleaseOp;
2095 class DynamicCollectiveOp;
2096 class FuturePredOp;
2097 class NotPredOp;
2098 class AndPredOp;
2099 class OrPredOp;
2100 class MustEpochOp;
2101 class PendingPartitionOp;
2102 class DependentPartitionOp;
2103 class PointDepPartOp;
2104 class FillOp;
2105 class IndexFillOp;
2106 class PointFillOp;
2107 class DiscardOp;
2108 class AttachOp;
2109 class IndexAttachOp;
2110 class PointAttachOp;
2111 class DetachOp;
2112 class IndexDetachOp;
2113 class PointDetachOp;
2114 class TimingOp;
2115 class TunableOp;
2116 class AllReduceOp;
2117 class ExternalMappable;
2118 class RemoteOp;
2119 class RemoteMapOp;
2120 class RemoteCopyOp;
2121 class RemoteCloseOp;
2122 class RemoteAcquireOp;
2123 class RemoteReleaseOp;
2124 class RemoteFillOp;
2125 class RemotePartitionOp;
2126 class RemoteReplayOp;
2127 class RemoteSummaryOp;
2128 template<typename OP>
2130 template<typename OP>
2132 struct PointwiseDependence;
2133
2134
2135 // legion_tasks.h
2136 class ExternalTask;
2137 class TaskOp;
2138 class RemoteTaskOp;
2139 class SingleTask;
2140 class MultiTask;
2141 class IndividualTask;
2142 class PointTask;
2143 class ShardTask;
2144 class IndexTask;
2145 class SliceTask;
2146 class RemoteTask;
2147
2148 // legion_context.h
2149 class TaskContext;
2150 class InnerContext;;
2151 class TopLevelContext;
2152 class ReplicateContext;
2153 class RemoteContext;
2154 class LeafContext;
2155
2156 // legion_auto_trace.h
2157 class TraceHashHelper;
2158
2159 // legion_trace.h
2160 class LogicalTrace;
2161 class TraceBeginOp;
2162 class TraceRecurrentOp;
2163 class TraceCompleteOp;
2164 class PhysicalTrace;
2165 class TraceViewSet;
2166 class TraceConditionSet;
2167 class PhysicalTemplate;
2168 class ShardedPhysicalTemplate;
2169 class Instruction;
2170 class GetTermEvent;
2171 class ReplayMapping;
2172 class CreateApUserEvent;
2173 class TriggerEvent;
2174 class MergeEvent;
2175 class AssignFenceCompletion;
2176 class IssueCopy;
2177 class IssueFill;
2178 class IssueAcross;
2179 class GetOpTermEvent;
2180 class SetOpSyncEvent;
2181 class SetEffects;
2182 class CompleteReplay;
2183 class AcquireReplay;
2184 class ReleaseReplay;
2185 class BarrierArrival;
2186 class BarrierAdvance;
2187
2188 // legion_auto_trace.h
2189 class TraceRecognizer;
2190
2191 // region_tree.h
2192 class RegionTreeForest;
2193 class CopyAcrossExecutor;
2194 class CopyAcrossUnstructured;
2195 class IndexSpaceExpression;
2196 class IndexSpaceExprRef;
2197 class IndexSpaceOperation;
2198 template<int DIM, typename T> class IndexSpaceOperationT;
2199 template<int DIM, typename T> class IndexSpaceUnion;
2200 template<int DIM, typename T> class IndexSpaceIntersection;
2201 template<int DIM, typename T> class IndexSpaceDifference;
2202 class ExpressionTrieNode;
2203 class IndexTreeNode;
2204 class IndexSpaceNode;
2205 template<int DIM, typename T> class IndexSpaceNodeT;
2206 class IndexPartNode;
2207 template<int DIM, typename T> class IndexPartNodeT;
2208 class FieldSpaceNode;
2209 class RegionTreeNode;
2210 class RegionNode;
2211 class PartitionNode;
2212 class ColorSpaceIterator;
2213 template<int DIM, typename T> class ColorSpaceLinearizationT;
2214 template<int DIM, typename T, typename RT = void> class KDNode;
2215 class EqKDTree;
2216 template<int DIM, typename T> class EqKDTreeT;
2217
2218 class RegionTreePath;
2219 class PathTraverser;
2220 class NodeTraverser;
2221
2222 class LogicalState;
2223 class LogicalAnalysis;
2224 class PhysicalAnalysis;
2225 class EquivalenceSet;
2226 class EqSetTracker;
2227 class VersionManager;
2228 class VersionInfo;
2229 class ProjectionNode;
2230 class ProjectionRegion;
2231 class ProjectionPartition;
2232 class RefinementTracker;
2233 class RegionRefinementTracker;
2234 class PartitionRefinementTracker;
2235
2236 class Collectable;
2237 class Notifiable;
2238 class ImplicitReferenceTracker;
2239 class DistributedCollectable;
2240 class LayoutDescription;
2241 class InstanceManager; // base class for all instances
2242 class CopyAcrossHelper;
2243 class LogicalView; // base class for instance and reduction
2244 class InstanceKey;
2245 class InstanceView;
2246 class ExprView;
2247 class CollectableView; // pure virtual class
2248 class IndividualView;
2249 class CollectiveView;
2250 class MaterializedView;
2251 class ReplicatedView;
2252 class ReductionView;
2253 class AllreduceView;
2254 class DeferredView;
2255 class FillView;
2256 class PhiView;
2257 class MappingRef;
2258 class InstanceRef;
2259 class InstanceSet;
2260 class InnerTaskView;
2261 class VirtualManager;
2262 class PhysicalManager;
2263 class InstanceBuilder;
2264
2265 class RegionAnalyzer;
2266 class RegionMapper;
2267
2268 struct LogicalUser;
2269 struct PhysicalUser;
2270 struct LogicalTraceInfo;
2271 struct PhysicalTraceInfo;
2272 class TreeCloseImpl;
2273 class TreeClose;
2274 struct CloseInfo;
2275 struct FieldDataDescriptor;
2276 struct PendingRemoteExpression;
2277 class ProjectionSummary;
2278 class ProjectionInfo;
2279
2280
2281 // legion_spy.h
2282 class TreeStateLogger;
2283
2284 // legion_profiling.h
2285 class LegionProfiler;
2286 class LegionProfInstance;
2287
2288 // mapper_manager.h
2289 class MappingCallInfo;
2290 class MapperManager;
2291 class SerializingManager;
2292 class ConcurrentManager;
2293 typedef Mapping::MapperEvent MapperEvent;
2294 typedef Mapping::ProfilingMeasurementID ProfilingMeasurementID;
2295
2296 // legion_replication.h
2297 class ShardedMapping;
2298 class ReplIndividualTask;
2299 class ReplIndexTask;
2300 class ReplMergeCloseOp;
2301 class ReplRefinementOp;
2302 class ReplResetOp;
2303 class ReplFillOp;
2304 class ReplIndexFillOp;
2305 class ReplDiscardOp;
2306 class ReplCopyOp;
2307 class ReplIndexCopyOp;
2308 class ReplDeletionOp;
2309 class ReplPendingPartitionOp;
2310 class ReplDependentPartitionOp;
2311 class ReplMustEpochOp;
2312 class ReplTimingOp;
2313 class ReplTunableOp;
2314 class ReplAllReduceOp;
2315 class ReplFenceOp;
2316 class ReplMapOp;
2317 class ReplAttachOp;
2318 class ReplIndexAttachOp;
2319 class ReplDetachOp;
2320 class ReplIndexDetachOp;
2321 class ReplAcquireOp;
2322 class ReplReleaseOp;
2323 class ReplTraceOp;
2324 class ReplTraceBeginOp;
2325 class ReplTraceRecurrentOp;
2326 class ReplTraceCompleteOp;
2327 class ShardMapping;
2328 class CollectiveMapping;
2329 class ShardManager;
2330 class ShardCollective;
2331 class GatherCollective;
2332 template<bool>
2334 template<typename T> class BarrierExchangeCollective;
2335 template<typename T> class ValueBroadcast;
2336 template<typename T, bool> class AllReduceCollective;
2337 class CrossProductCollective;
2338 class ShardingGatherCollective;
2339 class FieldDescriptorExchange;
2340 class FieldDescriptorGather;
2341 class FutureBroadcast;
2342 class FutureExchange;
2343 class FutureNameExchange;
2344 class MustEpochMappingBroadcast;
2345 class MustEpochMappingExchange;
2346 class PredicateCollective;
2347 class UnorderedExchange;
2348 class ShardRendezvous;
2349 class ProjectionTreeExchange;
2350 class TimeoutMatchExchange;
2351 class ConcurrentAllreduce;
2352
2353 // Nasty global variable for TLS support of figuring out
2354 // our context implicitly
2355 extern thread_local TaskContext *implicit_context;
2356 // Mapper context if we're inside of a mapper call
2357 extern thread_local MappingCallInfo *implicit_mapper_call;
2358 // Same thing for the runtime
2359 extern thread_local Runtime *implicit_runtime;
2360 // Implicit thread-local profiler
2361 extern thread_local LegionProfInstance *implicit_profiler;
2362 // Another nasty global variable for tracking the fast
2363 // reservations that we are holding
2364 extern thread_local AutoLock *local_lock_list;
2365 // One more nasty global variable that we use for tracking
2366 // the provenance of meta-task operations for profiling
2367 // purposes, this has no bearing on correctness
2368 extern thread_local ::legion_unique_id_t implicit_provenance;
2369 // Use this global variable to track name of the "finish event"
2370 // for whatever (meta-)task we're running on at the moment.
2371 // It should always be the case that the owner node of the
2372 // "finish" event" is the same as the node we're on.
2373 extern thread_local LgEvent implicit_fevent;
2374 // Use this to track if we're inside of a registration
2375 // callback function which we know to be deduplicated
2376 enum RegistrationCallbackMode {
2377 NO_REGISTRATION_CALLBACK = 0,
2378 LOCAL_REGISTRATION_CALLBACK = 1,
2379 GLOBAL_REGISTRATION_CALLBACK = 2,
2380 };
2381 extern thread_local unsigned inside_registration_callback;
2382 // This data structure tracks references to any live
2383 // temporary index space expressions that have been
2384 // handed back by the region tree inside the execution
2385 // of a meta-task or a runtime API call. It also tracks
2386 // changes to remote distributed collectable that can be
2387 // delayed and batched together.
2388 extern thread_local ImplicitReferenceTracker *implicit_reference_tracker;
2389#ifdef DEBUG_LEGION_CALLERS
2390 extern thread_local LgTaskID implicit_task_kind;
2391 extern thread_local LgTaskID implicit_task_caller;
2392#endif
2393
2398 template<typename T>
2399 struct LgTaskArgs {
2400 public:
2401 LgTaskArgs(::legion_unique_id_t uid)
2402 : provenance(uid),
2403#ifdef DEBUG_LEGION_CALLERS
2404 lg_call_id(implicit_task_kind),
2405#endif
2406 lg_task_id(T::TASK_ID) { }
2407 public:
2408 // In this order for alignment reasons
2409 const ::legion_unique_id_t provenance;
2410#ifdef DEBUG_LEGION_CALLERS
2411 const LgTaskID lg_call_id;
2412#endif
2413 const LgTaskID lg_task_id;
2414 };
2415
2416#define FRIEND_ALL_RUNTIME_CLASSES \
2417 friend class Legion::Runtime; \
2418 friend class Legion::Mapping::MapperRuntime; \
2419 friend class Internal::Runtime; \
2420 friend class Internal::FutureImpl; \
2421 friend class Internal::FutureMapImpl; \
2422 friend class Internal::PhysicalRegionImpl; \
2423 friend class Internal::ExternalResourcesImpl; \
2424 friend class Internal::TaskImpl; \
2425 friend class Internal::VariantImpl; \
2426 friend class Internal::ProcessorManager; \
2427 friend class Internal::MemoryManager; \
2428 friend class Internal::Operation; \
2429 friend class Internal::PredicatedOp; \
2430 friend class Internal::MapOp; \
2431 friend class Internal::CopyOp; \
2432 friend class Internal::IndexCopyOp; \
2433 friend class Internal::PointCopyOp; \
2434 friend class Internal::FenceOp; \
2435 friend class Internal::DynamicCollectiveOp; \
2436 friend class Internal::FuturePredOp; \
2437 friend class Internal::CreationOp; \
2438 friend class Internal::DeletionOp; \
2439 friend class Internal::CloseOp; \
2440 friend class Internal::MergeCloseOp; \
2441 friend class Internal::PostCloseOp; \
2442 friend class Internal::RefinementOp; \
2443 friend class Internal::ResetOp; \
2444 friend class Internal::AcquireOp; \
2445 friend class Internal::ReleaseOp; \
2446 friend class Internal::PredicateImpl; \
2447 friend class Internal::NotPredOp; \
2448 friend class Internal::AndPredOp; \
2449 friend class Internal::OrPredOp; \
2450 friend class Internal::MustEpochOp; \
2451 friend class Internal::PendingPartitionOp; \
2452 friend class Internal::DependentPartitionOp; \
2453 friend class Internal::PointDepPartOp; \
2454 friend class Internal::FillOp; \
2455 friend class Internal::IndexFillOp; \
2456 friend class Internal::PointFillOp; \
2457 friend class Internal::DiscardOp; \
2458 friend class Internal::AttachOp; \
2459 friend class Internal::IndexAttachOp; \
2460 friend class Internal::ReplIndexAttachOp; \
2461 friend class Internal::PointAttachOp; \
2462 friend class Internal::DetachOp; \
2463 friend class Internal::IndexDetachOp; \
2464 friend class Internal::ReplIndexDetachOp; \
2465 friend class Internal::PointDetachOp; \
2466 friend class Internal::TimingOp; \
2467 friend class Internal::TunableOp; \
2468 friend class Internal::AllReduceOp; \
2469 friend class Internal::TraceRecurrentOp; \
2470 friend class Internal::ExternalMappable; \
2471 friend class Internal::ExternalTask; \
2472 friend class Internal::TaskOp; \
2473 friend class Internal::SingleTask; \
2474 friend class Internal::MultiTask; \
2475 friend class Internal::IndividualTask; \
2476 friend class Internal::PointTask; \
2477 friend class Internal::IndexTask; \
2478 friend class Internal::SliceTask; \
2479 friend class Internal::ReplIndividualTask; \
2480 friend class Internal::ReplIndexTask; \
2481 friend class Internal::ReplFillOp; \
2482 friend class Internal::ReplIndexFillOp; \
2483 friend class Internal::ReplDiscardOp; \
2484 friend class Internal::ReplCopyOp; \
2485 friend class Internal::ReplIndexCopyOp; \
2486 friend class Internal::ReplDeletionOp; \
2487 friend class Internal::ReplPendingPartitionOp; \
2488 friend class Internal::ReplDependentPartitionOp; \
2489 friend class Internal::ReplMustEpochOp; \
2490 friend class Internal::ReplMapOp; \
2491 friend class Internal::ReplTimingOp; \
2492 friend class Internal::ReplTunableOp; \
2493 friend class Internal::ReplAllReduceOp; \
2494 friend class Internal::ReplFenceOp; \
2495 friend class Internal::ReplAttachOp; \
2496 friend class Internal::ReplDetachOp; \
2497 friend class Internal::ReplAcquireOp; \
2498 friend class Internal::ReplReleaseOp; \
2499 friend class Internal::MemoizableOp; \
2500 template<typename OP> \
2501 friend class Internal::Memoizable; \
2502 friend class Internal::ShardManager; \
2503 friend class Internal::RegionTreeForest; \
2504 friend class Internal::IndexSpaceNode; \
2505 template<int, typename> \
2506 friend class Internal::IndexSpaceNodeT; \
2507 friend class Internal::IndexPartNode; \
2508 friend class Internal::FieldSpaceNode; \
2509 friend class Internal::RegionTreeNode; \
2510 friend class Internal::RegionNode; \
2511 friend class Internal::PartitionNode; \
2512 friend class Internal::LogicalView; \
2513 friend class Internal::InstanceView; \
2514 friend class Internal::DeferredView; \
2515 friend class Internal::ReductionView; \
2516 friend class Internal::MaterializedView; \
2517 friend class Internal::FillView; \
2518 friend class Internal::LayoutDescription; \
2519 friend class Internal::InstanceManager; \
2520 friend class Internal::PhysicalManager; \
2521 friend class Internal::TreeStateLogger; \
2522 friend class Internal::MapperManager; \
2523 friend class Internal::InstanceRef; \
2524 friend class Internal::LegionHandshakeImpl; \
2525 friend class Internal::ArgumentMapImpl; \
2526 friend class Internal::FutureMapImpl; \
2527 friend class Internal::ReplFutureMapImpl; \
2528 friend class Internal::TaskContext; \
2529 friend class Internal::InnerContext; \
2530 friend class Internal::TopLevelContext; \
2531 friend class Internal::RemoteContext; \
2532 friend class Internal::LeafContext; \
2533 friend class Internal::ReplicateContext; \
2534 friend class Internal::TraceHashHelper; \
2535 friend class Internal::InstanceBuilder; \
2536 friend class Internal::FutureNameExchange; \
2537 friend class Internal::MustEpochMappingExchange; \
2538 friend class Internal::MustEpochMappingBroadcast; \
2539 friend class Internal::MappingCallInfo; \
2540 friend class BindingLib::Utility; \
2541 friend class CObjectWrapper;
2542
2543#define LEGION_EXTERN_LOGGER_DECLARATIONS \
2544 extern Realm::Logger log_run; \
2545 extern Realm::Logger log_task; \
2546 extern Realm::Logger log_index; \
2547 extern Realm::Logger log_field; \
2548 extern Realm::Logger log_region; \
2549 extern Realm::Logger log_inst; \
2550 extern Realm::Logger log_variant; \
2551 extern Realm::Logger log_allocation; \
2552 extern Realm::Logger log_migration; \
2553 extern Realm::Logger log_prof; \
2554 extern Realm::Logger log_garbage; \
2555 extern Realm::Logger log_spy; \
2556 extern Realm::Logger log_shutdown; \
2557 extern Realm::Logger log_tracing; \
2558 extern Realm::Logger log_auto_trace;
2559 }; // Internal namespace
2560
2561 // Typedefs that are needed everywhere
2562 typedef Realm::Runtime RealmRuntime;
2563 typedef Realm::Machine Machine;
2564 typedef Realm::Memory Memory;
2565 typedef Realm::Processor Processor;
2566 typedef Realm::ProcessorGroup ProcessorGroup;
2567 typedef Realm::CodeDescriptor CodeDescriptor;
2568 typedef Realm::Reservation Reservation;
2569 typedef Realm::CompletionQueue CompletionQueue;
2570 typedef ::legion_reduction_op_id_t ReductionOpID;
2571 typedef Realm::ReductionOpUntyped ReductionOp;
2572 typedef ::legion_custom_serdez_id_t CustomSerdezID;
2573 typedef Realm::CustomSerdezUntyped SerdezOp;
2574 typedef Realm::Machine::ProcessorMemoryAffinity ProcessorMemoryAffinity;
2575 typedef Realm::Machine::MemoryMemoryAffinity MemoryMemoryAffinity;
2576 typedef Realm::DynamicTemplates::TagType TypeTag;
2577 typedef Realm::Logger Logger;
2578 typedef ::legion_coord_t coord_t;
2579 typedef std::map<CustomSerdezID,
2580 const Realm::CustomSerdezUntyped *> SerdezOpTable;
2581 typedef std::map<Realm::ReductionOpID,
2582 Realm::ReductionOpUntyped *> ReductionOpTable;
2583 typedef void (*SerdezInitFnptr)(const ReductionOp*, void *&, size_t&);
2584 typedef void (*SerdezFoldFnptr)(const ReductionOp*, void *&,
2585 size_t&, const void*);
2586 typedef std::map<Realm::ReductionOpID, SerdezRedopFns> SerdezRedopTable;
2587 typedef ::legion_projection_type_t HandleType;
2588 typedef ::legion_address_space_t AddressSpace;
2589 typedef ::legion_task_priority_t TaskPriority;
2590 typedef ::legion_task_priority_t RealmPriority;
2591 typedef ::legion_garbage_collection_priority_t GCPriority;
2592 typedef ::legion_color_t Color;
2593 typedef ::legion_field_id_t FieldID;
2594 typedef ::legion_trace_id_t TraceID;
2595 typedef ::legion_mapper_id_t MapperID;
2596 typedef ::legion_context_id_t ContextID;
2597 typedef ::legion_instance_id_t InstanceID;
2598 typedef ::legion_index_space_id_t IndexSpaceID;
2599 typedef ::legion_index_partition_id_t IndexPartitionID;
2600 typedef ::legion_index_tree_id_t IndexTreeID;
2601 typedef ::legion_field_space_id_t FieldSpaceID;
2602 typedef ::legion_generation_id_t GenerationID;
2603 typedef ::legion_type_handle TypeHandle;
2604 typedef ::legion_projection_id_t ProjectionID;
2605 typedef ::legion_sharding_id_t ShardingID;
2606 typedef ::legion_concurrent_id_t ConcurrentID;
2607 typedef ::legion_region_tree_id_t RegionTreeID;
2608 typedef ::legion_distributed_id_t DistributedID;
2609 typedef ::legion_address_space_t AddressSpaceID;
2610 typedef ::legion_tunable_id_t TunableID;
2611 typedef ::legion_local_variable_id_t LocalVariableID;
2612 typedef ::legion_mapping_tag_id_t MappingTagID;
2613 typedef ::legion_semantic_tag_t SemanticTag;
2614 typedef ::legion_variant_id_t VariantID;
2615 typedef ::legion_code_descriptor_id_t CodeDescriptorID;
2616 typedef ::legion_unique_id_t UniqueID;
2617 typedef ::legion_version_id_t VersionID;
2618 typedef ::legion_projection_epoch_id_t ProjectionEpochID;
2619 typedef ::legion_task_id_t TaskID;
2620 typedef ::legion_layout_constraint_id_t LayoutConstraintID;
2621 typedef ::legion_shard_id_t ShardID;
2622 typedef ::legion_provenance_id_t ProvenanceID;
2623 typedef ::legion_internal_color_t LegionColor;
2624 typedef void (*RegistrationCallbackFnptr)(Machine machine,
2625 Runtime *rt, const std::set<Processor> &local_procs);
2626 typedef void (*RegistrationWithArgsCallbackFnptr)(
2627 const RegistrationCallbackArgs &args);
2628 typedef LogicalRegion (*RegionProjectionFnptr)(LogicalRegion parent,
2629 const DomainPoint&, Runtime *rt);
2630 typedef LogicalRegion (*PartitionProjectionFnptr)(LogicalPartition parent,
2631 const DomainPoint&, Runtime *rt);
2632 typedef bool (*PredicateFnptr)(const void*, size_t,
2633 const std::vector<Future> futures);
2634 typedef void (*RealmFnptr)(const void*,size_t,
2635 const void*,size_t,Processor);
2636 // Magical typedefs
2637 // (don't forget to update ones in old HighLevel namespace in legion.inl)
2638 typedef Internal::TaskContext* Context;
2639 // Anothing magical typedef
2640 namespace Mapping {
2641 typedef Internal::MappingCallInfo* MapperContext;
2642 typedef Internal::InstanceManager* PhysicalInstanceImpl;
2643 typedef Internal::CollectiveView* CollectiveViewImpl;
2644 // This type import is experimental to facilitate coordination and
2645 // synchronization between different mappers and may be revoked later
2646 // as we develop new abstractions for mappers to interact
2647 typedef Internal::LocalLock LocalLock;
2648 };
2649
2650 namespace Internal {
2651 // The invalid color
2652 const LegionColor INVALID_COLOR = LLONG_MAX;
2653 // This is only needed internally
2654 typedef Realm::RegionInstance PhysicalInstance;
2655 typedef Realm::CopySrcDstField CopySrcDstField;
2656 typedef unsigned long long CollectiveID;
2657 typedef unsigned long long IndexSpaceExprID;
2658 struct ContextCoordinate;
2659 typedef ContextCoordinate TraceLocalID;
2660 class TaskTreeCoordinates;
2661 // Helper for encoding templates
2663 public Realm::DynamicTemplates::ListProduct2<Realm::DIMCOUNTS,
2664 Realm::DIMTYPES> {
2665 typedef Realm::DynamicTemplates::ListProduct2<Realm::DIMCOUNTS,
2666 Realm::DIMTYPES> SUPER;
2667 public:
2668 template<int N, typename T> __CUDA_HD__
2669 static inline constexpr TypeTag encode_tag(void) {
2670#if __cplusplus >= 201402L
2671 constexpr TypeTag type =
2672 SUPER::template encode_tag<Realm::DynamicTemplates::Int<N>, T>();
2673 static_assert(type != 0, "All types should be non-zero for Legion");
2674 return type;
2675#else
2676 return SUPER::template encode_tag<Realm::DynamicTemplates::Int<N>, T>();
2677#endif
2678 }
2679 template<int N, typename T>
2680 static inline void check_type(const TypeTag t) {
2681#ifdef DEBUG_LEGION
2682#ifndef NDEBUG
2683 const TypeTag t1 = encode_tag<N,T>();
2684#endif
2685 assert(t1 == t);
2686#endif
2687 }
2688 struct DimHelper {
2689 public:
2690 template<typename N, typename T>
2691 static inline void demux(int *result) { *result = N::N; }
2692 };
2693 static inline int get_dim(const TypeTag t) {
2694 int result = 0;
2695 SUPER::demux<DimHelper>(t, &result);
2696 return result;
2697 }
2698 };
2699 // Pull some of the mapper types into the internal space
2700 typedef Mapping::Mapper Mapper;
2701 typedef Mapping::PhysicalInstance MappingInstance;
2702 typedef Mapping::CollectiveView MappingCollective;
2703 // A little bit of logic here to figure out the
2704 // kind of bit mask to use for FieldMask
2705
2706// The folowing macros are used in the FieldMask instantiation of BitMask
2707// If you change one you probably have to change the others too
2708#define LEGION_FIELD_MASK_FIELD_TYPE uint64_t
2709#define LEGION_FIELD_MASK_FIELD_SHIFT 6
2710#define LEGION_FIELD_MASK_FIELD_MASK 0x3F
2711#define LEGION_FIELD_MASK_FIELD_ALL_ONES 0xFFFFFFFFFFFFFFFF
2712
2713#if defined(__AVX__)
2714#if (LEGION_MAX_FIELDS > 256)
2715 typedef AVXTLBitMask<LEGION_MAX_FIELDS> FieldMask;
2716#elif (LEGION_MAX_FIELDS > 128)
2717 typedef AVXBitMask<LEGION_MAX_FIELDS> FieldMask;
2718#elif (LEGION_MAX_FIELDS > 64)
2719 typedef SSEBitMask<LEGION_MAX_FIELDS> FieldMask;
2720#else
2721 typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,LEGION_MAX_FIELDS,
2722 LEGION_FIELD_MASK_FIELD_SHIFT,
2723 LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
2724#endif
2725#elif defined(__SSE2__)
2726#if (LEGION_MAX_FIELDS > 128)
2727 typedef SSETLBitMask<LEGION_MAX_FIELDS> FieldMask;
2728#elif (LEGION_MAX_FIELDS > 64)
2729 typedef SSEBitMask<LEGION_MAX_FIELDS> FieldMask;
2730#else
2731 typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,LEGION_MAX_FIELDS,
2732 LEGION_FIELD_MASK_FIELD_SHIFT,
2733 LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
2734#endif
2735#elif defined(__ALTIVEC__)
2736#if (LEGION_MAX_FIELDS > 128)
2737 typedef PPCTLBitMask<LEGION_MAX_FIELDS> FieldMask;
2738#elif (LEGION_MAX_FIELDS > 64)
2739 typedef PPCBitMask<LEGION_MAX_FIELDS> FieldMask;
2740#else
2741 typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,LEGION_MAX_FIELDS,
2742 LEGION_FIELD_MASK_FIELD_SHIFT,
2743 LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
2744#endif
2745#elif defined(__ARM_NEON)
2746#if (LEGION_MAX_FIELDS > 128)
2747 typedef NeonTLBitMask<LEGION_MAX_FIELDS> FieldMask;
2748#elif (LEGION_MAX_FIELDS > 64)
2749 typedef NeonBitMask<LEGION_MAX_FIELDS> FieldMask;
2750#else
2751 typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,LEGION_MAX_FIELDS,
2752 LEGION_FIELD_MASK_FIELD_SHIFT,
2753 LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
2754#endif
2755#else
2756#if (LEGION_MAX_FIELDS > 64)
2757 typedef TLBitMask<LEGION_FIELD_MASK_FIELD_TYPE,LEGION_MAX_FIELDS,
2758 LEGION_FIELD_MASK_FIELD_SHIFT,
2759 LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
2760#else
2761 typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,LEGION_MAX_FIELDS,
2762 LEGION_FIELD_MASK_FIELD_SHIFT,
2763 LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
2764#endif
2765#endif
2766 typedef BitPermutation<FieldMask,LEGION_FIELD_LOG2> FieldPermutation;
2767 typedef Fraction<unsigned long> InstFrac;
2768#undef LEGION_FIELD_MASK_FIELD_SHIFT
2769#undef LEGION_FIELD_MASK_FIELD_MASK
2770
2771 // Similar logic as field masks for node masks
2772
2773// The following macros are used in the NodeMask instantiation of BitMask
2774// If you change one you probably have to change the others too
2775#define LEGION_NODE_MASK_NODE_TYPE uint64_t
2776#define LEGION_NODE_MASK_NODE_SHIFT 6
2777#define LEGION_NODE_MASK_NODE_MASK 0x3F
2778#define LEGION_NODE_MASK_NODE_ALL_ONES 0xFFFFFFFFFFFFFFFF
2779
2780#if defined(__AVX__)
2781#if (LEGION_MAX_NUM_NODES > 256)
2782 typedef AVXTLBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2783#elif (LEGION_MAX_NUM_NODES > 128)
2784 typedef AVXBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2785#elif (LEGION_MAX_NUM_NODES > 64)
2786 typedef SSEBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2787#else
2788 typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,LEGION_MAX_NUM_NODES,
2789 LEGION_NODE_MASK_NODE_SHIFT,
2790 LEGION_NODE_MASK_NODE_MASK> NodeMask;
2791#endif
2792#elif defined(__SSE2__)
2793#if (LEGION_MAX_NUM_NODES > 128)
2794 typedef SSETLBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2795#elif (LEGION_MAX_NUM_NODES > 64)
2796 typedef SSEBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2797#else
2798 typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,LEGION_MAX_NUM_NODES,
2799 LEGION_NODE_MASK_NODE_SHIFT,
2800 LEGION_NODE_MASK_NODE_MASK> NodeMask;
2801#endif
2802#elif defined(__ALTIVEC__)
2803#if (LEGION_MAX_NUM_NODES > 128)
2804 typedef PPCTLBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2805#elif (LEGION_MAX_NUM_NODES > 64)
2806 typedef PPCBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2807#else
2808 typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,LEGION_MAX_NUM_NODES,
2809 LEGION_NODE_MASK_NODE_SHIFT,
2810 LEGION_NODE_MASK_NODE_MASK> NodeMask;
2811#endif
2812#elif defined(__ARM_NEON)
2813#if (LEGION_MAX_NUM_NODES > 128)
2814 typedef NeonTLBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2815#elif (LEGION_MAX_NUM_NODES > 64)
2816 typedef NeonBitMask<LEGION_MAX_NUM_NODES> NodeMask;
2817#else
2818 typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,LEGION_MAX_NUM_NODES,
2819 LEGION_NODE_MASK_NODE_SHIFT,
2820 LEGION_NODE_MASK_NODE_MASK> NodeMask;
2821#endif
2822#else
2823#if (LEGION_MAX_NUM_NODES > 64)
2824 typedef TLBitMask<LEGION_NODE_MASK_NODE_TYPE,LEGION_MAX_NUM_NODES,
2825 LEGION_NODE_MASK_NODE_SHIFT,
2826 LEGION_NODE_MASK_NODE_MASK> NodeMask;
2827#else
2828 typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,LEGION_MAX_NUM_NODES,
2829 LEGION_NODE_MASK_NODE_SHIFT,
2830 LEGION_NODE_MASK_NODE_MASK> NodeMask;
2831#endif
2832#endif
2833 typedef CompoundBitMask<NodeMask,1/*bloat*/,true/*bidir*/> NodeSet;
2834
2835#undef LEGION_NODE_MASK_NODE_SHIFT
2836#undef LEGION_NODE_MASK_NODE_MASK
2837
2838// The following macros are used in the ProcessorMask instantiation of BitMask
2839// If you change one you probably have to change the others too
2840#define LEGION_PROC_MASK_PROC_TYPE uint64_t
2841#define LEGION_PROC_MASK_PROC_SHIFT 6
2842#define LEGION_PROC_MASK_PROC_MASK 0x3F
2843#define LEGION_PROC_MASK_PROC_ALL_ONES 0xFFFFFFFFFFFFFFFF
2844
2845#if defined(__AVX__)
2846#if (LEGION_MAX_NUM_PROCS > 256)
2847 typedef AVXTLBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2848#elif (LEGION_MAX_NUM_PROCS > 128)
2849 typedef AVXBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2850#elif (LEGION_MAX_NUM_PROCS > 64)
2851 typedef SSEBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2852#else
2853 typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,LEGION_MAX_NUM_PROCS,
2854 LEGION_PROC_MASK_PROC_SHIFT,
2855 LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
2856#endif
2857#elif defined(__SSE2__)
2858#if (LEGION_MAX_NUM_PROCS > 128)
2859 typedef SSETLBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2860#elif (LEGION_MAX_NUM_PROCS > 64)
2861 typedef SSEBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2862#else
2863 typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,LEGION_MAX_NUM_PROCS,
2864 LEGION_PROC_MASK_PROC_SHIFT,
2865 LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
2866#endif
2867#elif defined(__ALTIVEC__)
2868#if (LEGION_MAX_NUM_PROCS > 128)
2869 typedef PPCTLBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2870#elif (LEGION_MAX_NUM_PROCS > 64)
2871 typedef PPCBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2872#else
2873 typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,LEGION_MAX_NUM_PROCS,
2874 LEGION_PROC_MASK_PROC_SHIFT,
2875 LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
2876#endif
2877#elif defined(__ARM_NEON)
2878#if (LEGION_MAX_NUM_PROCS > 128)
2879 typedef NeonTLBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2880#elif (LEGION_MAX_NUM_PROCS > 64)
2881 typedef NeonBitMask<LEGION_MAX_NUM_PROCS> ProcessorMask;
2882#else
2883 typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,LEGION_MAX_NUM_PROCS,
2884 LEGION_PROC_MASK_PROC_SHIFT,
2885 LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
2886#endif
2887#else
2888#if (LEGION_MAX_NUM_PROCS > 64)
2889 typedef TLBitMask<LEGION_PROC_MASK_PROC_TYPE,LEGION_MAX_NUM_PROCS,
2890 LEGION_PROC_MASK_PROC_SHIFT,
2891 LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
2892#else
2893 typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,LEGION_MAX_NUM_PROCS,
2894 LEGION_PROC_MASK_PROC_SHIFT,
2895 LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
2896#endif
2897#endif
2898
2899#undef PROC_SHIFT
2900#undef PROC_MASK
2901
2902 // Legion derived event types
2903 class LgEvent : public Realm::Event {
2904 public:
2905 static const LgEvent NO_LG_EVENT;
2906 public:
2907 LgEvent(void) noexcept { id = 0; }
2908 LgEvent(const LgEvent &rhs) = default;
2909 explicit LgEvent(const Realm::Event e) { id = e.id; }
2910 public:
2911 inline LgEvent& operator=(const LgEvent &rhs) = default;
2912 public:
2913 // Override the wait method so we can have our own implementation
2914 inline void wait(void) const;
2915 inline void wait_faultaware(bool &poisoned, bool from_application) const;
2916 inline bool is_barrier(void) const;
2917 protected:
2918 void begin_context_wait(Context ctx, bool from_application) const;
2919 void end_context_wait(Context ctx, bool from_application) const;
2920 void begin_mapper_call_wait(MappingCallInfo *call) const;
2921 void record_event_wait(LegionProfInstance *profiler,
2922 Realm::Backtrace &bt) const;
2923 void record_event_trigger(LgEvent precondition) const;
2924 };
2925
2926 class PredEvent : public LgEvent {
2927 public:
2928 static const PredEvent NO_PRED_EVENT;
2929 public:
2930 PredEvent(void) noexcept : LgEvent() { }
2931 PredEvent(const PredEvent &rhs) = default;
2932 explicit PredEvent(const Realm::Event &e) : LgEvent(e) { }
2933 public:
2934 inline PredEvent& operator=(const PredEvent &rhs) = default;
2935 };
2936
2937 class PredUserEvent : public PredEvent {
2938 public:
2939 static const PredUserEvent NO_PRED_USER_EVENT;
2940 public:
2941 PredUserEvent(void) noexcept : PredEvent() { }
2942 PredUserEvent(const PredUserEvent &rhs) = default;
2943 explicit PredUserEvent(const Realm::UserEvent &e) : PredEvent(e) { }
2944 public:
2945 inline PredUserEvent& operator=(const PredUserEvent &rhs) = default;
2946 inline operator Realm::UserEvent() const
2947 { Realm::UserEvent e; e.id = id; return e; }
2948 };
2949
2950 class ApEvent : public LgEvent {
2951 public:
2952 static const ApEvent NO_AP_EVENT;
2953 public:
2954 ApEvent(void) noexcept : LgEvent() { }
2955 ApEvent(const ApEvent &rhs) = default;
2956 explicit ApEvent(const Realm::Event &e) : LgEvent(e) { }
2957 explicit ApEvent(const PredEvent &e) { id = e.id; }
2958 public:
2959 inline ApEvent& operator=(const ApEvent &rhs) = default;
2960 inline bool has_triggered_faultignorant(void) const
2961 { bool poisoned = false;
2962 return has_triggered_faultaware(poisoned); }
2963 inline void wait_faultaware(bool &poisoned) const
2964 { return LgEvent::wait_faultaware(poisoned, true/*application*/); }
2965 inline void wait_faultignorant(void) const
2966 { bool poisoned = false;
2967 LgEvent::wait_faultaware(poisoned, true/*application*/); }
2968 private:
2969 // Make these private because we always want to be conscious of faults
2970 // when testing or waiting on application events
2971 inline bool has_triggered(void) const { return LgEvent::has_triggered(); }
2972 inline void wait(void) const { LgEvent::wait(); }
2973 };
2974
2975 class ApUserEvent : public ApEvent {
2976 public:
2977 static const ApUserEvent NO_AP_USER_EVENT;
2978 public:
2979 ApUserEvent(void) noexcept : ApEvent() { }
2980 ApUserEvent(const ApUserEvent &rhs) = default;
2981 explicit ApUserEvent(const Realm::UserEvent &e) : ApEvent(e) { }
2982 public:
2983 inline ApUserEvent& operator=(const ApUserEvent &rhs) = default;
2984 inline operator Realm::UserEvent() const
2985 { Realm::UserEvent e; e.id = id; return e; }
2986 };
2987
2988 class ApBarrier : public ApEvent {
2989 public:
2990 static const ApBarrier NO_AP_BARRIER;
2991 public:
2992 ApBarrier(void) noexcept : ApEvent(), timestamp(0) { }
2993 ApBarrier(const ApBarrier &rhs) = default;
2994 explicit ApBarrier(const Realm::Barrier &b)
2995 : ApEvent(b), timestamp(b.timestamp) { }
2996 public:
2997 inline ApBarrier& operator=(const ApBarrier &rhs) = default;
2998 inline operator Realm::Barrier() const
2999 { Realm::Barrier b; b.id = id;
3000 b.timestamp = timestamp; return b; }
3001 public:
3002 inline bool get_result(void *value, size_t value_size) const
3003 { Realm::Barrier b; b.id = id;
3004 b.timestamp = timestamp; return b.get_result(value, value_size); }
3005 inline void destroy_barrier(void)
3006 { Realm::Barrier b; b.id = id;
3007 b.timestamp = timestamp; b.destroy_barrier(); }
3008 public:
3009 Realm::Barrier::timestamp_t timestamp;
3010 };
3011
3012 class RtEvent : public LgEvent {
3013 public:
3014 static const RtEvent NO_RT_EVENT;
3015 public:
3016 RtEvent(void) noexcept : LgEvent() { }
3017 RtEvent(const RtEvent &rhs) = default;
3018 explicit RtEvent(const Realm::Event &e) : LgEvent(e) { }
3019 explicit RtEvent(const PredEvent &e) { id = e.id; }
3020 public:
3021 inline RtEvent& operator=(const RtEvent &rhs) = default;
3022 };
3023
3024 class RtUserEvent : public RtEvent {
3025 public:
3026 static const RtUserEvent NO_RT_USER_EVENT;
3027 public:
3028 RtUserEvent(void) noexcept : RtEvent() { }
3029 RtUserEvent(const RtUserEvent &rhs) = default;
3030 explicit RtUserEvent(const Realm::UserEvent &e) : RtEvent(e) { }
3031 public:
3032 inline RtUserEvent& operator=(const RtUserEvent &rhs) = default;
3033 inline operator Realm::UserEvent() const
3034 { Realm::UserEvent e; e.id = id; return e; }
3035 };
3036
3037 class RtBarrier : public RtEvent {
3038 public:
3039 static const RtBarrier NO_RT_BARRIER;
3040 public:
3041 RtBarrier(void) noexcept : RtEvent(), timestamp(0) { }
3042 RtBarrier(const RtBarrier &rhs) = default;
3043 explicit RtBarrier(const Realm::Barrier &b)
3044 : RtEvent(b), timestamp(b.timestamp) { }
3045 public:
3046 inline RtBarrier& operator=(const RtBarrier &rhs) = default;
3047 inline operator Realm::Barrier() const
3048 { Realm::Barrier b; b.id = id;
3049 b.timestamp = timestamp; return b; }
3050 public:
3051 inline bool get_result(void *value, size_t value_size) const
3052 { Realm::Barrier b; b.id = id;
3053 b.timestamp = timestamp; return b.get_result(value, value_size); }
3054 inline RtBarrier get_previous_phase(void)
3055 { Realm::Barrier b; b.id = id;
3056 return RtBarrier(b.get_previous_phase()); }
3057 inline void destroy_barrier(void)
3058 { Realm::Barrier b; b.id = id;
3059 b.timestamp = timestamp; b.destroy_barrier(); }
3060 public:
3061 Realm::Barrier::timestamp_t timestamp;
3062 };
3063
3064 // Local lock for accelerating lock taking
3066 public:
3067 inline LocalLock(void) { }
3068 public:
3069 inline LocalLock(const LocalLock &rhs)
3070 {
3071 // should never be called
3072 assert(false);
3073 }
3074 inline ~LocalLock(void) { }
3075 public:
3076 inline LocalLock& operator=(const LocalLock &rhs)
3077 {
3078 // should never be called
3079 assert(false);
3080 return *this;
3081 }
3082 private:
3083 // These are only accessible via AutoLock
3084 friend class AutoLock;
3085 friend class AutoTryLock;
3086 friend class Mapping::AutoLock;
3087 inline RtEvent lock(void) { return RtEvent(wrlock()); }
3088 inline RtEvent wrlock(void) { return RtEvent(reservation.wrlock()); }
3089 inline RtEvent rdlock(void) { return RtEvent(reservation.rdlock()); }
3090 inline bool trylock(void) { return reservation.trylock(); }
3091 inline bool trywrlock(void) { return reservation.trywrlock(); }
3092 inline bool tryrdlock(void) { return reservation.tryrdlock(); }
3093 inline void unlock(void) { reservation.unlock(); }
3094 private:
3095 inline void advise_sleep_entry(Realm::UserEvent guard)
3096 { reservation.advise_sleep_entry(guard); }
3097 inline void advise_sleep_exit(void)
3098 { reservation.advise_sleep_exit(); }
3099 protected:
3100 Realm::FastReservation reservation;
3101 };
3102
3104 // AutoLock
3106 // An auto locking class for taking a lock and releasing it when
3107 // the object goes out of scope
3108 class AutoLock {
3109 public:
3110 inline AutoLock(LocalLock &r, int mode = 0, bool excl = true)
3111 : local_lock(r), previous(Internal::local_lock_list),
3112 exclusive(excl), held(true)
3113 {
3114#ifdef DEBUG_REENTRANT_LOCKS
3115 if (previous != NULL)
3116 previous->check_for_reentrant_locks(&local_lock);
3117#endif
3118 if (exclusive)
3119 {
3120 RtEvent ready = local_lock.wrlock();
3121 while (ready.exists())
3122 {
3123 ready.wait();
3124 ready = local_lock.wrlock();
3125 }
3126 }
3127 else
3128 {
3129 RtEvent ready = local_lock.rdlock();
3130 while (ready.exists())
3131 {
3132 ready.wait();
3133 ready = local_lock.rdlock();
3134 }
3135 }
3136 Internal::local_lock_list = this;
3137 }
3138 protected:
3139 // Helper constructor for AutoTryLock and Mapping::AutoLock
3140 inline AutoLock(int mode, bool excl, LocalLock &r)
3141 : local_lock(r), previous(Internal::local_lock_list),
3142 exclusive(excl), held(false)
3143 {
3144#ifdef DEBUG_REENTRANT_LOCKS
3145 if (previous != NULL)
3146 previous->check_for_reentrant_locks(&local_lock);
3147#endif
3148 }
3149 public:
3150 AutoLock(AutoLock &&rhs) = delete;
3151 AutoLock(const AutoLock &rhs) = delete;
3152 inline ~AutoLock(void)
3153 {
3154 if (held)
3155 {
3156#ifdef DEBUG_LEGION
3157 assert(Internal::local_lock_list == this);
3158#endif
3159 local_lock.unlock();
3160 Internal::local_lock_list = previous;
3161 }
3162 else
3163 assert(Internal::local_lock_list == previous);
3164 }
3165 public:
3166 AutoLock& operator=(AutoLock &&rhs) = delete;
3167 AutoLock& operator=(const AutoLock &rhs) = delete;
3168 public:
3169 inline void release(void)
3170 {
3171#ifdef DEBUG_LEGION
3172 assert(held);
3173 assert(Internal::local_lock_list == this);
3174#endif
3175 local_lock.unlock();
3176 Internal::local_lock_list = previous;
3177 held = false;
3178 }
3179 inline void reacquire(void)
3180 {
3181#ifdef DEBUG_LEGION
3182 assert(!held);
3183 assert(Internal::local_lock_list == previous);
3184#endif
3185#ifdef DEBUG_REENTRANT_LOCKS
3186 if (previous != NULL)
3187 previous->check_for_reentrant_locks(&local_lock);
3188#endif
3189 if (exclusive)
3190 {
3191 RtEvent ready = local_lock.wrlock();
3192 while (ready.exists())
3193 {
3194 ready.wait();
3195 ready = local_lock.wrlock();
3196 }
3197 }
3198 else
3199 {
3200 RtEvent ready = local_lock.rdlock();
3201 while (ready.exists())
3202 {
3203 ready.wait();
3204 ready = local_lock.rdlock();
3205 }
3206 }
3207 Internal::local_lock_list = this;
3208 held = true;
3209 }
3210 public:
3211 inline void advise_sleep_entry(Realm::UserEvent guard) const
3212 {
3213 if (held)
3214 local_lock.advise_sleep_entry(guard);
3215 if (previous != NULL)
3216 previous->advise_sleep_entry(guard);
3217 }
3218 inline void advise_sleep_exit(void) const
3219 {
3220 if (held)
3221 local_lock.advise_sleep_exit();
3222 if (previous != NULL)
3223 previous->advise_sleep_exit();
3224 }
3225#ifdef DEBUG_REENTRANT_LOCKS
3226 inline void check_for_reentrant_locks(LocalLock *to_acquire) const
3227 {
3228 assert(to_acquire != &local_lock);
3229 if (previous != NULL)
3230 previous->check_for_reentrant_locks(to_acquire);
3231 }
3232#endif
3233 protected:
3234 LocalLock &local_lock;
3235 AutoLock *const previous;
3236 const bool exclusive;
3237 bool held;
3238 };
3239
3240 // AutoTryLock is an extension of AutoLock that supports try lock
3241 class AutoTryLock : public AutoLock {
3242 public:
3243 inline AutoTryLock(LocalLock &r, int mode = 0, bool excl = true)
3244 : AutoLock(mode, excl, r)
3245 {
3246 if (exclusive)
3247 ready = local_lock.wrlock();
3248 else
3249 ready = local_lock.rdlock();
3250 held = !ready.exists();
3251 if (held)
3252 Internal::local_lock_list = this;
3253 }
3254 AutoTryLock(const AutoTryLock &rhs) = delete;
3255 public:
3256 AutoTryLock& operator=(const AutoTryLock &rhs) = delete;
3257 public:
3258 // Allow an easy test for whether we got the lock or not
3259 inline bool has_lock(void) const { return held; }
3260 inline RtEvent try_next(void) const { return ready; }
3261 protected:
3262 RtEvent ready;
3263 };
3264
3265 // Special method that we need here for waiting on events
3266
3267 //--------------------------------------------------------------------------
3268 inline void LgEvent::wait(void) const
3269 //--------------------------------------------------------------------------
3270 {
3271 if (!exists())
3272 return;
3273#ifdef DEBUG_LEGION_CALLERS
3274 LgTaskID local_kind = Internal::implicit_task_kind;
3275 LgTaskID local_caller = Internal::implicit_task_caller;
3276#endif
3277 // Save the mapper call locally
3278 Internal::MappingCallInfo *local_call = Internal::implicit_mapper_call;
3279 // If we're in a mapper call, notify the mapper that we're waiting
3280 // Do this first in case we get a re-entrant wait (e.g. because
3281 // SerializingManager::pause_mapper_call takes and lock and we might
3282 // end up coming back around here to wait on that event too)
3283 if (local_call != NULL)
3284 {
3285 Internal::implicit_mapper_call = NULL;
3286 begin_mapper_call_wait(local_call);
3287 }
3288 // Save whether we are in a registration callback
3289 unsigned local_callback = Internal::inside_registration_callback;
3290 // Save the reference tracker that we have
3291 ImplicitReferenceTracker *local_tracker = implicit_reference_tracker;
3292 Internal::implicit_reference_tracker = NULL;
3293 LegionProfInstance *local_profiler = Internal::implicit_profiler;
3294 if (local_profiler != NULL)
3295 {
3296 // Cannot call back into wait while recording a wait
3297 implicit_profiler = NULL;
3298 Realm::Backtrace bt;
3299 bt.capture_backtrace();
3300 record_event_wait(local_profiler, bt);
3301 }
3302 // Save the context locally
3303 Internal::TaskContext *local_ctx = Internal::implicit_context;
3304 Internal::implicit_context = NULL;
3305 // Save the implicit fevent
3306 LgEvent local_fevent = Internal::implicit_fevent;
3307 Internal::implicit_fevent = LgEvent::NO_LG_EVENT;
3308 // Save the task provenance information
3309 UniqueID local_provenance = Internal::implicit_provenance;
3310 Internal::implicit_provenance = 0;
3311 // Check to see if we have any local locks to notify
3312 if (Internal::local_lock_list != NULL)
3313 {
3314 // Make a copy of the local locks here
3315 AutoLock *local_lock_list_copy = Internal::local_lock_list;
3316 // Set this back to NULL until we are done waiting
3317 Internal::local_lock_list = NULL;
3318 // Make a user event and notify all the thread locks
3319 const Realm::UserEvent done = Realm::UserEvent::create_user_event();
3320 local_lock_list_copy->advise_sleep_entry(done);
3321 if (local_ctx != NULL)
3322 begin_context_wait(local_ctx, false/*from application*/);
3323 // Now we can do the wait
3324 if (!Processor::get_executing_processor().exists())
3325 Realm::Event::external_wait();
3326 else
3327 Realm::Event::wait();
3328 if (local_ctx != NULL)
3329 end_context_wait(local_ctx, false/*from application*/);
3330 // When we wake up, notify that we are done and exited the wait
3331 local_lock_list_copy->advise_sleep_exit();
3332 // If we're profiling we need to record that we triggered this
3333 // event as it will help us hook up the critical path for
3334 // local lock acquires
3335 if (local_profiler != NULL)
3336 {
3337 // Make sure to restore this before recording
3338 Internal::implicit_fevent = local_fevent;
3339 Internal::implicit_profiler = local_profiler;
3340 const LgEvent to_trigger(done);
3341 to_trigger.record_event_trigger(LgEvent::NO_LG_EVENT);
3342 }
3343 // Trigger the user-event
3344 done.trigger();
3345 // Restore our local lock list
3346 Internal::local_lock_list = local_lock_list_copy;
3347 }
3348 else // Just do the normal wait
3349 {
3350 if (local_ctx != NULL)
3351 begin_context_wait(local_ctx, false/*from application*/);
3352 if (!Processor::get_executing_processor().exists())
3353 Realm::Event::external_wait();
3354 else
3355 Realm::Event::wait();
3356 if (local_ctx != NULL)
3357 end_context_wait(local_ctx, false/*from application*/);
3358 }
3359 // Write the context back
3360 Internal::implicit_context = local_ctx;
3361 // Write the mapper call back
3362 Internal::implicit_mapper_call = local_call;
3363 // Write the implicit fevent back
3364 Internal::implicit_fevent = local_fevent;
3365 // Write the provenance information back
3366 Internal::implicit_provenance = local_provenance;
3367 // Restore the local profiler
3368 Internal::implicit_profiler = local_profiler;
3369#ifdef DEBUG_LEGION_CALLERS
3370 Internal::implicit_task_kind = local_kind;
3371 Internal::implicit_task_caller = local_caller;
3372#endif
3373 // Write the registration callback information back
3374 Internal::inside_registration_callback = local_callback;
3375#ifdef DEBUG_LEGION
3376 assert(Internal::implicit_reference_tracker == NULL);
3377#endif
3378 // Write the local reference tracker back
3379 Internal::implicit_reference_tracker = local_tracker;
3380 }
3381
3382 //--------------------------------------------------------------------------
3383 inline void LgEvent::wait_faultaware(bool &poisoned, bool from_app) const
3384 //--------------------------------------------------------------------------
3385 {
3386 if (!exists())
3387 return;
3388 if (has_triggered_faultaware(poisoned))
3389 return;
3390#ifdef DEBUG_LEGION_CALLERS
3391 LgTaskID local_kind = Internal::implicit_task_kind;
3392 LgTaskID local_caller = Internal::implicit_task_caller;
3393#endif
3394 // Save the mapper call locally
3395 Internal::MappingCallInfo *local_call = Internal::implicit_mapper_call;
3396 // If we're in a mapper call, notify the mapper that we're waiting
3397 // Do this first in case we get a re-entrant wait (e.g. because
3398 // SerializingManager::pause_mapper_call takes and lock and we might
3399 // end up coming back around here to wait on that event too)
3400 if (local_call != NULL)
3401 {
3402 Internal::implicit_mapper_call = NULL;
3403 begin_mapper_call_wait(local_call);
3404 }
3405 // Save whether we are in a registration callback
3406 unsigned local_callback = Internal::inside_registration_callback;
3407 // Save the reference tracker that we have
3408 ImplicitReferenceTracker *local_tracker = implicit_reference_tracker;
3409 Internal::implicit_reference_tracker = NULL;
3410 LegionProfInstance *local_profiler = Internal::implicit_profiler;
3411 if (local_profiler != NULL)
3412 {
3413 // Cannot call back into wait while recording a wait
3414 implicit_profiler = NULL;
3415 Realm::Backtrace bt;
3416 bt.capture_backtrace();
3417 record_event_wait(local_profiler, bt);
3418 }
3419 // Save the context locally
3420 Internal::TaskContext *local_ctx = Internal::implicit_context;
3421 Internal::implicit_context = NULL;
3422 // Save the fevent
3423 LgEvent local_fevent = Internal::implicit_fevent;
3424 Internal::implicit_fevent = LgEvent::NO_LG_EVENT;
3425 // Save the task provenance information
3426 UniqueID local_provenance = Internal::implicit_provenance;
3427 Internal::implicit_provenance = 0;
3428 // Check to see if we have any local locks to notify
3429 if (Internal::local_lock_list != NULL)
3430 {
3431 // Make a copy of the local locks here
3432 AutoLock *local_lock_list_copy = Internal::local_lock_list;
3433 // Set this back to NULL until we are done waiting
3434 Internal::local_lock_list = NULL;
3435 // Make a user event and notify all the thread locks
3436 const Realm::UserEvent done = Realm::UserEvent::create_user_event();
3437 local_lock_list_copy->advise_sleep_entry(done);
3438 if (local_ctx != NULL)
3439 begin_context_wait(local_ctx, from_app);
3440 // Now we can do the wait
3441 if (!Processor::get_executing_processor().exists())
3442 Realm::Event::external_wait_faultaware(poisoned);
3443 else
3444 Realm::Event::wait_faultaware(poisoned);
3445 if (local_ctx != NULL)
3446 end_context_wait(local_ctx, from_app);
3447 // When we wake up, notify that we are done and exited the wait
3448 local_lock_list_copy->advise_sleep_exit();
3449 // If we're profiling we need to record that we triggered this
3450 // event as it will help us hook up the critical path for
3451 // local lock acquires
3452 if (local_profiler != NULL)
3453 {
3454 // Make sure to restore this before recording
3455 Internal::implicit_fevent = local_fevent;
3456 Internal::implicit_profiler = local_profiler;
3457 const LgEvent to_trigger(done);
3458 to_trigger.record_event_trigger(LgEvent::NO_LG_EVENT);
3459 }
3460 // Trigger the user-event
3461 done.trigger();
3462 // Restore our local lock list
3463 Internal::local_lock_list = local_lock_list_copy;
3464 }
3465 else // Just do the normal wait
3466 {
3467 if (local_ctx != NULL)
3468 begin_context_wait(local_ctx, from_app);
3469 if (!Processor::get_executing_processor().exists())
3470 Realm::Event::external_wait_faultaware(poisoned);
3471 else
3472 Realm::Event::wait_faultaware(poisoned);
3473 if (local_ctx != NULL)
3474 end_context_wait(local_ctx, from_app);
3475 }
3476 // Write the context back
3477 Internal::implicit_context = local_ctx;
3478 // Write the mapper call back
3479 Internal::implicit_mapper_call = local_call;
3480 // Write the implicit fevent back
3481 Internal::implicit_fevent = local_fevent;
3482 // Write the provenance information back
3483 Internal::implicit_provenance = local_provenance;
3484 // Restore the local profiler
3485 Internal::implicit_profiler = local_profiler;
3486#ifdef DEBUG_LEGION_CALLERS
3487 Internal::implicit_task_kind = local_kind;
3488 Internal::implicit_task_caller = local_caller;
3489#endif
3490 // Write the registration callback information back
3491 Internal::inside_registration_callback = local_callback;
3492#ifdef DEBUG_LEGION
3493 assert(Internal::implicit_reference_tracker == NULL);
3494#endif
3495 // Write the local reference tracker back
3496 Internal::implicit_reference_tracker = local_tracker;
3497 }
3498
3499 //--------------------------------------------------------------------------
3500 inline bool LgEvent::is_barrier(void) const
3501 //--------------------------------------------------------------------------
3502 {
3503 const Realm::ID identity(id);
3504 return identity.is_barrier();
3505 }
3506
3507 }; // namespace Internal
3508
3509 // A class for preventing serialization of Legion objects
3510 // which cannot be serialized
3511 template<typename T>
3513 public:
3514 inline size_t legion_buffer_size(void);
3515 inline size_t legion_serialize(void *buffer);
3516 inline size_t legion_deserialize(const void *buffer);
3517 };
3518
3519}; // Legion namespace
3520
3521#endif // __LEGION_TYPES_H__
Definition legion_types.h:101
Definition legion_types.h:120
Definition legion.h:4551
Definition legion_types.h:209
Definition legion_types.h:210
Definition legion_c_util.h:53
Definition legion.h:4599
Definition legion.h:4500
Definition legion_domain.h:253
Definition legion_domain.h:132
Definition legion.h:4617
Definition legion.h:4529
Definition legion_types.h:2333
Definition legion_types.h:2336
Definition legion_types.h:2988
Definition legion_types.h:2950
Definition legion_types.h:2975
Definition legion_types.h:3108
Definition legion_types.h:3241
Definition legion_types.h:2334
Definition legion_types.h:2043
Definition legion_types.h:2213
Definition legion_types.h:2216
Definition legion_types.h:2042
Definition legion_types.h:2207
Definition legion_types.h:2201
Definition legion_types.h:2200
Definition legion_types.h:2205
Definition legion_types.h:2198
Definition legion_types.h:2199
Definition legion_types.h:2214
Definition legion_types.h:2903
Definition legion_types.h:3065
Definition legion_types.h:2129
Definition legion_types.h:2926
Definition legion_types.h:2937
Definition legion_types.h:2131
Definition legion_types.h:3037
Definition legion_types.h:3012
Definition legion_types.h:3024
Definition legion_types.h:2335
Definition legion.h:4244
Definition legion.h:304
Definition legion.h:236
Definition legion.h:4309
Definition legion.h:4678
Definition legion.h:4645
Definition legion.h:3618
Definition legion.h:3658
Definition legion.h:5095
Definition legion.h:4760
Definition legion.h:4573
Definition legion.h:5135
Definition legion.h:5001
Definition legion.h:3693
Definition legion.h:4429
Definition legion_types.h:207
Definition legion_types.h:3512
Definition legion_types.h:103
Definition legion.h:4703
Definition legion_types.h:2399
Definition legion_types.h:2664
Definition legion.h:4713