THE Oly-Whites' hopes of progressing to the quarter finals of the men's Olympic soccer tournament have been dealt a huge blow after they could only manage a 1-1 draw against Egypt at Old Trafford.
Chris Wood opened the Oly-Whites' account in the 17th minute with a finish at the far post after a corner kick from Michael McGlinchey was passed on by Tommy Smith.
However, just before halftime Egypt's Mohamed Salah equalised to set up a tense but free-flowing second half in which both sides had great opportunities to score.
The Oly-Whites now need to beat Brazil in their final match of the competition to secure a spot in the quarter finals.


text:
Keep Coming Back can refer to:

 Keep Coming Back (album), an album by Marc Broussard
 "Keep Coming Back" (song), a song by Richard Marx
 "Keep Coming Back", a song by Edie Brickell  & New Bohemians from Shooting Rubberbands at the Stars
 Keep Coming Back (film), a 2011 film with Jennifer Sciole

See also
 I Keep Coming Back (disambiguation)

redpajama_set_name: RedPajamaWikipedia


text:
#ifndef __LEGION_TYPES_H__
#define __LEGION_TYPES_H__

/**
 * \file legion_types.h
 */

#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <stdint.h>

#include "limits.h"

#include <map>
#include <set>
#include <list>
#include <deque>
#include <vector>

#include "legion_config.h"
#include "legion_template_help.h"

// Make sure we have the appropriate defines in place for including realm
#define REALM_USE_LEGION_LAYOUT_CONSTRAINTS
#include "realm.h"

namespace BindingLib { class Utility; } // BindingLib namespace

namespace Legion {

  typedef ::legion_error_t LegionErrorType;
  typedef ::legion_privilege_mode_t PrivilegeMode;
  typedef ::legion_allocate_mode_t AllocateMode;
  typedef ::legion_coherence_property_t CoherenceProperty;
  typedef ::legion_region_flags_t RegionFlags;
  typedef ::legion_projection_type_t ProjectionType;
  typedef ::legion_partition_kind_t PartitionKind;
  typedef ::legion_external_resource_t ExternalResource;
  typedef ::legion_timing_measurement_t TimingMeasurement;
  typedef ::legion_dependence_type_t DependenceType;
  typedef ::legion_index_space_kind_t IndexSpaceKind;
  typedef ::legion_file_mode_t LegionFileMode;
  typedef ::legion_execution_constraint_t ExecutionConstraintKind;
  typedef ::legion_layout_constraint_t LayoutConstraintKind;
  typedef ::legion_equality_kind_t EqualityKind;
  typedef ::legion_dimension_kind_t DimensionKind;
  typedef ::legion_isa_kind_t ISAKind;
  typedef ::legion_resource_constraint_t ResourceKind;
  typedef ::legion_launch_constraint_t LaunchKind;
  typedef ::legion_specialized_constraint_t SpecializedKind;

  // Forward declarations for user level objects
  // legion.h
  class IndexSpace;
  class IndexPartition;
  class FieldSpace;
  class LogicalRegion;
  class LogicalPartition;
  class IndexAllocator;
  class FieldAllocator;
  class TaskArgument;
  class ArgumentMap;
  class Lock;
  struct LockRequest;
  class Grant;
  class PhaseBarrier;
  struct RegionRequirement;
  struct IndexSpaceRequirement;
  struct FieldSpaceRequirement;
  struct TaskLauncher;
  struct IndexTaskLauncher;
  typedef IndexTaskLauncher IndexLauncher; // for backwards compatibility
  struct InlineLauncher;
  struct CopyLauncher;
  struct AcquireLauncher;
  struct ReleaseLauncher;
  struct FillLauncher;
  struct LayoutConstraintRegistrar;
  struct TaskVariantRegistrar;
  struct TaskGeneratorArguments;
  class Future;
  class FutureMap;
  class Predicate;
  class PhysicalRegion;
  class IndexIterator;
  template<typename T> struct ColoredPoints;
  struct InputArgs;
  class ProjectionFunctor;
  class Task;
  class Copy;
  class InlineMapping;
  class Acquire;
  class Release;
  class Close;
  class Fill;
  class Runtime;
  class MPILegionHandshake;
  // For backwards compatibility
  typedef Runtime HighLevelRuntime;
  // Helper for saving instantiated template functions
  struct SerdezRedopFns;

  // Forward declarations for compiler level objects
  // legion.h
  class ColoringSerializer;
  class DomainColoringSerializer;

  // Forward declarations for wrapper tasks
  // legion.h
  class LegionTaskWrapper;
  class LegionSerialization;

  // Forward declarations for C wrapper objects
  // legion_c_util.h
  class TaskResult;
  class CObjectWrapper;

  // legion_utilities.h
  struct RegionUsage;
  class AutoLock;
  class ImmovableAutoLock;
  class ColorPoint;
  class Serializer;
  class Deserializer;
  class LgEvent; // base event type for legion
  class ApEvent; // application event
  class ApUserEvent; // application user event
  class ApBarrier; // application barrier
  class RtEvent; // runtime event
  class RtUserEvent; // runtime user event
  class RtBarrier;
  template<typename T> class Fraction;
  template<typename T, unsigned int MAX,
           unsigned SHIFT, unsigned MASK> class BitMask;
  template<typename T, unsigned int MAX,
           unsigned SHIFT, unsigned MASK> class TLBitMask;
#ifdef __SSE2__
  template<unsigned int MAX> class SSEBitMask;
  template<unsigned int MAX> class SSETLBitMask;
#endif
#ifdef __AVX__
  template<unsigned int MAX> class AVXBitMask;
  template<unsigned int MAX> class AVXTLBitMask;
#endif
  template<typename T, unsigned LOG2MAX> class BitPermutation;
  template<typename IT, typename DT, bool BIDIR = false> class IntegerSet;

  // legion_constraint.h
  class ISAConstraint;
  class ProcessorConstraint;
  class ResourceConstraint;
  class LaunchConstraint;
  class ColocationConstraint;
  class ExecutionConstraintSet;

  class SpecializedConstraint;
  class MemoryConstraint;
  class FieldConstraint;
  class OrderingConstraint;
  class SplittingConstraint;
  class DimensionConstraint;
  class AlignmentConstraint;
  class OffsetConstraint;
  class PointerConstraint;
  class LayoutConstraintSet;
  class TaskLayoutConstraintSet;

  namespace Mapping {
    class PhysicalInstance;
    class MapperEvent;
    class ProfilingRequestSet;
    class Mapper;
    class MapperRuntime;
    class DefaultMapper;
    class ShimMapper;
    class TestMapper;
    class DebugMapper;
    class ReplayMapper;

    // The following types are effectively overlaid on the Realm versions
    // to allow for Legion-specific profiling measurements
    enum ProfilingMeasurementID {
      PMID_LEGION_FIRST = Realm::PMID_REALM_LAST,
      PMID_RUNTIME_OVERHEAD,
    };
  };

  namespace Internal {

    enum OpenState {
      NOT_OPEN                = 0,
      OPEN_READ_ONLY          = 1,
      OPEN_READ_WRITE         = 2, // unknown dirty information below
      OPEN_SINGLE_REDUCE      = 3, // only one open child with reductions below
      OPEN_MULTI_REDUCE       = 4, // multiple open children with same reduction
      // Only projection states below here
      OPEN_READ_ONLY_PROJ     = 5, // read-only projection
      OPEN_READ_WRITE_PROJ    = 6, // read-write projection
      OPEN_READ_WRITE_PROJ_DISJOINT_SHALLOW = 7, // depth=0, children disjoint
      OPEN_REDUCE_PROJ        = 8, // reduction-only projection
      OPEN_REDUCE_PROJ_DIRTY  = 9, // same as above but already open dirty
    };

    // redop IDs - none used in HLR right now, but 0 isn't allowed
    enum {
      REDOP_ID_AVAILABLE    = 1,
    };

    // Runtime task numbering
    enum {
      INIT_TASK_ID            = Realm::Processor::TASK_ID_PROCESSOR_INIT,
      SHUTDOWN_TASK_ID        = Realm::Processor::TASK_ID_PROCESSOR_SHUTDOWN,
      LG_TASK_ID              = Realm::Processor::TASK_ID_FIRST_AVAILABLE,
      LG_LEGION_PROFILING_ID  = Realm::Processor::TASK_ID_FIRST_AVAILABLE+1,
      LG_MAPPER_PROFILING_ID  = Realm::Processor::TASK_ID_FIRST_AVAILABLE+2,
      LG_LAUNCH_TOP_LEVEL_ID  = Realm::Processor::TASK_ID_FIRST_AVAILABLE+3,
      LG_MPI_INTEROP_ID       = Realm::Processor::TASK_ID_FIRST_AVAILABLE+4,
      LG_MPI_SYNC_ID          = Realm::Processor::TASK_ID_FIRST_AVAILABLE+5,
      TASK_ID_AVAILABLE       = Realm::Processor::TASK_ID_FIRST_AVAILABLE+6,
    };

    // Enumeration of Legion runtime tasks
    enum LgTaskID {
      LG_SCHEDULER_ID,
      LG_POST_END_ID,
      LG_DEFERRED_READY_TRIGGER_ID,
      LG_DEFERRED_EXECUTION_TRIGGER_ID,
      LG_DEFERRED_RESOLUTION_TRIGGER_ID,
      LG_DEFERRED_COMMIT_TRIGGER_ID,
      LG_DEFERRED_POST_MAPPED_ID,
      LG_DEFERRED_EXECUTE_ID,
      LG_DEFERRED_COMPLETE_ID,
      LG_DEFERRED_COMMIT_ID,
      LG_RECLAIM_LOCAL_FIELD_ID,
      LG_DEFERRED_COLLECT_ID,
      LG_PRE_PIPELINE_ID,
      LG_TRIGGER_DEPENDENCE_ID,
      LG_TRIGGER_COMPLETE_ID,
      LG_TRIGGER_OP_ID,
      LG_TRIGGER_TASK_ID,
      LG_DEFERRED_RECYCLE_ID,
      LG_DEFERRED_SLICE_ID,
      LG_MUST_INDIV_ID,
      LG_MUST_INDEX_ID,
      LG_MUST_MAP_ID,
      LG_MUST_DIST_ID,
      LG_MUST_LAUNCH_ID,
      LG_DEFERRED_FUTURE_SET_ID,
      LG_DEFERRED_FUTURE_MAP_SET_ID,
      LG_RESOLVE_FUTURE_PRED_ID,
      LG_CONTRIBUTE_COLLECTIVE_ID,
      LG_TOP_FINISH_TASK_ID,
      LG_MAPPER_TASK_ID,
      LG_DISJOINTNESS_TASK_ID,
      LG_PART_INDEPENDENCE_TASK_ID,
      LG_SPACE_INDEPENDENCE_TASK_ID,
      LG_PENDING_CHILD_TASK_ID,
      LG_DECREMENT_PENDING_TASK_ID,
      LG_SEND_VERSION_STATE_UPDATE_TASK_ID,
      LG_UPDATE_VERSION_STATE_REDUCE_TASK_ID,
      LG_ADD_TO_DEP_QUEUE_TASK_ID,
      LG_WINDOW_WAIT_TASK_ID,
      LG_ISSUE_FRAME_TASK_ID,
      LG_CONTINUATION_TASK_ID,
      LG_MAPPER_CONTINUATION_TASK_ID,
      LG_FINISH_MAPPER_CONTINUATION_TASK_ID,
      LG_TASK_IMPL_SEMANTIC_INFO_REQ_TASK_ID,
      LG_INDEX_SPACE_SEMANTIC_INFO_REQ_TASK_ID,
      LG_INDEX_PART_SEMANTIC_INFO_REQ_TASK_ID,
      LG_FIELD_SPACE_SEMANTIC_INFO_REQ_TASK_ID,
      LG_FIELD_SEMANTIC_INFO_REQ_TASK_ID,
      LG_REGION_SEMANTIC_INFO_REQ_TASK_ID,
      LG_PARTITION_SEMANTIC_INFO_REQ_TASK_ID,
      LG_SELECT_TUNABLE_TASK_ID,
      LG_DEFERRED_ENQUEUE_OP_ID,
      LG_DEFERRED_ENQUEUE_TASK_ID,
      LG_DEFER_MAPPER_MESSAGE_TASK_ID,
      LG_DEFER_COMPOSITE_VIEW_REF_TASK_ID,
      LG_DEFER_COMPOSITE_VIEW_REGISTRATION_TASK_ID,
      LG_DEFER_COMPOSITE_NODE_REF_TASK_ID,
      LG_DEFER_COMPOSITE_NODE_CAPTURE_TASK_ID,
      LG_CONVERT_VIEW_TASK_ID,
      LG_UPDATE_VIEW_REFERENCES_TASK_ID,
      LG_REMOVE_VERSION_STATE_REF_TASK_ID,
      LG_DEFER_RESTRICTED_MANAGER_TASK_ID,
      LG_REMOTE_VIEW_CREATION_TASK_ID,
      LG_DEFER_DISTRIBUTE_TASK_ID,
      LG_DEFER_PERFORM_MAPPING_TASK_ID,
      LG_DEFER_LAUNCH_TASK_ID,
      LG_DEFER_MAP_AND_LAUNCH_TASK_ID,
      LG_ADD_VERSIONING_SET_REF_TASK_ID,
      LG_VERSION_STATE_CAPTURE_DIRTY_TASK_ID,
      LG_DISJOINT_CLOSE_TASK_ID,
      LG_DEFER_MATERIALIZED_VIEW_TASK_ID,
      LG_MISSPECULATE_TASK_ID,
      LG_DEFER_PHI_VIEW_REF_TASK_ID,
      LG_DEFER_PHI_VIEW_REGISTRATION_TASK_ID,
      LG_MESSAGE_ID, // These two must be the last two
      LG_RETRY_SHUTDOWN_TASK_ID,
      LG_LAST_TASK_ID, // This one should always be last
    };

    /**
     * \class LgTaskArgs
     * The base class for all Legion Task arguments
     */
    template<typename T>
    struct LgTaskArgs {
    public:
      LgTaskArgs(void)
        : lg_task_id(T::TASK_ID) { }
    public:
      const LgTaskID lg_task_id;
    };

    // Make this a macro so we can keep it close to
    // declaration of the task IDs themselves
#define LG_TASK_DESCRIPTIONS(name)                               \
      const char *name[LG_LAST_TASK_ID] = {                      \
        "Scheduler",                                              \
        "Post-Task Execution",                                    \
        "Deferred Ready Trigger",                                 \
        "Deferred Execution Trigger",                             \
        "Deferred Resolution Trigger",                            \
        "Deferred Commit Trigger",                                \
        "Deferred Post Mapped",                                   \
        "Deferred Execute",                                       \
        "Deferred Complete",                                      \
        "Deferred Commit",                                        \
        "Reclaim Local Field",                                    \
        "Garbage Collection",                                     \
        "Prepipeline Stage",                                      \
        "Logical Dependence Analysis",                            \
        "Trigger Complete",                                       \
        "Operation Physical Dependence Analysis",                 \
        "Task Physical Dependence Analysis",                      \
        "Deferred Recycle",                                       \
        "Deferred Slice",                                         \
        "Must Individual Task Dependence Analysis",               \
        "Must Index Task Dependence Analysis",                    \
        "Must Task Physical Dependence Analysis",                 \
        "Must Task Distribution",                                 \
        "Must Task Launch",                                       \
        "Deferred Future Set",                                    \
        "Deferred Future Map Set",                                \
        "Resolve Future Predicate",                               \
        "Contribute Collective",                                  \
        "Top Finish",                                             \
        "Mapper Task",                                            \
        "Disjointness Test",                                      \
        "Partition Independence Test",                            \
        "Index Space Independence Test",                          \
        "Remove Pending Child",                                   \
        "Decrement Pending Task",                                 \
        "Send Version State Update",                              \
        "Update Version State Reduce",                            \
        "Add to Dependence Queue",                                \
        "Window Wait",                                            \
        "Issue Frame",                                            \
        "Legion Continuation",                                    \
        "Mapper Continuation",                                    \
        "Finish Mapper Continuation",                             \
        "Task Impl Semantic Request",                             \
        "Index Space Semantic Request",                           \
        "Index Partition Semantic Request",                       \
        "Field Space Semantic Request",                           \
        "Field Semantic Request",                                 \
        "Region Semantic Request",                                \
        "Partition Semantic Request",                             \
        "Select Tunable",                                         \
        "Deferred Enqueue Op",                                    \
        "Deferred Enqueue Task",                                  \
        "Deferred Mapper Message",                                \
        "Deferred Composite View Ref",                            \
        "Deferred Composite View Registration",                   \
        "Deferred Composite Node Ref",                            \
        "Deferred Composite Node Capture",                        \
        "Convert View for Version State",                         \
        "Update View References for Version State",               \
        "Deferred Remove Version State Valid Ref",                \
        "Deferred Restricted Manager GC Ref",                     \
        "Remote View Creation",                                   \
        "Defer Task Distribution",                                \
        "Defer Task Perform Mapping",                             \
        "Defer Task Launch",                                      \
        "Defer Task Map and Launch",                              \
        "Defer Versioning Set Reference",                         \
        "Version State Capture Dirty",                            \
        "Disjoint Close",                                         \
        "Defer Materialized View Creation",                       \
        "Handle Mapping Misspeculation",                          \
        "Defer Phi View Reference",                               \
        "Defer Phi View Registration",                            \
        "Remote Message",                                         \
        "Retry Shutdown",                                         \
      };

    enum MappingCallKind {
      GET_MAPPER_NAME_CALL,
      GET_MAPER_SYNC_MODEL_CALL,
      SELECT_TASK_OPTIONS_CALL,
      PREMAP_TASK_CALL,
      SLICE_TASK_CALL,
      MAP_TASK_CALL,
      SELECT_VARIANT_CALL,
      POSTMAP_TASK_CALL,
      TASK_SELECT_SOURCES_CALL,
      TASK_CREATE_TEMPORARY_CALL,
      TASK_SPECULATE_CALL,
      TASK_REPORT_PROFILING_CALL,
      MAP_INLINE_CALL,
      INLINE_SELECT_SOURCES_CALL,
      INLINE_CREATE_TEMPORARY_CALL,
      INLINE_REPORT_PROFILING_CALL,
      MAP_COPY_CALL,
      COPY_SELECT_SOURCES_CALL,
      COPY_CREATE_TEMPORARY_CALL,
      COPY_SPECULATE_CALL,
      COPY_REPORT_PROFILING_CALL,
      MAP_CLOSE_CALL,
      CLOSE_SELECT_SOURCES_CALL,
      CLOSE_CREATE_TEMPORARY_CALL,
      CLOSE_REPORT_PROFILING_CALL,
      MAP_ACQUIRE_CALL,
      ACQUIRE_SPECULATE_CALL,
      ACQUIRE_REPORT_PROFILING_CALL,
      MAP_RELEASE_CALL,
      RELEASE_SELECT_SOURCES_CALL,
      RELEASE_CREATE_TEMPORARY_CALL,
      RELEASE_SPECULATE_CALL,
      RELEASE_REPORT_PROFILING_CALL,
      CONFIGURE_CONTEXT_CALL,
      SELECT_TUNABLE_VALUE_CALL,
      MAP_MUST_EPOCH_CALL,
      MAP_DATAFLOW_GRAPH_CALL,
      SELECT_TASKS_TO_MAP_CALL,
      SELECT_STEAL_TARGETS_CALL,
      PERMIT_STEAL_REQUEST_CALL,
      HANDLE_MESSAGE_CALL,
      HANDLE_TASK_RESULT_CALL,
      LAST_MAPPER_CALL,
    };

#define MAPPER_CALL_NAMES(name)                     \
    const char *name[LAST_MAPPER_CALL] = {          \
      "get_mapper_name",                            \
      "get_mapper_sync_model",                      \
      "select_task_options",                        \
      "premap_task",                                \
      "slice_task",                                 \
      "map_task",                                   \
      "select_task_variant",                        \
      "postmap_task",                               \
      "select_task_sources",                        \
      "create task temporary",                      \
      "speculate (for task)",                       \
      "report profiling (for task)",                \
      "map_inline",                                 \
      "select_inline_sources",                      \
      "inline create temporary",                    \
      "report profiling (for inline)",              \
      "map_copy",                                   \
      "select_copy_sources",                        \
      "copy create temporary",                      \
      "speculate (for copy)",                       \
      "report_profiling (for copy)",                \
      "map_close",                                  \
      "select_close_sources",                       \
      "close create temporary",                     \
      "report_profiling (for close)",               \
      "map_acquire",                                \
      "speculate (for acquire)",                    \
      "report_profiling (for acquire)",             \
      "map_release",                                \
      "select_release_sources",                     \
      "release create temporary",                   \
      "speculate (for release)",                    \
      "report_profiling (for release)",             \
      "configure_context",                          \
      "select_tunable_value",                       \
      "map_must_epoch",                             \
      "map_dataflow_graph",                         \
      "select_tasks_to_map",                        \
      "select_steal_targets",                       \
      "permit_steal_request",                       \
      "handle_message",                             \
      "handle_task_result",                         \
    }

    // Methodology for assigning priorities to meta-tasks
    // The lowest priority is for the heavy lifting meta
    // tasks, so they go through the queue at low priority.
    // The deferred-throughput priority is for tasks that
    // have already gone through the queue once with
    // throughput priority, but had to be deferred for
    // some reason and therefore shouldn't get stuck at
    // the back of the throughput queue again. Latency
    // priority is for very small tasks which take a
    // minimal amount of time to perform and therefore
    // shouldn't get stuck behind the heavy meta-tasks.
    // Resource priority means that this task holds a
    // Realm resource (e.g. reservation) and therefore
    // shouldn't be stuck behind anything.
    enum LgPriority {
      LG_THROUGHPUT_PRIORITY = 0,
      LG_DEFERRED_THROUGHPUT_PRIORITY = 1,
      LG_LATENCY_PRIORITY = 2,
      LG_RESOURCE_PRIORITY = 3,
    };

    enum VirtualChannelKind {
      DEFAULT_VIRTUAL_CHANNEL = 0,
      INDEX_SPACE_VIRTUAL_CHANNEL = 1,
      FIELD_SPACE_VIRTUAL_CHANNEL = 2,
      LOGICAL_TREE_VIRTUAL_CHANNEL = 3,
      MAPPER_VIRTUAL_CHANNEL = 4,
      SEMANTIC_INFO_VIRTUAL_CHANNEL = 5,
      LAYOUT_CONSTRAINT_VIRTUAL_CHANNEL = 6,
      CONTEXT_VIRTUAL_CHANNEL = 7,
      MANAGER_VIRTUAL_CHANNEL = 8,
      VIEW_VIRTUAL_CHANNEL = 9,
      UPDATE_VIRTUAL_CHANNEL = 10,
      VARIANT_VIRTUAL_CHANNEL = 11,
      VERSION_VIRTUAL_CHANNEL = 12,
      VERSION_MANAGER_VIRTUAL_CHANNEL = 13,
      ANALYSIS_VIRTUAL_CHANNEL = 14,
      MAX_NUM_VIRTUAL_CHANNELS = 15, // this one must be last
    };

    enum MessageKind {
      TASK_MESSAGE,
      STEAL_MESSAGE,
      ADVERTISEMENT_MESSAGE,
      SEND_INDEX_SPACE_NODE,
      SEND_INDEX_SPACE_REQUEST,
      SEND_INDEX_SPACE_RETURN,
      SEND_INDEX_SPACE_CHILD_REQUEST,
      SEND_INDEX_SPACE_CHILD_RESPONSE,
      SEND_INDEX_SPACE_COLORS_REQUEST,
      SEND_INDEX_SPACE_COLORS_RESPONSE,
      SEND_INDEX_PARTITION_NOTIFICATION,
      SEND_INDEX_PARTITION_NODE,
      SEND_INDEX_PARTITION_REQUEST,
      SEND_INDEX_PARTITION_RETURN,
      SEND_INDEX_PARTITION_CHILD_REQUEST,
      SEND_INDEX_PARTITION_CHILD_RESPONSE,
      SEND_INDEX_PARTITION_CHILDREN_REQUEST,
      SEND_INDEX_PARTITION_CHILDREN_RESPONSE,
      SEND_FIELD_SPACE_NODE,
      SEND_FIELD_SPACE_REQUEST,
      SEND_FIELD_SPACE_RETURN,
      SEND_FIELD_ALLOC_REQUEST,
      SEND_FIELD_ALLOC_NOTIFICATION,
      SEND_FIELD_SPACE_TOP_ALLOC,
      SEND_FIELD_FREE,
      SEND_TOP_LEVEL_REGION_REQUEST,
      SEND_TOP_LEVEL_REGION_RETURN,
      SEND_LOGICAL_REGION_NODE,
      INDEX_SPACE_DESTRUCTION_MESSAGE,
      INDEX_PARTITION_DESTRUCTION_MESSAGE,
      FIELD_SPACE_DESTRUCTION_MESSAGE,
      LOGICAL_REGION_DESTRUCTION_MESSAGE,
      LOGICAL_PARTITION_DESTRUCTION_MESSAGE,
      INDIVIDUAL_REMOTE_MAPPED,
      INDIVIDUAL_REMOTE_COMPLETE,
      INDIVIDUAL_REMOTE_COMMIT,
      SLICE_REMOTE_MAPPED,
      SLICE_REMOTE_COMPLETE,
      SLICE_REMOTE_COMMIT,
      DISTRIBUTED_REMOTE_REGISTRATION,
      DISTRIBUTED_VALID_UPDATE,
      DISTRIBUTED_GC_UPDATE,
      DISTRIBUTED_RESOURCE_UPDATE,
      DISTRIBUTED_CREATE_ADD,
      DISTRIBUTED_CREATE_REMOVE,
      DISTRIBUTED_UNREGISTER,
      SEND_ATOMIC_RESERVATION_REQUEST,
      SEND_ATOMIC_RESERVATION_RESPONSE,
      SEND_BACK_LOGICAL_STATE,
      SEND_MATERIALIZED_VIEW,
      SEND_COMPOSITE_VIEW,
      SEND_FILL_VIEW,
      SEND_PHI_VIEW,
      SEND_REDUCTION_VIEW,
      SEND_INSTANCE_MANAGER,
      SEND_REDUCTION_MANAGER,
      SEND_CREATE_TOP_VIEW_REQUEST,
      SEND_CREATE_TOP_VIEW_RESPONSE,
      SEND_SUBVIEW_DID_REQUEST,
      SEND_SUBVIEW_DID_RESPONSE,
      SEND_VIEW_REQUEST,
      SEND_VIEW_UPDATE_REQUEST,
      SEND_VIEW_UPDATE_RESPONSE,
      SEND_VIEW_REMOTE_UPDATE,
      SEND_VIEW_REMOTE_INVALIDATE,
      SEND_MANAGER_REQUEST,
      SEND_FUTURE_RESULT,
      SEND_FUTURE_SUBSCRIPTION,
      SEND_MAPPER_MESSAGE,
      SEND_MAPPER_BROADCAST,
      SEND_TASK_IMPL_SEMANTIC_REQ,
      SEND_INDEX_SPACE_SEMANTIC_REQ,
      SEND_INDEX_PARTITION_SEMANTIC_REQ,
      SEND_FIELD_SPACE_SEMANTIC_REQ,
      SEND_FIELD_SEMANTIC_REQ,
      SEND_LOGICAL_REGION_SEMANTIC_REQ,
      SEND_LOGICAL_PARTITION_SEMANTIC_REQ,
      SEND_TASK_IMPL_SEMANTIC_INFO,
      SEND_INDEX_SPACE_SEMANTIC_INFO,
      SEND_INDEX_PARTITION_SEMANTIC_INFO,
      SEND_FIELD_SPACE_SEMANTIC_INFO,
      SEND_FIELD_SEMANTIC_INFO,
      SEND_LOGICAL_REGION_SEMANTIC_INFO,
      SEND_LOGICAL_PARTITION_SEMANTIC_INFO,
      SEND_REMOTE_CONTEXT_REQUEST,
      SEND_REMOTE_CONTEXT_RESPONSE,
      SEND_REMOTE_CONTEXT_FREE,
      SEND_VERSION_OWNER_REQUEST,
      SEND_VERSION_OWNER_RESPONSE,
      SEND_VERSION_STATE_REQUEST,
      SEND_VERSION_STATE_RESPONSE,
      SEND_VERSION_STATE_UPDATE_REQUEST,
      SEND_VERSION_STATE_UPDATE_RESPONSE,
      SEND_VERSION_STATE_VALID_NOTIFICATION,
      SEND_VERSION_MANAGER_ADVANCE,
      SEND_VERSION_MANAGER_INVALIDATE,
      SEND_VERSION_MANAGER_REQUEST,
      SEND_VERSION_MANAGER_RESPONSE,
      SEND_INSTANCE_REQUEST,
      SEND_INSTANCE_RESPONSE,
      SEND_GC_PRIORITY_UPDATE,
      SEND_NEVER_GC_RESPONSE,
      SEND_ACQUIRE_REQUEST,
      SEND_ACQUIRE_RESPONSE,
      SEND_VARIANT_REQUEST,
      SEND_VARIANT_RESPONSE,
      SEND_VARIANT_BROADCAST,
      SEND_CONSTRAINT_REQUEST,
      SEND_CONSTRAINT_RESPONSE,
      SEND_CONSTRAINT_RELEASE,
      SEND_CONSTRAINT_REMOVAL,
      SEND_TOP_LEVEL_TASK_REQUEST,
      SEND_TOP_LEVEL_TASK_COMPLETE,
      SEND_MPI_RANK_EXCHANGE,
      SEND_SHUTDOWN_NOTIFICATION,
      SEND_SHUTDOWN_RESPONSE,
      LAST_SEND_KIND, // This one must be last
    };

#define LG_MESSAGE_DESCRIPTIONS(name)                                 \
      const char *name[LAST_SEND_KIND] = {                            \
        "Task Message",                                               \
        "Steal Message",                                              \
        "Advertisement Message",                                      \
        "Send Index Space Node",                                      \
        "Send Index Space Request",                                   \
        "Send Index Space Return",                                    \
        "Send Index Space Child Request",                             \
        "Send Index Space Child Response",                            \
        "Send Index Space Colors Request",                            \
        "Send Index Space Colors Response",                           \
        "Send Index Partition Notification",                          \
        "Send Index Partition Node",                                  \
        "Send Index Partition Request",                               \
        "Send Index Partition Return",                                \
        "Send Index Partition Child Request",                         \
        "Send Index Partition Child Response",                        \
        "Send Index Partition Children Request",                      \
        "Send Index Partition Children Response",                     \
        "Send Field Space Node",                                      \
        "Send Field Space Request",                                   \
        "Send Field Space Return",                                    \
        "Send Field Alloc Request",                                   \
        "Send Field Alloc Notification",                              \
        "Send Field Space Top Alloc",                                 \
        "Send Field Free",                                            \
        "Send Top Level Region Request",                              \
        "Send Top Level Region Return",                               \
        "Send Logical Region Node",                                   \
        "Index Space Destruction",                                    \
        "Index Partition Destruction",                                \
        "Field Space Destruction",                                    \
        "Logical Region Destruction",                                 \
        "Logical Partition Destruction",                              \
        "Individual Remote Mapped",                                   \
        "Individual Remote Complete",                                 \
        "Individual Remote Commit",                                   \
        "Slice Remote Mapped",                                        \
        "Slice Remote Complete",                                      \
        "Slice Remote Commit",                                        \
        "Distributed Remote Registration",                            \
        "Distributed Valid Update",                                   \
        "Distributed GC Update",                                      \
        "Distributed Resource Update",                                \
        "Distributed Create Add",                                     \
        "Distributed Create Remove",                                  \
        "Distributed Unregister",                                     \
        "Send Atomic Reservation Request",                            \
        "Send Atomic Reservation Response",                           \
        "Send Back Logical State",                                    \
        "Send Materialized View",                                     \
        "Send Composite View",                                        \
        "Send Fill View",                                             \
        "Send Phi View",                                              \
        "Send Reduction View",                                        \
        "Send Instance Manager",                                      \
        "Send Reduction Manager",                                     \
        "Send Create Top View Request",                               \
        "Send Create Top View Response",                              \
        "Send Subview DID Request",                                   \
        "Send Subview DID Response",                                  \
        "Send View Request",                                          \
        "Send View Update Request",                                   \
        "Send View Update Response",                                  \
        "Send View Remote Update",                                    \
        "Send View Remote Invalidate",                                \
        "Send Manager Request",                                       \
        "Send Future Result",                                         \
        "Send Future Subscription",                                   \
        "Send Mapper Message",                                        \
        "Send Mapper Broadcast",                                      \
        "Send Task Impl Semantic Req",                                \
        "Send Index Space Semantic Req",                              \
        "Send Index Partition Semantic Req",                          \
        "Send Field Space Semantic Req",                              \
        "Send Field Semantic Req",                                    \
        "Send Logical Region Semantic Req",                           \
        "Send Logical Partition Semantic Req",                        \
        "Send Task Impl Semantic Info",                               \
        "Send Index Space Semantic Info",                             \
        "Send Index Partition Semantic Info",                         \
        "Send Field Space Semantic Info",                             \
        "Send Field Semantic Info",                                   \
        "Send Logical Region Semantic Info",                          \
        "Send Logical Partition Semantic Info",                       \
        "Send Remote Context Request",                                \
        "Send Remote Context Response",                               \
        "Send Remote Context Free",                                   \
        "Send Version Owner Request",                                 \
        "Send Version Owner Response",                                \
        "Send Version State Request",                                 \
        "Send Version State Response",                                \
        "Send Version State Update Request",                          \
        "Send Version State Update Response",                         \
        "Send Version State Valid Notification",                      \
        "Send Version Manager Advance",                               \
        "Send Version Manager Invalidate",                            \
        "Send Version Manager Request",                               \
        "Send Version Manager Response",                              \
        "Send Instance Request",                                      \
        "Send Instance Response",                                     \
        "Send GC Priority Update",                                    \
        "Send Never GC Response",                                     \
        "Send Acquire Request",                                       \
        "Send Acquire Response",                                      \
        "Send Task Variant Request",                                  \
        "Send Task Variant Response",                                 \
        "Send Task Variant Broadcast",                                \
        "Send Constraint Request",                                    \
        "Send Constraint Response",                                   \
        "Send Constraint Release",                                    \
        "Send Constraint Removal",                                    \
        "Top Level Task Request",                                     \
        "Top Level Task Complete",                                    \
        "Send MPI Rank Exchange",                                     \
        "Send Shutdown Notification",                                 \
        "Send Shutdown Response",                                     \
      };

    enum RuntimeCallKind {
      PACK_BASE_TASK_CALL,
      UNPACK_BASE_TASK_CALL,
      TASK_PRIVILEGE_CHECK_CALL,
      CLONE_TASK_CALL,
      COMPUTE_POINT_REQUIREMENTS_CALL,
      EARLY_MAP_REGIONS_CALL,
      INTRA_TASK_ALIASING_CALL,
      ACTIVATE_SINGLE_CALL,
      DEACTIVATE_SINGLE_CALL,
      SELECT_INLINE_VARIANT_CALL,
      INLINE_CHILD_TASK_CALL,
      PACK_SINGLE_TASK_CALL,
      UNPACK_SINGLE_TASK_CALL,
      PACK_REMOTE_CONTEXT_CALL,
      HAS_CONFLICTING_INTERNAL_CALL,
      FIND_CONFLICTING_CALL,
      FIND_CONFLICTING_INTERNAL_CALL,
      CHECK_REGION_DEPENDENCE_CALL,
      FIND_PARENT_REGION_REQ_CALL,
      FIND_PARENT_REGION_CALL,
      CHECK_PRIVILEGE_CALL,
      TRIGGER_SINGLE_CALL,
      INITIALIZE_MAP_TASK_CALL,
      FINALIZE_MAP_TASK_CALL,
      VALIDATE_VARIANT_SELECTION_CALL,
      MAP_ALL_REGIONS_CALL,
      INITIALIZE_REGION_TREE_CONTEXTS_CALL,
      INVALIDATE_REGION_TREE_CONTEXTS_CALL,
      CREATE_INSTANCE_TOP_VIEW_CALL,
      LAUNCH_TASK_CALL,
      ACTIVATE_MULTI_CALL,
      DEACTIVATE_MULTI_CALL,
      SLICE_INDEX_SPACE_CALL,
      CLONE_MULTI_CALL,
      MULTI_TRIGGER_EXECUTION_CALL,
      PACK_MULTI_CALL,
      UNPACK_MULTI_CALL,
      ACTIVATE_INDIVIDUAL_CALL,
      DEACTIVATE_INDIVIDUAL_CALL,
      INDIVIDUAL_PERFORM_MAPPING_CALL,
      INDIVIDUAL_RETURN_VIRTUAL_CALL,
      INDIVIDUAL_TRIGGER_COMPLETE_CALL,
      INDIVIDUAL_TRIGGER_COMMIT_CALL,
      INDIVIDUAL_POST_MAPPED_CALL,
      INDIVIDUAL_PACK_TASK_CALL,
      INDIVIDUAL_UNPACK_TASK_CALL,
      INDIVIDUAL_PACK_REMOTE_COMPLETE_CALL,
      INDIVIDUAL_UNPACK_REMOTE_COMPLETE_CALL,
      POINT_ACTIVATE_CALL,
      POINT_DEACTIVATE_CALL,
      POINT_TASK_COMPLETE_CALL,
      POINT_TASK_COMMIT_CALL,
      POINT_PACK_TASK_CALL,
      POINT_UNPACK_TASK_CALL,
      POINT_TASK_POST_MAPPED_CALL,
      REMOTE_TASK_ACTIVATE_CALL,
      REMOTE_TASK_DEACTIVATE_CALL,
      REMOTE_UNPACK_CONTEXT_CALL,
      INDEX_ACTIVATE_CALL,
      INDEX_DEACTIVATE_CALL,
      INDEX_COMPUTE_FAT_PATH_CALL,
      INDEX_EARLY_MAP_TASK_CALL,
      INDEX_DISTRIBUTE_CALL,
      INDEX_PERFORM_MAPPING_CALL,
      INDEX_COMPLETE_CALL,
      INDEX_COMMIT_CALL,
      INDEX_PERFORM_INLINING_CALL,
      INDEX_CLONE_AS_SLICE_CALL,
      INDEX_HANDLE_FUTURE,
      INDEX_RETURN_SLICE_MAPPED_CALL,
      INDEX_RETURN_SLICE_COMPLETE_CALL,
      INDEX_RETURN_SLICE_COMMIT_CALL,
      SLICE_ACTIVATE_CALL,
      SLICE_DEACTIVATE_CALL,
      SLICE_APPLY_VERSION_INFO_CALL,
      SLICE_DISTRIBUTE_CALL,
      SLICE_PERFORM_MAPPING_CALL,
      SLICE_LAUNCH_CALL,
      SLICE_MAP_AND_LAUNCH_CALL,
      SLICE_PACK_TASK_CALL,
      SLICE_UNPACK_TASK_CALL,
      SLICE_CLONE_AS_SLICE_CALL,
      SLICE_HANDLE_FUTURE_CALL,
      SLICE_CLONE_AS_POINT_CALL,
      SLICE_ENUMERATE_POINTS_CALL,
      SLICE_MAPPED_CALL,
      SLICE_COMPLETE_CALL,
      SLICE_COMMIT_CALL,
      REALM_SPAWN_META_CALL,
      REALM_SPAWN_TASK_CALL,
      REALM_CREATE_INSTANCE_CALL,
      REALM_ISSUE_COPY_CALL,
      REALM_ISSUE_FILL_CALL,
      REGION_TREE_LOGICAL_ANALYSIS_CALL,
      REGION_TREE_LOGICAL_FENCE_CALL,
      REGION_TREE_VERSIONING_ANALYSIS_CALL,
      REGION_TREE_ADVANCE_VERSION_NUMBERS_CALL,
      REGION_TREE_INITIALIZE_CONTEXT_CALL,
      REGION_TREE_INVALIDATE_CONTEXT_CALL,
      REGION_TREE_PREMAP_ONLY_CALL,
      REGION_TREE_PHYSICAL_REGISTER_ONLY_CALL,
      REGION_TREE_PHYSICAL_REGISTER_USERS_CALL,
      REGION_TREE_PHYSICAL_PERFORM_CLOSE_CALL,
      REGION_TREE_PHYSICAL_CLOSE_CONTEXT_CALL,
      REGION_TREE_PHYSICAL_COPY_ACROSS_CALL,
      REGION_TREE_PHYSICAL_REDUCE_ACROSS_CALL,
      REGION_TREE_PHYSICAL_CONVERT_MAPPING_CALL,
      REGION_TREE_PHYSICAL_FILL_FIELDS_CALL,
      REGION_TREE_PHYSICAL_ATTACH_FILE_CALL,
      REGION_TREE_PHYSICAL_DETACH_FILE_CALL,
      REGION_NODE_REGISTER_LOGICAL_USER_CALL,
      REGION_NODE_CLOSE_LOGICAL_NODE_CALL,
      REGION_NODE_SIPHON_LOGICAL_CHILDREN_CALL,
      REGION_NODE_SIPHON_LOGICAL_PROJECTION_CALL,
      REGION_NODE_PERFORM_LOGICAL_CLOSES_CALL,
      REGION_NODE_FIND_VALID_INSTANCE_VIEWS_CALL,
      REGION_NODE_FIND_VALID_REDUCTION_VIEWS_CALL,
      REGION_NODE_ISSUE_UPDATE_COPIES_CALL,
      REGION_NODE_SORT_COPY_INSTANCES_CALL,
      REGION_NODE_ISSUE_GROUPED_COPIES_CALL,
      REGION_NODE_ISSUE_UPDATE_REDUCTIONS_CALL,
      REGION_NODE_PREMAP_REGION_CALL,
      REGION_NODE_REGISTER_REGION_CALL,
      REGION_NODE_CLOSE_STATE_CALL,
      CURRENT_STATE_RECORD_VERSION_NUMBERS_CALL,
      CURRENT_STATE_ADVANCE_VERSION_NUMBERS_CALL,
      PHYSICAL_STATE_CAPTURE_STATE_CALL,
      PHYSICAL_STATE_APPLY_PATH_ONLY_CALL,
      PHYSICAL_STATE_APPLY_STATE_CALL,
      PHYSICAL_STATE_MAKE_LOCAL_CALL,
      VERSION_STATE_UPDATE_PATH_ONLY_CALL,
      VERSION_STATE_MERGE_PHYSICAL_STATE_CALL,
      VERSION_STATE_REQUEST_CHILDREN_CALL,
      VERSION_STATE_REQUEST_INITIAL_CALL,
      VERSION_STATE_REQUEST_FINAL_CALL,
      VERSION_STATE_SEND_STATE_CALL,
      VERSION_STATE_HANDLE_REQUEST_CALL,
      VERSION_STATE_HANDLE_RESPONSE_CALL,
      MATERIALIZED_VIEW_FIND_LOCAL_PRECONDITIONS_CALL,
      MATERIALIZED_VIEW_FIND_LOCAL_COPY_PRECONDITIONS_CALL,
      MATERIALIZED_VIEW_FILTER_PREVIOUS_USERS_CALL,
      MATERIALIZED_VIEW_FILTER_CURRENT_USERS_CALL,
      MATERIALIZED_VIEW_FILTER_LOCAL_USERS_CALL,
      COMPOSITE_VIEW_SIMPLIFY_CALL,
      COMPOSITE_VIEW_ISSUE_DEFERRED_COPIES_CALL,
      COMPOSITE_NODE_CAPTURE_PHYSICAL_STATE_CALL,
      COMPOSITE_NODE_SIMPLIFY_CALL,
      REDUCTION_VIEW_PERFORM_REDUCTION_CALL,
      REDUCTION_VIEW_PERFORM_DEFERRED_REDUCTION_CALL,
      REDUCTION_VIEW_PERFORM_DEFERRED_REDUCTION_ACROSS_CALL,
      REDUCTION_VIEW_FIND_COPY_PRECONDITIONS_CALL,
      REDUCTION_VIEW_FIND_USER_PRECONDITIONS_CALL,
      REDUCTION_VIEW_FILTER_LOCAL_USERS_CALL,
      LAST_RUNTIME_CALL_KIND, // This one must be last
    };

#define RUNTIME_CALL_DESCRIPTIONS(name)                               \
    const char *name[LAST_RUNTIME_CALL_KIND] = {                      \
      "Pack Base Task",                                               \
      "Unpack Base Task",                                             \
      "Task Privilege Check",                                         \
      "Clone Base Task",                                              \
      "Compute Point Requirements",                                   \
      "Early Map Regions",                                            \
      "Intra-Task Aliasing",                                          \
      "Activate Single",                                              \
      "Deactivate Single",                                            \
      "Select Inline Variant",                                        \
      "Inline Child Task",                                            \
      "Pack Single Task",                                             \
      "Unpack Single Task",                                           \
      "Pack Remote Context",                                          \
      "Has Conflicting Internal",                                     \
      "Find Conflicting",                                             \
      "Find Conflicting Internal",                                    \
      "Check Region Dependence",                                      \
      "Find Parent Region Requirement",                               \
      "Find Parent Region",                                           \
      "Check Privilege",                                              \
      "Trigger Single",                                               \
      "Initialize Map Task",                                          \
      "Finalized Map Task",                                           \
      "Validate Variant Selection",                                   \
      "Map All Regions",                                              \
      "Initialize Region Tree Contexts",                              \
      "Invalidate Region Tree Contexts",                              \
      "Create Instance Top View",                                     \
      "Launch Task",                                                  \
      "Activate Multi",                                               \
      "Deactivate Multi",                                             \
      "Slice Index Space",                                            \
      "Clone Multi Call",                                             \
      "Multi Trigger Execution",                                      \
      "Pack Multi",                                                   \
      "Unpack Multi",                                                 \
      "Activate Individual",                                          \
      "Deactivate Individual",                                        \
      "Individual Perform Mapping",                                   \
      "Individual Return Virtual",                                    \
      "Individual Trigger Complete",                                  \
      "Individual Trigger Commit",                                    \
      "Individual Post Mapped",                                       \
      "Individual Pack Task",                                         \
      "Individual Unpack Task",                                       \
      "Individual Pack Remote Complete",                              \
      "Individual Unpack Remote Complete",                            \
      "Activate Point",                                               \
      "Deactivate Point",                                             \
      "Point Task Complete",                                          \
      "Point Task Commit",                                            \
      "Point Task Pack",                                              \
      "Point Task Unpack",                                            \
      "Point Task Post Mapped",                                       \
      "Remote Task Activate",                                         \
      "Remote Task Deactivate",                                       \
      "Remote Unpack Context",                                        \
      "Index Activate",                                               \
      "Index Deactivate",                                             \
      "Index Compute Fat Path",                                       \
      "Index Early Map Task",                                         \
      "Index Distribute",                                             \
      "Index Perform Mapping",                                        \
      "Index Complete",                                               \
      "Index Commit",                                                 \
      "Index Perform Inlining",                                       \
      "Index Clone As Slice",                                         \
      "Index Handle Future",                                          \
      "Index Return Slice Mapped",                                    \
      "Index Return Slice Complete",                                  \
      "Index Return Slice Commit",                                    \
      "Slice Activate",                                               \
      "Slice Deactivate",                                             \
      "Slice Apply Version Info",                                     \
      "Slice Distribute",                                             \
      "Slice Perform Mapping",                                        \
      "Slice Launch",                                                 \
      "Slice Map and Launch",                                         \
      "Slice Pack Task",                                              \
      "Slice Unpack Task",                                            \
      "Slice Clone As Slice",                                         \
      "Slice Handle Future",                                          \
      "Slice Cone as Point",                                          \
      "Slice Enumerate Points",                                       \
      "Slice Mapped",                                                 \
      "Slice Complete",                                               \
      "Slice Commit",                                                 \
      "Realm Spawn Meta",                                             \
      "Realm Spawn Task",                                             \
      "Realm Create Instance",                                        \
      "Realm Issue Copy",                                             \
      "Realm Issue Fill",                                             \
      "Region Tree Logical Analysis",                                 \
      "Region Tree Logical Fence",                                    \
      "Region Tree Versioning Analysis",                              \
      "Region Tree Advance Version Numbers",                          \
      "Region Tree Initialize Context",                               \
      "Region Tree Invalidate Context",                               \
      "Region Tree Premap Only",                                      \
      "Region Tree Physical Register Only",                           \
      "Region Tree Physical Register Users",                          \
      "Region Tree Physical Perform Close",                           \
      "Region Tree Physical Close Context",                           \
      "Region Tree Physical Copy Across",                             \
      "Region Tree Physical Reduce Across",                           \
      "Region Tree Physical Convert Mapping",                         \
      "Region Tree Physical Fill Fields",                             \
      "Region Tree Physical Attach File",                             \
      "Region Tree Physical Detach File",                             \
      "Region Node Register Logical User",                            \
      "Region Node Close Logical Node",                               \
      "Region Node Siphon Logical Children",                          \
      "Region Node Siphon Logical Projection",                        \
      "Region Node Perform Logical Closes",                           \
      "Region Node Find Valid Instance Views",                        \
      "Region Node Find Valid Reduction Views",                       \
      "Region Node Issue Update Copies",                              \
      "Region Node Sort Copy Instances",                              \
      "Region Node Issue Grouped Copies",                             \
      "Region Node Issue Update Reductions",                          \
      "Region Node Premap Region",                                    \
      "Region Node Register Region",                                  \
      "Region Node Close State",                                      \
      "Logical State Record Verison Numbers",                         \
      "Logical State Advance Version Numbers",                        \
      "Physical State Capture State",                                 \
      "Physical State Apply Path Only",                               \
      "Physical State Apply State",                                   \
      "Physical State Make Local",                                    \
      "Version State Update Path Only",                               \
      "Version State Merge Physical State",                           \
      "Version State Request Children",                               \
      "Version State Request Initial",                                \
      "Version State Request Final",                                  \
      "Version State Send State",                                     \
      "Version State Handle Request",                                 \
      "Version State Handle Response",                                \
      "Materialized View Find Local Preconditions",                   \
      "Materialized View Find Local Copy Preconditions",              \
      "Materialized View Filter Previous Users",                      \
      "Materialized View Filter Current Users",                       \
      "Materialized View Filter Local Users",                         \
      "Composite View Simplify",                                      \
      "Composite View Issue Deferred Copies",                         \
      "Composite Node Capture Physical State",                        \
      "Composite Node Simplify",                                      \
      "Reduction View Perform Reduction",                             \
      "Reduction View Perform Deferred Reduction",                    \
      "Reduction View Perform Deferred Reduction Across",             \
      "Reduction View Find Copy Preconditions",                       \
      "Reduction View Find User Preconditions",                       \
      "Reduction View Filter Local Users",                            \
    };

    enum SemanticInfoKind {
      INDEX_SPACE_SEMANTIC,
      INDEX_PARTITION_SEMANTIC,
      FIELD_SPACE_SEMANTIC,
      FIELD_SEMANTIC,
      LOGICAL_REGION_SEMANTIC,
      LOGICAL_PARTITION_SEMANTIC,
      TASK_SEMANTIC,
    };

    // Forward declarations for runtime level objects
    // runtime.h
    class Collectable;
    class ArgumentMapImpl;
    class ArgumentMapStore;
    class FutureImpl;
    class FutureMapImpl;
    class PhysicalRegionImpl;
    class GrantImpl;
    class PredicateImpl;
    class MPILegionHandshakeImpl;
    class ProcessorManager;
    class MemoryManager;
    class VirtualChannel;
    class MessageManager;
    class ShutdownManager;
    class GarbageCollectionEpoch;
    class TaskImpl;
    class VariantImpl;
    class LayoutConstraints;
    class GeneratorImpl;
    class ProjectionFunction;
    class Runtime;

    // legion_ops.h
    class Operation;
    class SpeculativeOp;
    class MapOp;
    class CopyOp;
    class IndexCopyOp;
    class PointCopyOp;
    class FenceOp;
    class FrameOp;
    class DeletionOp;
    class InternalOp;
    class OpenOp;
    class AdvanceOp;
    class CloseOp;
    class InterCloseOp;
    class ReadCloseOp;
    class PostCloseOp;
    class VirtualCloseOp;
    class AcquireOp;
    class ReleaseOp;
    class DynamicCollectiveOp;
    class FuturePredOp;
    class NotPredOp;
    class AndPredOp;
    class OrPredOp;
    class MustEpochOp;
    class PendingPartitionOp;
    class DependentPartitionOp;
    class FillOp;
    class IndexFillOp;
    class PointFillOp;
    class AttachOp;
    class DetachOp;
    class TimingOp;
    class TaskOp;

    // legion_tasks.h
    class ExternalTask;
    class SingleTask;
    class MultiTask;
    class IndividualTask;
    class PointTask;
    class IndexTask;
    class SliceTask;
    class RemoteTask;
    class MinimalPoint;

    // legion_context.h
    /**
     * \class ContextInterface
     * This is a pure virtual class so users don't try to use it.
     * It defines the context interface that the task wrappers use
     * for getting access to context data when running a task.
     */
    class TaskContext;
    class InnerContext;;
    class TopLevelContext;
    class RemoteContext;
    class LeafContext;
    class InlineContext;
    class ContextInterface {
    public:
      virtual Task* get_task(void) = 0;
      virtual const std::vector<PhysicalRegion>& begin_task(void) = 0;
      virtual void end_task(const void *result,
                            size_t result_size, bool owned) = 0;
      // This is safe because we see in legion_context.h that
      // TaskContext implements this interface and no one else
      // does. If only C++ implemented forward declarations of
      // inheritence then we wouldn't have this dumb problem
      // (mixin classes anyone?).
      inline TaskContext* as_context(void)
        { return reinterpret_cast<TaskContext*>(this); }
    };

    // legion_trace.h
    class LegionTrace;
    class StaticTrace;
    class DynamicTrace;
    class TraceCaptureOp;
    class TraceCompleteOp;

    // region_tree.h
    class RegionTreeForest;
    class IndexTreeNode;
    class IndexSpaceNode;
    class IndexPartNode;
    class FieldSpaceNode;
    class RegionTreeNode;
    class RegionNode;
    class PartitionNode;

    class RegionTreeContext;
    class RegionTreePath;
    class PathTraverser;
    class NodeTraverser;

    class ProjectionEpoch;
    class LogicalState;
    class PhysicalState;
    class VersionState;
    class VersionInfo;
    class RestrictInfo;
    class Restriction;
    class Acquisition;

    class Collectable;
    class Notifiable;
    class ReferenceMutator;
    class LocalReferenceMutator;
    class NeverReferenceMutator;
    class DistributedCollectable;
    class LayoutDescription;
    class PhysicalManager; // base class for instance and reduction
    class CopyAcrossHelper;
    class LogicalView; // base class for instance and reduction
    class InstanceManager;
    class InstanceKey;
    class InstanceView;
    class DeferredView;
    class MaterializedView;
    class CompositeBase;
    class CompositeView;
    class CompositeVersionInfo;
    class CompositeNode;
    class FillView;
    class PhiView;
    class MappingRef;
    class InstanceRef;
    class InstanceSet;
    class InnerTaskView;
    class ReductionManager;
    class ListReductionManager;
    class FoldReductionManager;
    class VirtualManager;
    class ReductionView;
    class InstanceBuilder;

    class RegionAnalyzer;
    class RegionMapper;

    struct EscapedUser;
    struct EscapedCopy;
    struct GenericUser;
    struct LogicalUser;
    struct PhysicalUser;
    struct TraceInfo;
    class ClosedNode;
    class LogicalCloser;
    class TreeCloseImpl;
    class TreeClose;
    struct CloseInfo;

    // legion_spy.h
    class TreeStateLogger;

    // legion_profiling.h
    class LegionProfiler;
    class LegionProfInstance;

    // mapper_manager.h
    class MappingCallInfo;
    class MapperManager;
    class SerializingManager;
    class ConcurrentManager;
    typedef Mapping::MapperEvent MapperEvent;
    typedef Mapping::ProfilingMeasurementID ProfilingMeasurementID;

#define FRIEND_ALL_RUNTIME_CLASSES                          \
    friend class Legion::Runtime;                           \
    friend class Internal::Runtime;                         \
    friend class Internal::PhysicalRegionImpl;              \
    friend class Internal::TaskImpl;                        \
    friend class Internal::ProcessorManager;                \
    friend class Internal::MemoryManager;                   \
    friend class Internal::Operation;                       \
    friend class Internal::SpeculativeOp;                   \
    friend class Internal::MapOp;                           \
    friend class Internal::CopyOp;                          \
    friend class Internal::IndexCopyOp;                     \
    friend class Internal::PointCopyOp;                     \
    friend class Internal::FenceOp;                         \
    friend class Internal::DynamicCollectiveOp;             \
    friend class Internal::FuturePredOp;                    \
    friend class Internal::DeletionOp;                      \
    friend class Internal::OpenOp;                          \
    friend class Internal::AdvanceOp;                       \
    friend class Internal::CloseOp;                         \
    friend class Internal::InterCloseOp;                    \
    friend class Internal::ReadCloseOp;                     \
    friend class Internal::PostCloseOp;                     \
    friend class Internal::VirtualCloseOp;                  \
    friend class Internal::AcquireOp;                       \
    friend class Internal::ReleaseOp;                       \
    friend class Internal::PredicateImpl;                   \
    friend class Internal::NotPredOp;                       \
    friend class Internal::AndPredOp;                       \
    friend class Internal::OrPredOp;                        \
    friend class Internal::MustEpochOp;                     \
    friend class Internal::PendingPartitionOp;              \
    friend class Internal::DependentPartitionOp;            \
    friend class Internal::FillOp;                          \
    friend class Internal::IndexFillOp;                     \
    friend class Internal::PointFillOp;                     \
    friend class Internal::AttachOp;                        \
    friend class Internal::DetachOp;                        \
    friend class Internal::TimingOp;                        \
    friend class Internal::ExternalTask;                    \
    friend class Internal::TaskOp;                          \
    friend class Internal::SingleTask;                      \
    friend class Internal::MultiTask;                       \
    friend class Internal::IndividualTask;                  \
    friend class Internal::PointTask;                       \
    friend class Internal::IndexTask;                       \
    friend class Internal::SliceTask;                       \
    friend class Internal::RegionTreeForest;                \
    friend class Internal::IndexSpaceNode;                  \
    friend class Internal::IndexPartNode;                   \
    friend class Internal::FieldSpaceNode;                  \
    friend class Internal::RegionTreeNode;                  \
    friend class Internal::RegionNode;                      \
    friend class Internal::PartitionNode;                   \
    friend class Internal::LogicalView;                     \
    friend class Internal::InstanceView;                    \
    friend class Internal::DeferredView;                    \
    friend class Internal::ReductionView;                   \
    friend class Internal::MaterializedView;                \
    friend class Internal::CompositeView;                   \
    friend class Internal::CompositeNode;                   \
    friend class Internal::FillView;                        \
    friend class Internal::LayoutDescription;               \
    friend class Internal::PhysicalManager;                 \
    friend class Internal::InstanceManager;                 \
    friend class Internal::ReductionManager;                \
    friend class Internal::ListReductionManager;            \
    friend class Internal::FoldReductionManager;            \
    friend class Internal::TreeStateLogger;                 \
    friend class Internal::MapperManager;                   \
    friend class Internal::InstanceRef;                     \
    friend class Internal::MPILegionHandshakeImpl;          \
    friend class Internal::FutureMapImpl;                   \
    friend class Internal::TaskContext;                     \
    friend class Internal::InnerContext;                    \
    friend class Internal::TopLevelContext;                 \
    friend class Internal::RemoteContext;                   \
    friend class Internal::LeafContext;                     \
    friend class Internal::InlineContext;                   \
    friend class BindingLib::Utility;                       \
    friend class CObjectWrapper;

#define LEGION_EXTERN_LOGGER_DECLARATIONS                        \
    extern LegionRuntime::Logger::Category log_run;              \
    extern LegionRuntime::Logger::Category log_task;             \
    extern LegionRuntime::Logger::Category log_index;            \
    extern LegionRuntime::Logger::Category log_field;            \
    extern LegionRuntime::Logger::Category log_region;           \
    extern LegionRuntime::Logger::Category log_inst;             \
    extern LegionRuntime::Logger::Category log_variant;          \
    extern LegionRuntime::Logger::Category log_allocation;       \
    extern LegionRuntime::Logger::Category log_prof;             \
    extern LegionRuntime::Logger::Category log_garbage;          \
    extern LegionRuntime::Logger::Category log_spy;              \
    extern LegionRuntime::Logger::Category log_shutdown;

  }; // Internal namespace

  // Typedefs that are needed everywhere
  typedef LegionRuntime::Accessor::ByteOffset ByteOffset;
  typedef Realm::Runtime RealmRuntime;
  typedef Realm::Machine Machine;
  typedef Realm::Domain Domain;
  typedef Realm::DomainPoint DomainPoint;
  typedef Realm::IndexSpaceAllocator IndexSpaceAllocator;
  typedef Realm::Memory Memory;
  typedef Realm::Processor Processor;
  typedef Realm::CodeDescriptor CodeDescriptor;
  typedef Realm::Reservation Reservation;
  typedef ::legion_reduction_op_id_t ReductionOpID;
  typedef Realm::ReductionOpUntyped ReductionOp;
  typedef ::legion_custom_serdez_id_t CustomSerdezID;
  typedef Realm::CustomSerdezUntyped SerdezOp;
  typedef Realm::Machine::ProcessorMemoryAffinity ProcessorMemoryAffinity;
  typedef Realm::Machine::MemoryMemoryAffinity MemoryMemoryAffinity;
  typedef Realm::ElementMask::Enumerator Enumerator;
  typedef ::legion_lowlevel_coord_t coord_t;
  typedef Realm::IndexSpace::FieldDataDescriptor FieldDataDescriptor;
  typedef std::map<CustomSerdezID,
                   const Realm::CustomSerdezUntyped *> SerdezOpTable;
  typedef std::map<Realm::ReductionOpID,
          const Realm::ReductionOpUntyped *> ReductionOpTable;
  typedef void (*SerdezInitFnptr)(const ReductionOp*, void *&, size_t&);
  typedef void (*SerdezFoldFnptr)(const ReductionOp*, void *&,
                                  size_t&, const void*);
  typedef std::map<Realm::ReductionOpID, SerdezRedopFns> SerdezRedopTable;
  typedef ::legion_projection_type_t HandleType;
  typedef ::legion_address_space_t AddressSpace;
  typedef ::legion_task_priority_t TaskPriority;
  typedef ::legion_garbage_collection_priority_t GCPriority;
  typedef ::legion_color_t Color;
  typedef ::legion_field_id_t FieldID;
  typedef ::legion_trace_id_t TraceID;
  typedef ::legion_mapper_id_t MapperID;
  typedef ::legion_context_id_t ContextID;
  typedef ::legion_instance_id_t InstanceID;
  typedef ::legion_index_space_id_t IndexSpaceID;
  typedef ::legion_index_partition_id_t IndexPartitionID;
  typedef ::legion_index_tree_id_t IndexTreeID;
  typedef ::legion_field_space_id_t FieldSpaceID;
  typedef ::legion_generation_id_t GenerationID;
  typedef ::legion_type_handle TypeHandle;
  typedef ::legion_projection_id_t ProjectionID;
  typedef ::legion_region_tree_id_t RegionTreeID;
  typedef ::legion_distributed_id_t DistributedID;
  typedef ::legion_address_space_id_t AddressSpaceID;
  typedef ::legion_tunable_id_t TunableID;
  typedef ::legion_generator_id_t GeneratorID;
  typedef ::legion_mapping_tag_id_t MappingTagID;
  typedef ::legion_semantic_tag_t SemanticTag;
  typedef ::legion_variant_id_t VariantID;
  typedef ::legion_unique_id_t UniqueID;
  typedef ::legion_version_id_t VersionID;
  typedef ::legion_projection_epoch_id_t ProjectionEpochID;
  typedef ::legion_task_id_t TaskID;
  typedef ::legion_layout_constraint_id_t LayoutConstraintID;
  typedef std::map<Color,ColoredPoints<ptr_t> > Coloring;
  typedef std::map<Color,Domain> DomainColoring;
  typedef std::map<Color,std::set<Domain> > MultiDomainColoring;
  typedef std::map<DomainPoint,ColoredPoints<ptr_t> > PointColoring;
  typedef std::map<DomainPoint,Domain> DomainPointColoring;
  typedef std::map<DomainPoint,std::set<Domain> > MultiDomainPointColoring;
  typedef void (*RegistrationCallbackFnptr)(Machine machine,
                Runtime *rt, const std::set<Processor> &local_procs);
  typedef LogicalRegion (*RegionProjectionFnptr)(LogicalRegion parent,
      const DomainPoint&, Runtime *rt);
  typedef LogicalRegion (*PartitionProjectionFnptr)(LogicalPartition parent,
      const DomainPoint&, Runtime *rt);
  typedef bool (*PredicateFnptr)(const void*, size_t,
      const std::vector<Future> futures);
  typedef void (*RealmFnptr)(const void*,size_t,
                             const void*,size_t,Processor);
  // Magical typedefs
  // (don't forget to update ones in old HighLevel namespace in legion.inl)
  typedef Internal::TaskContext* Context;
  typedef Internal::ContextInterface* InternalContext;
  typedef Internal::GeneratorImpl* GeneratorContext;
  typedef void (*GeneratorFnptr)(GeneratorContext,
                                 const TaskGeneratorArguments&, Runtime*);
  // Anothing magical typedef
  namespace Mapping {
    typedef Internal::MappingCallInfo* MapperContext;
    typedef Internal::PhysicalManager* PhysicalInstanceImpl;
  };

  namespace Internal {
    // This is only needed internally
    typedef Realm::RegionInstance PhysicalInstance;
    // Pull some of the mapper types into the internal space
    typedef Mapping::Mapper Mapper;
    typedef Mapping::PhysicalInstance MappingInstance;
    // A little bit of logic here to figure out the
    // kind of bit mask to use for FieldMask

// The folowing macros are used in the FieldMask instantiation of BitMask
// If you change one you probably have to change the others too
#define LEGION_FIELD_MASK_FIELD_TYPE          uint64_t
#define LEGION_FIELD_MASK_FIELD_SHIFT         6
#define LEGION_FIELD_MASK_FIELD_MASK          0x3F
#define LEGION_FIELD_MASK_FIELD_ALL_ONES      0xFFFFFFFFFFFFFFFF

#if defined(__AVX__)
#if (MAX_FIELDS > 256)
    typedef AVXTLBitMask<MAX_FIELDS> FieldMask;
#elif (MAX_FIELDS > 128)
    typedef AVXBitMask<MAX_FIELDS> FieldMask;
#elif (MAX_FIELDS > 64)
    typedef SSEBitMask<MAX_FIELDS> FieldMask;
#else
    typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,MAX_FIELDS,
                    LEGION_FIELD_MASK_FIELD_SHIFT,
                    LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
#endif
#elif defined(__SSE2__)
#if (MAX_FIELDS > 128)
    typedef SSETLBitMask<MAX_FIELDS> FieldMask;
#elif (MAX_FIELDS > 64)
    typedef SSEBitMask<MAX_FIELDS> FieldMask;
#else
    typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,MAX_FIELDS,
                    LEGION_FIELD_MASK_FIELD_SHIFT,
                    LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
#endif
#else
#if (MAX_FIELDS > 64)
    typedef TLBitMask<LEGION_FIELD_MASK_FIELD_TYPE,MAX_FIELDS,
                      LEGION_FIELD_MASK_FIELD_SHIFT,
                      LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
#else
    typedef BitMask<LEGION_FIELD_MASK_FIELD_TYPE,MAX_FIELDS,
                    LEGION_FIELD_MASK_FIELD_SHIFT,
                    LEGION_FIELD_MASK_FIELD_MASK> FieldMask;
#endif
#endif
    typedef BitPermutation<FieldMask,LEGION_FIELD_LOG2> FieldPermutation;
    typedef Fraction<unsigned long> InstFrac;
#undef LEGION_FIELD_MASK_FIELD_SHIFT
#undef LEGION_FIELD_MASK_FIELD_MASK

    // Similar logic as field masks for node masks

// The following macros are used in the NodeMask instantiation of BitMask
// If you change one you probably have to change the others too
#define LEGION_NODE_MASK_NODE_TYPE           uint64_t
#define LEGION_NODE_MASK_NODE_SHIFT          6
#define LEGION_NODE_MASK_NODE_MASK           0x3F
#define LEGION_NODE_MASK_NODE_ALL_ONES       0xFFFFFFFFFFFFFFFF

#if defined(__AVX__)
#if (MAX_NUM_NODES > 256)
    typedef AVXTLBitMask<MAX_NUM_NODES> NodeMask;
#elif (MAX_NUM_NODES > 128)
    typedef AVXBitMask<MAX_NUM_NODES> NodeMask;
#elif (MAX_NUM_NODES > 64)
    typedef SSEBitMask<MAX_NUM_NODES> NodeMask;
#else
    typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,MAX_NUM_NODES,
                    LEGION_NODE_MASK_NODE_SHIFT,
                    LEGION_NODE_MASK_NODE_MASK> NodeMask;
#endif
#elif defined(__SSE2__)
#if (MAX_NUM_NODES > 128)
    typedef SSETLBitMask<MAX_NUM_NODES> NodeMask;
#elif (MAX_NUM_NODES > 64)
    typedef SSEBitMask<MAX_NUM_NODES> NodeMask;
#else
    typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,MAX_NUM_NODES,
                    LEGION_NODE_MASK_NODE_SHIFT,
                    LEGION_NODE_MASK_NODE_MASK> NodeMask;
#endif
#else
#if (MAX_NUM_NODES > 64)
    typedef TLBitMask<LEGION_NODE_MASK_NODE_TYPE,MAX_NUM_NODES,
                      LEGION_NODE_MASK_NODE_SHIFT,
                      LEGION_NODE_MASK_NODE_MASK> NodeMask;
#else
    typedef BitMask<LEGION_NODE_MASK_NODE_TYPE,MAX_NUM_NODES,
                    LEGION_NODE_MASK_NODE_SHIFT,
                    LEGION_NODE_MASK_NODE_MASK> NodeMask;
#endif
#endif
    typedef IntegerSet<AddressSpaceID,NodeMask> NodeSet;

#undef LEGION_NODE_MASK_NODE_SHIFT
#undef LEGION_NODE_MASK_NODE_MASK

// The following macros are used in the ProcessorMask instantiation of BitMask
// If you change one you probably have to change the others too
#define LEGION_PROC_MASK_PROC_TYPE           uint64_t
#define LEGION_PROC_MASK_PROC_SHIFT          6
#define LEGION_PROC_MASK_PROC_MASK           0x3F
#define LEGION_PROC_MASK_PROC_ALL_ONES       0xFFFFFFFFFFFFFFFF

#if defined(__AVX__)
#if (MAX_NUM_PROCS > 256)
    typedef AVXTLBitMask<MAX_NUM_PROCS> ProcessorMask;
#elif (MAX_NUM_PROCS > 128)
    typedef AVXBitMask<MAX_NUM_PROCS> ProcessorMask;
#elif (MAX_NUM_PROCS > 64)
    typedef SSEBitMask<MAX_NUM_PROCS> ProcessorMask;
#else
    typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,MAX_NUM_PROCS,
                    LEGION_PROC_MASK_PROC_SHIFT,
                    LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
#endif
#elif defined(__SSE2__)
#if (MAX_NUM_PROCS > 128)
    typedef SSETLBitMask<MAX_NUM_PROCS> ProcessorMask;
#elif (MAX_NUM_PROCS > 64)
    typedef SSEBitMask<MAX_NUM_PROCS> ProcessorMask;
#else
    typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,MAX_NUM_PROCS,
                    LEGION_PROC_MASK_PROC_SHIFT,
                    LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
#endif
#else
#if (MAX_NUM_PROCS > 64)
    typedef TLBitMask<LEGION_PROC_MASK_PROC_TYPE,MAX_NUM_PROCS,
                      LEGION_PROC_MASK_PROC_SHIFT,
                      LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
#else
    typedef BitMask<LEGION_PROC_MASK_PROC_TYPE,MAX_NUM_PROCS,
                    LEGION_PROC_MASK_PROC_SHIFT,
                    LEGION_PROC_MASK_PROC_MASK> ProcessorMask;
#endif
#endif

#undef PROC_SHIFT
#undef PROC_MASK
  }; // namespace Internal

  // Legion derived event types
  class LgEvent : public Realm::Event {
  public:
    static const LgEvent NO_LG_EVENT;
  public:
    LgEvent(void) { id = 0; }
    LgEvent(const LgEvent &rhs) { id = rhs.id; }
    explicit LgEvent(const Realm::Event e) { id = e.id; }
  public:
    inline LgEvent& operator=(const LgEvent &rhs)
      { id = rhs.id; return *this; }
  };

  class PredEvent : public LgEvent {
  public:
    static const PredEvent NO_PRED_EVENT;
  public:
    PredEvent(void) : LgEvent() { }
    PredEvent(const PredEvent &rhs) { id = rhs.id; }
    explicit PredEvent(const Realm::UserEvent &e) : LgEvent(e) { }
  public:
    inline PredEvent& operator=(const PredEvent &rhs)
      { id = rhs.id; return *this; }
    inline operator Realm::UserEvent() const
      { Realm::UserEvent e; e.id = id; return e; }
  };

  class ApEvent : public LgEvent {
  public:
    static const ApEvent NO_AP_EVENT;
  public:
    ApEvent(void) : LgEvent() { }
    ApEvent(const ApEvent &rhs) { id = rhs.id; }
    explicit ApEvent(const Realm::Event &e) : LgEvent(e) { }
    explicit ApEvent(const PredEvent &e) { id = e.id; }
  public:
    inline ApEvent& operator=(const ApEvent &rhs)
      { id = rhs.id; return *this; }
    inline bool has_triggered_faultignorant(void) const
      { bool poisoned; return has_triggered_faultaware(poisoned); }
  };

  class ApUserEvent : public ApEvent {
  public:
    static const ApUserEvent NO_AP_USER_EVENT;
  public:
    ApUserEvent(void) : ApEvent() { }
    ApUserEvent(const ApUserEvent &rhs) : ApEvent(rhs) { }
    explicit ApUserEvent(const Realm::UserEvent &e) : ApEvent(e) { }
  public:
    inline ApUserEvent& operator=(const ApUserEvent &rhs)
      { id = rhs.id; return *this; }
    inline operator Realm::UserEvent() const
      { Realm::UserEvent e; e.id = id; return e; }
  };

  class ApBarrier : public ApEvent {
  public:
    static const ApBarrier NO_AP_BARRIER;
  public:
    ApBarrier(void) : ApEvent(), timestamp(0) { }
    ApBarrier(const ApBarrier &rhs)
      : ApEvent(rhs), timestamp(rhs.timestamp) { }
    explicit ApBarrier(const Realm::Barrier &b)
      : ApEvent(b), timestamp(b.timestamp) { }
  public:
    inline ApBarrier& operator=(const ApBarrier &rhs)
      { id = rhs.id; timestamp = rhs.timestamp; return *this; }
    inline operator Realm::Barrier() const
      { Realm::Barrier b; b.id = id;
        b.timestamp = timestamp; return b; }
  public:
    Realm::Barrier::timestamp_t timestamp;
  };

  class RtEvent : public LgEvent {
  public:
    static const RtEvent NO_RT_EVENT;
  public:
    RtEvent(void) : LgEvent() { }
    RtEvent(const RtEvent &rhs) { id = rhs.id; }
    explicit RtEvent(const Realm::Event &e) : LgEvent(e) { }
    explicit RtEvent(const PredEvent &e) { id = e.id; }
  public:
    inline RtEvent& operator=(const RtEvent &rhs)
      { id = rhs.id; return *this; }
  };

  class RtUserEvent : public RtEvent {
  public:
    static const RtUserEvent NO_RT_USER_EVENT;
  public:
    RtUserEvent(void) : RtEvent() { }
    RtUserEvent(const RtUserEvent &rhs) : RtEvent(rhs) { }
    explicit RtUserEvent(const Realm::UserEvent &e) : RtEvent(e) { }
  public:
    inline RtUserEvent& operator=(const RtUserEvent &rhs)
      { id = rhs.id; return *this; }
    inline operator Realm::UserEvent() const
      { Realm::UserEvent e; e.id = id; return e; }
  };

  class RtBarrier : public RtEvent {
  public:
    static const RtBarrier NO_RT_BARRIER;
  public:
    RtBarrier(void) : RtEvent(), timestamp(0) { }
    RtBarrier(const RtBarrier &rhs)
      : RtEvent(rhs), timestamp(rhs.timestamp) { }
    explicit RtBarrier(const Realm::Barrier &b)
      : RtEvent(b), timestamp(b.timestamp) { }
  public:
    inline RtBarrier& operator=(const RtBarrier &rhs)
      { id = rhs.id; timestamp = rhs.timestamp; return *this; }
    inline operator Realm::Barrier() const
      { Realm::Barrier b; b.id = id;
        b.timestamp = timestamp; return b; }
  public:
    Realm::Barrier::timestamp_t timestamp;
  };

}; // Legion namespace

#endif // __LEGION_TYPES_H__

redpajama_set_name: RedPajamaGithub


text:
Canadian Armed Forces
Canadian Medals Chart
General Campain Star - SOUTH-WEST ASIA (GCS-SWA)
The official description, eligibility, criteria and history of the General Campaign Star - SOUTH-WEST ASIA (GCS-SWA).
This general service award has been created as a means to recognize in a timelier manner those who participate in operations in the presence of an armed enemy. Rather than creating a new honour for each new Canadian Forces (CF) operation as it arises, the General Campaign Star (GCS) and General Service Medal (GSM) — with their theatre or service specific ribbons — can be awarded in future to honour participation in any operation that meets the criteria provided that the service is not counted towards another service medal.
The General Campaign Star (GCS) is awarded to members of the Canadian Forces and members of allied forces working with the Canadian Forces who deploy into a defined theatre of operations to take part in operations in the presence of an armed enemy.
The GCS is always issued with a ribbon specific to the theatre or type of service being recognized, and each ribbon has its own criteria.
24 April 2003 to 12 March 2014
Awarded to military personnel who served for at least 30 cumulative days:
with the Canadian contribution to the International Security Assistance Force (ISAF) in Afghanistan between 24 April 2003 and 31 July 2009, in the theatre of operations which consisted of the political boundaries and airspace of Afghanistan; and/or
in the theatre of operations consisting of the political boundaries of Afghanistan, the Persian Gulf, the Gulf of Oman, the Gulf of Aden, the Red Sea, the Suez Canal, and those parts of the Indian Ocean and the Arabian Sea that are west of sixty-eight degrees East longitude and north of five degrees South latitude, as well as the airspace above those areas between 1 August 2009 and 12 March 2014, provided that the service is not counted towards another service medal.
13 March 2014 to present
in the theatre of operations consisting of the political boundaries of Afghanistan, the Persian Gulf, the Gulf of Oman, the Gulf of Aden, the Red Sea, the Suez Canal, and those parts of the Indian Ocean and the Arabian Sea that are west of sixty-eight degrees East longitude and north of five degrees South latitude, as well as the airspace above those areas from 13 March 2014 onward, provided that the service is not counted towards another service medal.
Personnel who have eligible service under the 24 April 2003 to 12 March 2014 criteria but did not meet the 30 day criteria, and also have eligible service under the 13 March 2014 onward criteria, shall be allowed to combine all the eligible days of service towards the minimum of 14 cumulative days of eligible service criteria.
The only members of allied forces eligible are those who serve in missions on behalf of Canada. They are usually exchange personnel who deploy with our units or personnel seconded to the CF specifically to serve in our missions. In all cases, they must be on the CFTPO filling a Canadian position, and they are usually assigned a CF service number. Foreign personnel working in concert with the CF or reporting to a Canadian superior in an international context are not eligible for Canadian service medals.
Service in South-West Asia between 11 September 2001 and 31 July 2009 which was not under the NATO-led ISAF is not eligible for this award but may be eligible for the South-West Asia Service Medal. See the page for this medal for further details.
Aircrew flying into the theatre accumulate one day of service for the first sortie flown on any day. Additional sorties flown on the same day receive no further credit.
The first and last days in theatre count as full days.
Technical Assistance Visits, Staff Inspection Visits, and Staff Assistance Visits in theatre will now be considered eligible service towards the GCS.
Certain other types of visits and inspections do not constitute qualifying service. Specifically, visits for the purpose of leadership, familiarization, ceremonial, or morale by civilian or military VIPs and other similar administrative activities are excluded from qualification.
Any person who dies or is evacuated because of injuries or medical reasons directly attributable to service is deemed to have satisfied the time criteria set out above. Any recipient of the Star who dies or is evacuated because of injuries or medical reasons directly attributable to service shall be credited the entire period the person would have served should the person have completed their tour of duty for the purpose of calculating eligibility towards Rotation Bars.
When a person meets the criteria for the GCS-SWA or a Bar to it and the GSM-SWA or a Bar to it within a period of 180 days, the person shall only be awarded the GCS or a Bar to it. In other words, one cannot earn both the GCS and the GSM for SWA (or bars to them) during a six months period.
The Star and Rotation Bars shall be awarded for honourable service.
For more details, consult the Eligible Service List (accessible only on the Government of Canada network).
The GCS is a gold-coloured four-pointed star, 44 mm across, representing the cardinal points of a compass bearing on the obverse, built-up in order from the back: a wreath of maple leaves terminating at the top with the Royal Crown, two crossed swords, the blades and hilts forming four additional points to the star, an anchor, and a flying eagle.
The wreath represents honour; the maple leaves represent Canada; the anchor, crossed swords, and eagle represent the three services of the Canadian Forces; and the Crown represents the Queen of Canada and her role as the fount of all honours. On the reverse appear within a raised circle, from top to bottom: the Royal Cypher ensigned by the Royal Crown, a plain space for engraving, and three maple leaves on one stem.
The Star is engraved on the reverse with the service number, abbreviated substantive rank, initials, and name of the recipient.
The ribbon passes through a ring attached to a small ball at the top point of the star.
The ribbon is 32 mm wide with a central stripe of green (12 mm), on either side of which are stripes of white (2 mm) and red (8 mm). Red and white are the official colours of Canada as appointed by King George V in 1921 and green represents service.
The rotations bars for the Star are gold in colour with a raised edge and bear either one or five maples leaves.
Rotation bars have been created to recognize long periods of service in a theatre.
Recipients of the GCS may be awarded a first Rotation Bar after a total of 210 days of eligible service, including the days taken into account for the award of the original medal, and additional bars are awarded for each subsequent period of 180 days.
One bar bearing five maple leaves is worn in lieu of five bars bearing one maple leaf.
The GCS-SWA shall be worn in the sequence prescribed in the Canadian Orders, Decorations and Medals Directive, and in the following manner:
On the left breast, suspended from the ribbon described above, between the General Campaign Star with ALLIED FORCE ribbon and the General Campaign Star with EXPEDITION ribbon:
One bar is worn centred on the ribbon;
If multiple bars have been awarded, they shall be evenly spaced on the ribbon in the order earned, with the first bar earned worn the closest to the Star; and
When the undress ribbon is worn, a silver maple leaf shall be worn centred on the ribbon of the Medal to indicate the award of a Rotation Bar, a gold maple leaf shall be worn to indicate the award of a second Rotation Bar, and a red maple leaf shall be worn to indicate the award of a third Rotation Bar. If more than three Rotation Bars have been awarded, those devices shall be worn in combination so as to indicate the total number of Bars awarded.
Post-nominals
The use of a post-nominal is not authorized for this medal.
The following is a list of Canadian Forces members who have died while performing service eligible for this award:
Allard J.P.G.M. Cpl
Anderson J. Cpl
Arnal J.H. Cpl
Arndt R.F. MCpl
Arnold G.H. Cpl
Audet P.Y. MCpl
Baker J.C. Cpl
Bartsch C.D. Cpl
Bason C.S.F. MCpl
Beauchamp N.R. Cpl
Beerenfenger R.C. Cpl
Blais K.M.N. Cpl
Blake C. PO2
Bobbitt C. Cpl
Bouthillier J. Pte
Bouzane S.F. Cpl
Boyes J.G. Lt
Boyes J.J. Sgt
Braun D.R. Cpl
Brown D.R. WO
Bulger N.A. Cpl
Byers D.R.J. Pte
Caswell D.J. Pte
Chidley G.W. Pte
Collier B.J. Pte
Costall R.H. Pte
Courcy S.J.G. Pte
Couturier J.J.S. Cpl
Crooks T.K.G. Pte
Curwin J.M.R. Pte
Cushley W.J.J. Pte
Dallaire K.Y.R. Pte
Dawe M.J. Capt
Diab M.H. Pte
Dion J.J. Pte
Diplaros D. Pte
Doyle E.M. MCpl
Drouin J.F. Cpl
Dubé J.R.M. Cpl
Duchesne C.J.T.A MCpl
Eades S.A. Sgt
Eykelenboom A.J. Cpl
Faught J. Sgt
Fitzpatrick D.J. Cpl
Fortin J.D.O. Cpl
Francis J.C. Capt
Freeman M.B. Pte
Giesebrecht K. MCpl
Gillam C.P. Sgt
Girouard R.M.J. CWO
Gonthier J.F.E. Pte
Good B.R. Pte
Goudreault M. Sgt
Graham M.A. Pte
Greenfield S.D. Pte
Greenslade D.R. Pte
Greff B.G. MCpl
Grenon A.P. Cpl
Hamilton T.J. Cpl
Hayakaze M.Y. Pte
Hayes C.J. Pte
Horn C.J. Pte
Hornburg N. Cpl
Ingram V. Sgt
Joannette M.M. Cpl
Jones J.P. Pte
Karigiannis C. Sgt
Keating S.P. Cpl
Keller B.J. Cpl
Kennedy K.V. Pte
Klukie J.J. Pte
Kruse G.J. Sgt
Labbé E.B. Pte
Leary R.S. Capt
Levesque M. Pte
Longtin J.M.S.S. Pte
Lormand P.J. Pte
Lucas D.J. Sgt
MacNeil J. Sgt
Marshall S.J. Pte
Martin J.L.S. Cpl
Massouh H. WO
McCormack Z. Cpl
McCully M.J.C. Cpl
McKay K.T. Pte
McLaren M.R. Cpl
Megeney R.K. Cpl
Mellish F.R. WO
Mendes M.L. Maj
Mercier J.C.M.M. MWO
Michaud C.P. MCpl
Miller A. Pte
Miok G. Sgt
Mitchell R.T.J. Cpl
Morley K.I. Cpl
Murphy J.B. Cpl
Nolan R.F. WO
Nuttall A.R. Lt
O'Quinn K.C. Cpl
Ouellet J. Cpl
Parker G. Col
Paul F.C. Capt
Péloquin A.J. Pte
Pentland P.J. Pte
Pépin J.Y.F.S. Maj
Pinksen B.N.C.R. Cpl
Poland B.D. Cpl
Priede D.J. MCpl
Reid C.J. Cpl
Renaud J.M.G.R Pte
Roberge J.M.F.G. WO
Roberts J.B. MCpl
Ruckpaul R.M. Maj
Rudd L. Pte
Scherrer M.A.Y. Cpl
Seggie M.J.A. Cpl
Shipway P. Sgt
Short R.A. Sgt
Snyder J.S. Capt
Stachnik S.H. Sgt
Stannix C.P. Cpl
Starker M.G. Cpl
Stewart A.M.J. MCpl
Stock S.J. Pte
Storm A.H. Cpl
Street T.J. Pte
Taylor K. Sgt
Tedford D.S. Sgt
Todd T.W. Pte
Vernelli S.F. MCpl
Walsh J.S. MCpl
Wasden D.R.R.J. Cpl
Watkins L.W.T. Pte
Wiebe J.V. Pte
Williams A.E. Cpl
Williamson B.N. Pte
Wilmot C.W. Pte
Wilson M.A. Pte
Wilson R.J. WO
The GCS and GSM were created by Her Majesty The Queen in March 2004. Initially the medals were issued each with only one ribbon (those currently used for South-West Asia) with bars specifying the operation being recognized. Two bars were created, namely ALLIED FORCE and ISAF+FIAS.
The inaugural ceremony took place on 29 November 2004 in the ballroom of Rideau Hall in Ottawa. On this occasion, Her Excellency, the Right Honourable Adrienne Clarkson, CC, CMM, COM, CD, Governor General and Commander-in-Chief of Canada, presented the Star to 28 representative recipients (8 with ALLIED FORCE bar and 20 with ISAF+FIAS bar), including the families of three of the casualties listed above. The first presentations of the General Service Medal were also made during that event.
In 2009, the GCS and GSM were modified so that the existing bars were abolished, being replaced with theatre or service-specific ribbons, thus allowing the use of bars to recognize multiple rotations where appropriate. As a result, recipients of the original GCS with ISAF+FIAS bar must have their medal remounted without the bar but using the same ribbon. The ISAF+FIAS bars shall be returned to DH&R. Moreover, because the provision that no one could earn both the GCS and the GSM for ISAF service has been modified, some recipients who had to relinquish their GSM in order to receive the GCS will be able to claim it back provided they did not meet the criteria for both awards within the same period of six months.
Captain Carl Gauthier of the Directorate of History and Heritage, DND, designed the award. The Canadian Heraldic Authority at the Chancellery of Honours, Rideau Hall, completed the final artwork.
As of 1 June 2016, 32,479 awards have been made.

redpajama_set_name: RedPajamaCommonCrawl


We just recently upgraded to VuFind 4.0 and are trying to migrate our old theme templates into the new format using the RecordDataFormatter per the tips on the Wiki page (https://vufind.org/wiki/development:architecture:record_data_formatter), and are running into an issue where the $formatter = $this->recordDataFormatter(); line in core.phtml is returning an internal server error code.
1. Copy RecordDataFormatterFactory.php into my custom module's View/Helper/Root directory.
3. Copy over the core.phtml from bootstrap3/templates/RecordDriver/SolrDefault/ to my custom theme directory.
Is there something else I should be doing to set up the configuration properly?
It would be helpful to know what the internal server error actually is – maybe it's just a minor parse error caused by a typo somewhere. Are you seeing any helpful messages in your Apache error log? That's usually the place to look for the cause of 500 errors.
I've tried changing $spec = new \VuFind\View\Helper\Root\RecordDataFormatter\SpecBuilder(); back to $spec = new RecordDataFormatter\SpecBuilder(); and am getting the same error. Any ideas?
"Unexpected '$spec'" probably indicates that something is wrong above that code – like a missing semi-colon, missing/mismatched brace, etc. Basically the parser is expecting something specific, and it's finding your $spec declaration instead. Double-check the surrounding code, and if you still don't see anything obviously wrong, feel free to share the whole file with me.
Many thanks Demian. I re-copied over the RecordDataFormatterFactory.php file into my custom module's directory, re-did my modifications, and it's working perfectly now.


I notice that the recent thread complaining about the site, and some helpful comments about how to fix various elements, has been quietly removed. Bad news being buried is always a poor sign. Everyone wants the site back to a form where it was as useful as its previous incarnation. But there are just so many problems, and the many little problems gradually fixed (or not) don't get away from the big problem that the current design is just badly, badly conceived. How you fix that I don't know. Everyone I talk to about it either agrees its absolute rubbish or says they don't bother using it any more. How you as a (I assume) investor must feel about this, given presumably plummeting advert revenues and just being distracted by daily general hassle dealing with basic errors and irritated users, I can only imagine. I presume most people in Midi-Pyrenees (a predominantly country area) used to see A-I as a great way to communicate, find tradespeople, find out about events, ask questions, etc etc. The frustration must be widespread, and it doesn't help that there is this sense of denial on A-I about the problem.Your business has gone down the toilet because someone at A-I hired the wrong website designer. No one can be happy about it. The fact that I am even bothering to write this demonstrates that I and others would actually like to see a functioning and successful site. People want it and NEED it.
"hired the wrong web-site desighner". You mean you think they paid someone?
TBH, it has improved over the weeks, but you`re right, it must be very frustrating for the franchisees. Well done Giles for remaining calm (on the web at least).
Just to say that we haven't removed comments, I'm not sure to what you are referring, but we've pretty much left everything, and no we are not trying to hide and we haven't buried anything.
Thank Bill, yes, things are improving, and will continue to do so, I will say again, the 'old' site, got very bad press when it launched, for months. There were lots of postings saying the business had gone down the toilet etc and that we had hired the wrong designer and bring back the 'old' site. That was in 2012, but we had enough belief and understanding of the business that we just stuck with it. Now you are all clamouring for the site many of you thought so awful in 2012.
We do have a ways to go, we launched early to take into consideration all the new Google rules since last year as we realized that if we left it any longer, we'd lose our excellent Google rankings which really would be bad for business and the old site would not be able to function as it should for very long. So, a few months of frustration and difficulties seemed a much better choice than no site.
Here in France where people use Discussions and classifieds a lot, you have had to bear with more of the problems, for which we are very sorry, and have said so on a consistent basis. But not only will function improve in the coming weeks, the facilities we can offer will too. And they are improving.
Yes, iolanthe, you do all need the site, and we are working to make sure you get a site that can work for all of you for years to come, not just for this week, or this month, or even this year. It doesn't come easy; we have 130 sites worldwide, we have millions, literally millions of pages of information to handle, we are in over 40 countries with all the varying cultures, bureaucracy and differing expectations, but, as in 2012, we are getting there.
Frustrating, yes, you bet it is, but I as a franchisee, feel much better knowing we have a new site that will be able to develop, and with which I can grow my business, and for now, we get our heads down and do the work.
All your feedback is taken into account, but I will say that stuff like 'I don't like it, and bad design' doesn't really help us. Things like ' the font too light to see properly' is helpful, (that one was one of my personal bugbears) and those who've feedback specifically about navigation, have really helped. We thank you! Keep them coming. Understand that you need to vent general frustration though, but please realize that venting isn't feedback. I'm in the hot seat here, and so believe me when I say I understand the difference.
I won't answer these postings every time they come up, it's repetitious and loses any real sense. I'm not even going to ask you to bear with us, I hope you will, but truth is, only time and our efforts will tell. The ball is in our court and we take that very seriously.
Please email us with any specific problems, we will always do our best to sort them out for you.
Giles, with the greatest of respect (as you are the franchise, we learn), your long response indicates someone who remains both defiant and deluded in the face of an absolutely overwhelming rejection of the new format by your customers. AND the way it was introduced. Your assertion that the previous incarnation was loved, sounds to me like a load of drivel imparted to you by the higher powers at AI to justify the absolute textbook fail at how manage change.
No one I believe is saying the previous site was wonderful, or the last word. BUT IT WORKED for most people quite well. See Lima's correct comment today (although his silence as a result of the new format no better defines the saying that "every cloud has a silver lining"). Even Meredith no longer posts her wacky "bridges to nowhere" rants. I quite miss her, in a slightly weird kind of way.
What everyone is totally cheesed off about is that the site went down for a few weeks, promising some wonderful new portal. And what did we get? The Herman van Rompuy of websites. Weak, metrosexual pink graphics. An inept launch, that no one was consulted on, or seemed to have tested. Absolute chaos. And now some two months down the line, whilst it is a bit better (though that achievement is not a high hurdle), it is still worse than the old site. And in the meantime you have lost many viewers, respect, interest, custom. Your previous rather assured reputation will forever be tainted with this shambles. As I write this, I can't get the image of Neil Pillock being doused by a wave out of my head. It really is that bad.
And the other comment, basically that everyone didn't like the 2012 change either, again demonstrates that you didn't learn much from that misfire???
The problem with the new website (and as I remember, the change from 2012), is that the update gleefully embraces all sorts of new functionality that most people didn't care about, whilst woefully ignoring and indeed omitting what everyone does. In other words you didn't, and still don't, get the basics right; easy communication, layout, dignified colour scheme, navigation, login. In all of these aspects the new site is either hopeless or no better than the previous one. I'm an Englishman Abroad and I don't want my Anglo-Info website to make me nauseous every time I look at it. Can't we even have a website to be proud of?
All you have succeeded in doing is irritating all of your users for absolutely no reason. It really is a website that could have been commissioned, designed, and indeed run by, the Ryanair Customer Service department.
I have just had at least five attempts to list an item for sale without success as it kept crashing, then in despair, I tried to list it without pictures and it was accepted.
Problem is, who bothers to look at items for sale without pictures ?.
Also noticed most of the other items without pictures and big date gaps between listings, not much gets advertised on here any more. Shame..
I am having huge difficulties trying to even open pages on this site. I wanted to place two classified ads but each time I am told the page doesn't exist. What am I doing wrong?


text:
Q: File created from Android app is not visible until renamed everybody!
I create a file in my android app with this code, run in UI thread:
final File dir = Environment.getExternalStorageDirectory();
final File file = new File(dir, "file" + System.currentTimeMillis()); //$NON-NLS-1$

try
{
   file.createNewFile())
}

catch (Exception e)
{
   ...
}

and I can't see it on my Win7 PC, until I rename the file on the phone with the file browser. I run the program on Samsung Galaxy Nexus, OS ver 4.0.2. What might be wrong?
Thanks.

A: At last!
The solution is to use MediaScannerConnection.scanFile(context, new String[] {path}, null, null);, but path must include THE NAME OF THE FILE, not only the path. No extension is necessary.
At least, it worked in my case :) .
Huge thanks to Chris Stratton.

A: The only solution I have found yet, is install SSHDroid on the device and WinSCP on Win7.

redpajama_set_name: RedPajamaStackExchange