Legion Runtime
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Legion::Runtime Class Reference

#include <legion.h>

Public Types

typedef DomainPoint(* PointTransformFnptr) (const DomainPoint &point, const Domain &domain, const Domain &range)
 

Public Member Functions

IndexSpace create_index_space (Context ctx, size_t max_num_elmts)
 
IndexSpace create_index_space (Context ctx, const std::set< Domain > &domains)
 
void create_shared_ownership (Context ctx, IndexSpace handle)
 
void destroy_index_space (Context ctx, IndexSpace handle, const bool unordered=false, const bool recurse=true, const char *provenance=NULL)
 
void create_shared_ownership (Context ctx, IndexPartition handle)
 
void destroy_index_partition (Context ctx, IndexPartition handle, const bool unordered=false, const bool recurse=true, const char *provenance=NULL)
 
DomainPoint safe_cast (Context ctx, DomainPoint point, LogicalRegion region)
 
template<int DIM, typename COORD_T >
bool safe_cast (Context ctx, Point< DIM, COORD_T > point, LogicalRegionT< DIM, COORD_T > region)
 
FieldSpace create_field_space (Context ctx, const char *provenance=NULL)
 
FieldSpace create_field_space (Context ctx, const std::vector< size_t > &field_sizes, std::vector< FieldID > &resulting_fields, CustomSerdezID serdez_id=0, const char *provenance=NULL)
 
FieldSpace create_field_space (Context ctx, const std::vector< Future > &field_sizes, std::vector< FieldID > &resulting_fields, CustomSerdezID serdez_id=0, const char *provenance=NULL)
 
void create_shared_ownership (Context ctx, FieldSpace handle)
 
void destroy_field_space (Context ctx, FieldSpace handle, const bool unordered=false, const char *provenance=NULL)
 
LogicalRegion create_logical_region (Context ctx, IndexSpace index, FieldSpace fields, bool task_local=false, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
LogicalRegionT< DIM, COORD_T > create_logical_region (Context ctx, IndexSpaceT< DIM, COORD_T > index, FieldSpace fields, bool task_local=false, const char *provenance=NULL)
 
void create_shared_ownership (Context ctx, LogicalRegion handle)
 
void destroy_logical_region (Context ctx, LogicalRegion handle, const bool unordered=false, const char *provenance=NULL)
 
void destroy_logical_partition (Context ctx, LogicalPartition handle, const bool unordered=false)
 
void reset_equivalence_sets (Context ctx, LogicalRegion parent, LogicalRegion region, const std::set< FieldID > &fields)
 
FieldAllocator create_field_allocator (Context ctx, FieldSpace handle)
 
ArgumentMap create_argument_map (Context ctx)
 
Future execute_task (Context ctx, const TaskLauncher &launcher, std::vector< OutputRequirement > *outputs=NULL)
 
FutureMap execute_index_space (Context ctx, const IndexTaskLauncher &launcher, std::vector< OutputRequirement > *outputs=NULL)
 
Future execute_index_space (Context ctx, const IndexTaskLauncher &launcher, ReductionOpID redop, bool ordered=true, std::vector< OutputRequirement > *outputs=NULL)
 
Future reduce_future_map (Context ctx, const FutureMap &future_map, ReductionOpID redop, bool ordered=true, MapperID map_id=0, MappingTagID tag=0, const char *provenance=NULL, Future initial_value=Future())
 
FutureMap construct_future_map (Context ctx, IndexSpace domain, const std::map< DomainPoint, UntypedBuffer > &data, bool collective=false, ShardingID sid=0, bool implicit_sharding=false, const char *provenance=NULL)
 
FutureMap construct_future_map (Context ctx, const Domain &domain, const std::map< DomainPoint, UntypedBuffer > &data, bool collective=false, ShardingID sid=0, bool implicit_sharding=false)
 
FutureMap construct_future_map (Context ctx, IndexSpace domain, const std::map< DomainPoint, Future > &futures, bool collective=false, ShardingID sid=0, bool implicit_sharding=false, const char *provenance=NULL)
 
FutureMap construct_future_map (Context ctx, const Domain &domain, const std::map< DomainPoint, Future > &futures, bool collective=false, ShardingID sid=0, bool implicit_sharding=false)
 
FutureMap transform_future_map (Context ctx, const FutureMap &fm, IndexSpace new_domain, PointTransformFnptr fnptr, const char *provenance=NULL)
 
FutureMap transform_future_map (Context ctx, const FutureMap &fm, IndexSpace new_domain, PointTransformFunctor *functor, bool take_ownership=false, const char *provenance=NULL)
 
Future execute_task (Context ctx, TaskID task_id, const std::vector< IndexSpaceRequirement > &indexes, const std::vector< FieldSpaceRequirement > &fields, const std::vector< RegionRequirement > &regions, const UntypedBuffer &arg, const Predicate &predicate=Predicate::TRUE_PRED, MapperID id=0, MappingTagID tag=0)
 
FutureMap execute_index_space (Context ctx, TaskID task_id, const Domain domain, const std::vector< IndexSpaceRequirement > &indexes, const std::vector< FieldSpaceRequirement > &fields, const std::vector< RegionRequirement > &regions, const UntypedBuffer &global_arg, const ArgumentMap &arg_map, const Predicate &predicate=Predicate::TRUE_PRED, bool must_paralleism=false, MapperID id=0, MappingTagID tag=0)
 
Future execute_index_space (Context ctx, TaskID task_id, const Domain domain, const std::vector< IndexSpaceRequirement > &indexes, const std::vector< FieldSpaceRequirement > &fields, const std::vector< RegionRequirement > &regions, const UntypedBuffer &global_arg, const ArgumentMap &arg_map, ReductionOpID reduction, const UntypedBuffer &initial_value, const Predicate &predicate=Predicate::TRUE_PRED, bool must_parallelism=false, MapperID id=0, MappingTagID tag=0)
 
PhysicalRegion map_region (Context ctx, const InlineLauncher &launcher)
 
PhysicalRegion map_region (Context ctx, const RegionRequirement &req, MapperID id=0, MappingTagID tag=0, const char *provenance=NULL)
 
PhysicalRegion map_region (Context ctx, unsigned idx, MapperID id=0, MappingTagID tag=0, const char *provenance=NULL)
 
void remap_region (Context ctx, PhysicalRegion region, const char *provenance=NULL)
 
void unmap_region (Context ctx, PhysicalRegion region)
 
void unmap_all_regions (Context ctx)
 
OutputRegion get_output_region (Context ctx, unsigned index)
 
void get_output_regions (Context ctx, std::vector< OutputRegion > &regions)
 
template<typename T >
void fill_field (Context ctx, LogicalRegion handle, LogicalRegion parent, FieldID fid, const T &value, Predicate pred=Predicate::TRUE_PRED)
 
void fill_field (Context ctx, LogicalRegion handle, LogicalRegion parent, FieldID fid, const void *value, size_t value_size, Predicate pred=Predicate::TRUE_PRED)
 
void fill_field (Context ctx, LogicalRegion handle, LogicalRegion parent, FieldID fid, Future f, Predicate pred=Predicate::TRUE_PRED)
 
template<typename T >
void fill_fields (Context ctx, LogicalRegion handle, LogicalRegion parent, const std::set< FieldID > &fields, const T &value, Predicate pred=Predicate::TRUE_PRED)
 
void fill_fields (Context ctx, LogicalRegion handle, LogicalRegion parent, const std::set< FieldID > &fields, const void *value, size_t value_size, Predicate pred=Predicate::TRUE_PRED)
 
void fill_fields (Context ctx, LogicalRegion handle, LogicalRegion parent, const std::set< FieldID > &fields, Future f, Predicate pred=Predicate::TRUE_PRED)
 
void fill_fields (Context ctx, const FillLauncher &launcher)
 
void fill_fields (Context ctx, const IndexFillLauncher &launcher)
 
void discard_fields (Context ctx, const DiscardLauncher &launcher)
 
PhysicalRegion attach_external_resource (Context ctx, const AttachLauncher &launcher)
 
Future detach_external_resource (Context ctx, PhysicalRegion region, const bool flush=true, const bool unordered=false, const char *provenance=NULL)
 
ExternalResources attach_external_resources (Context ctx, const IndexAttachLauncher &launcher)
 
Future detach_external_resources (Context ctx, ExternalResources external, const bool flush=true, const bool unordered=false, const char *provenance=NULL)
 
void progress_unordered_operations (Context ctx)
 
PhysicalRegion attach_hdf5 (Context ctx, const char *file_name, LogicalRegion handle, LogicalRegion parent, const std::map< FieldID, const char * > &field_map, LegionFileMode mode)
 
void detach_hdf5 (Context ctx, PhysicalRegion region)
 
PhysicalRegion attach_file (Context ctx, const char *file_name, LogicalRegion handle, LogicalRegion parent, const std::vector< FieldID > &field_vec, LegionFileMode mode)
 
void detach_file (Context ctx, PhysicalRegion region)
 
void issue_copy_operation (Context ctx, const CopyLauncher &launcher)
 
void issue_copy_operation (Context ctx, const IndexCopyLauncher &launcher)
 
Predicate create_predicate (Context ctx, const Future &f, const char *provenance=NULL)
 
Predicate predicate_not (Context ctx, const Predicate &p, const char *provenance=NULL)
 
Predicate predicate_and (Context ctx, const Predicate &p1, const Predicate &p2, const char *provenance=NULL)
 
Predicate predicate_or (Context ctx, const Predicate &p1, const Predicate &p2, const char *provenance=NULL)
 
Predicate create_predicate (Context ctx, const PredicateLauncher &launcher)
 
Future get_predicate_future (Context ctx, const Predicate &p, const char *provenance=NULL)
 
Lock create_lock (Context ctx)
 
void destroy_lock (Context ctx, Lock l)
 
Grant acquire_grant (Context ctx, const std::vector< LockRequest > &requests)
 
void release_grant (Context ctx, Grant grant)
 
PhaseBarrier create_phase_barrier (Context ctx, unsigned arrivals)
 
void destroy_phase_barrier (Context ctx, PhaseBarrier pb)
 
PhaseBarrier advance_phase_barrier (Context ctx, PhaseBarrier pb)
 
DynamicCollective create_dynamic_collective (Context ctx, unsigned arrivals, ReductionOpID redop, const void *init_value, size_t init_size)
 
void destroy_dynamic_collective (Context ctx, DynamicCollective dc)
 
void arrive_dynamic_collective (Context ctx, DynamicCollective dc, const void *buffer, size_t size, unsigned count=1)
 
void defer_dynamic_collective_arrival (Context ctx, DynamicCollective dc, const Future &f, unsigned count=1)
 
Future get_dynamic_collective_result (Context ctx, DynamicCollective dc, const char *provenance=NULL)
 
DynamicCollective advance_dynamic_collective (Context ctx, DynamicCollective dc)
 
void issue_acquire (Context ctx, const AcquireLauncher &launcher)
 
void issue_release (Context ctx, const ReleaseLauncher &launcher)
 
Future issue_mapping_fence (Context ctx, const char *provenance=NULL)
 
Future issue_execution_fence (Context ctx, const char *provenance=NULL)
 
void begin_trace (Context ctx, TraceID tid, bool logical_only=false, bool static_trace=false, const std::set< RegionTreeID > *managed=NULL, const char *provenance=NULL)
 
void end_trace (Context ctx, TraceID tid, const char *provenance=NULL)
 
void begin_static_trace (Context ctx, const std::set< RegionTreeID > *managed=NULL)
 
void end_static_trace (Context ctx)
 
TraceID generate_dynamic_trace_id (void)
 
TraceID generate_library_trace_ids (const char *name, size_t count)
 
void complete_frame (Context ctx, const char *provenance=NULL)
 
FutureMap execute_must_epoch (Context ctx, const MustEpochLauncher &launcher)
 
Future select_tunable_value (Context ctx, TunableID tid, MapperID mapper=0, MappingTagID tag=0, const void *args=NULL, size_t argsize=0)
 
Future select_tunable_value (Context ctx, const TunableLauncher &launcher)
 
int get_tunable_value (Context ctx, TunableID tid, MapperID mapper=0, MappingTagID tag=0)
 
const Taskget_local_task (Context ctx)
 
void * get_local_task_variable_untyped (Context ctx, LocalVariableID id)
 
template<typename T >
T * get_local_task_variable (Context ctx, LocalVariableID id)
 
void set_local_task_variable_untyped (Context ctx, LocalVariableID id, const void *value, void(*destructor)(void *)=NULL)
 
template<typename T >
void set_local_task_variable (Context ctx, LocalVariableID id, const T *value, void(*destructor)(void *)=NULL)
 
Future get_current_time (Context ctx, Future precondition=Future())
 
Future get_current_time_in_microseconds (Context ctx, Future precondition=Future())
 
Future get_current_time_in_nanoseconds (Context ctx, Future precondition=Future())
 
Future issue_timing_measurement (Context ctx, const TimingLauncher &launcher)
 
Mapping::Mapper * get_mapper (Context ctx, MapperID id, Processor target=Processor::NO_PROC)
 
Mapping::MapperContext begin_mapper_call (Context ctx, MapperID id, Processor target=Processor::NO_PROC)
 
void end_mapper_call (Mapping::MapperContext ctx)
 
Processor get_executing_processor (Context ctx)
 
const Taskget_current_task (Context ctx)
 
size_t query_available_memory (Context ctx, Memory target)
 
void raise_region_exception (Context ctx, PhysicalRegion region, bool nuclear)
 
void yield (Context ctx)
 
void concurrent_task_barrier (Context ctx)
 
bool is_MPI_interop_configured (void)
 
const std::map< int, AddressSpace > & find_forward_MPI_mapping (void)
 
const std::map< AddressSpace, int > & find_reverse_MPI_mapping (void)
 
int find_local_MPI_rank (void)
 
void attach_semantic_information (TaskID task_id, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false, bool local_only=false)
 
void attach_semantic_information (IndexSpace handle, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false)
 
void attach_semantic_information (IndexPartition handle, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false)
 
void attach_semantic_information (FieldSpace handle, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false)
 
void attach_semantic_information (FieldSpace handle, FieldID fid, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false)
 
void attach_semantic_information (LogicalRegion handle, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false)
 
void attach_semantic_information (LogicalPartition handle, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false)
 
void attach_name (TaskID task_id, const char *name, bool is_mutable=false, bool local_only=false)
 
void attach_name (IndexSpace handle, const char *name, bool is_mutable=false)
 
void attach_name (IndexPartition handle, const char *name, bool is_mutable=false)
 
void attach_name (FieldSpace handle, const char *name, bool is_mutable=false)
 
void attach_name (FieldSpace handle, FieldID fid, const char *name, bool is_mutable=false)
 
void attach_name (LogicalRegion handle, const char *name, bool is_mutable=false)
 
void attach_name (LogicalPartition handle, const char *name, bool is_mutable=false)
 
bool retrieve_semantic_information (TaskID task_id, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
bool retrieve_semantic_information (IndexSpace handle, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
bool retrieve_semantic_information (IndexPartition handle, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
bool retrieve_semantic_information (FieldSpace handle, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
bool retrieve_semantic_information (FieldSpace handle, FieldID fid, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
bool retrieve_semantic_information (LogicalRegion handle, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
bool retrieve_semantic_information (LogicalPartition handle, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
 
void retrieve_name (TaskID task_id, const char *&result)
 
void retrieve_name (IndexSpace handle, const char *&result)
 
void retrieve_name (IndexPartition handle, const char *&result)
 
void retrieve_name (FieldSpace handle, const char *&result)
 
void retrieve_name (FieldSpace handle, FieldID fid, const char *&result)
 
void retrieve_name (LogicalRegion handle, const char *&result)
 
void retrieve_name (LogicalPartition handle, const char *&result)
 
void print_once (Context ctx, FILE *f, const char *message)
 
void log_once (Context ctx, Realm::LoggerMessage &message)
 
Mapping::MapperRuntime * get_mapper_runtime (void)
 
MapperID generate_dynamic_mapper_id (void)
 
MapperID generate_library_mapper_ids (const char *name, size_t count)
 
void add_mapper (MapperID map_id, Mapping::Mapper *mapper, Processor proc=Processor::NO_PROC)
 
void replace_default_mapper (Mapping::Mapper *mapper, Processor proc=Processor::NO_PROC)
 
ProjectionID generate_dynamic_projection_id (void)
 
ProjectionID generate_library_projection_ids (const char *name, size_t count)
 
void register_projection_functor (ProjectionID pid, ProjectionFunctor *functor, bool silence_warnings=false, const char *warning_string=NULL)
 
ShardingID generate_dynamic_sharding_id (void)
 
ShardingID generate_library_sharding_ids (const char *name, size_t count)
 
void register_sharding_functor (ShardingID sid, ShardingFunctor *functor, bool silence_warnings=false, const char *warning_string=NULL)
 
ReductionOpID generate_dynamic_reduction_id (void)
 
ReductionOpID generate_library_reduction_ids (const char *name, size_t count)
 
CustomSerdezID generate_dynamic_serdez_id (void)
 
CustomSerdezID generate_library_serdez_ids (const char *name, size_t count)
 
Future launch_top_level_task (const TaskLauncher &launcher)
 
Context begin_implicit_task (TaskID top_task_id, MapperID mapper_id, Processor::Kind proc_kind, const char *task_name=NULL, bool control_replicable=false, unsigned shard_per_address_space=1, int shard_id=-1, DomainPoint shard_point=DomainPoint())
 
void unbind_implicit_task_from_external_thread (Context ctx)
 
void bind_implicit_task_to_external_thread (Context ctx)
 
void finish_implicit_task (Context ctx, Realm::Event effects=Realm::Event::NO_EVENT)
 
LayoutConstraintID register_layout (const LayoutConstraintRegistrar &registrar)
 
void release_layout (LayoutConstraintID layout_id)
 
FieldSpace get_layout_constraint_field_space (LayoutConstraintID layout_id)
 
void get_layout_constraints (LayoutConstraintID layout_id, LayoutConstraintSet &layout_constraints)
 
const char * get_layout_constraints_name (LayoutConstraintID layout_id)
 
TaskID generate_dynamic_task_id (void)
 
TaskID generate_library_task_ids (const char *name, size_t count)
 
template<typename T , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
VariantID register_task_variant (const TaskVariantRegistrar &registrar, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
template<typename T , typename UDT , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
VariantID register_task_variant (const TaskVariantRegistrar &registrar, const UDT &user_data, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
template<void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
VariantID register_task_variant (const TaskVariantRegistrar &registrar, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
template<typename UDT , void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
VariantID register_task_variant (const TaskVariantRegistrar &registrar, const UDT &user_data, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
VariantID register_task_variant (const TaskVariantRegistrar &registrar, const CodeDescriptor &codedesc, const void *user_data=NULL, size_t user_len=0, size_t return_type_size=LEGION_MAX_RETURN_SIZE, VariantID vid=LEGION_AUTO_GENERATE_ID, bool has_return_type_size=true)
 
ShardID get_shard_id (Context ctx, bool I_know_what_I_am_doing=false)
 
size_t get_num_shards (Context ctx, bool I_know_what_I_am_doing=false)
 
Future consensus_match (Context ctx, const void *input, void *output, size_t num_elements, size_t element_size, const char *provenance=NULL)
 
IndexSpace create_index_space (Context ctx, const Domain &bounds, TypeTag type_tag=0, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space (Context ctx, const Rect< DIM, COORD_T > &bounds, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space (Context ctx, const DomainT< DIM, COORD_T > &bounds, const char *provenance=NULL)
 
IndexSpace create_index_space (Context ctx, size_t dimensions, const Future &f, TypeTag type_tag=0, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space (Context ctx, const Future &f, const char *provenance=NULL)
 
IndexSpace create_index_space (Context ctx, const std::vector< DomainPoint > &points, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space (Context ctx, const std::vector< Point< DIM, COORD_T > > &points, const char *provenance=NULL)
 
IndexSpace create_index_space (Context ctx, const std::vector< Domain > &rects, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space (Context ctx, const std::vector< Rect< DIM, COORD_T > > &rects, const char *provenance=NULL)
 
IndexSpace union_index_spaces (Context ctx, const std::vector< IndexSpace > &spaces, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > union_index_spaces (Context ctx, const std::vector< IndexSpaceT< DIM, COORD_T > > &spaces, const char *provenance=NULL)
 
IndexSpace intersect_index_spaces (Context ctx, const std::vector< IndexSpace > &spaces, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > intersect_index_spaces (Context ctx, const std::vector< IndexSpaceT< DIM, COORD_T > > &spaces, const char *provenance=NULL)
 
IndexSpace subtract_index_spaces (Context ctx, IndexSpace left, IndexSpace right, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > subtract_index_spaces (Context ctx, IndexSpaceT< DIM, COORD_T > left, IndexSpaceT< DIM, COORD_T > right, const char *provenance=NULL)
 
IndexPartition create_equal_partition (Context ctx, IndexSpace parent, IndexSpace color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_equal_partition (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_weights (Context ctx, IndexSpace parent, const std::map< DomainPoint, int > &weights, IndexSpace color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_weights (Context ctx, IndexSpaceT< DIM, COORD_T > parent, const std::map< Point< COLOR_DIM, COLOR_COORD_T >, int > &weights, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_weights (Context ctx, IndexSpace parent, const std::map< DomainPoint, size_t > &weights, IndexSpace color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_weights (Context ctx, IndexSpaceT< DIM, COORD_T > parent, const std::map< Point< COLOR_DIM, COLOR_COORD_T >, size_t > &weights, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_weights (Context ctx, IndexSpace parent, const FutureMap &weights, IndexSpace color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_weights (Context ctx, IndexSpaceT< DIM, COORD_T > parent, const FutureMap &weights, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_union (Context ctx, IndexSpace parent, IndexPartition handle1, IndexPartition handle2, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_union (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexPartitionT< DIM, COORD_T > handle1, IndexPartitionT< DIM, COORD_T > handle2, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_intersection (Context ctx, IndexSpace parent, IndexPartition handle1, IndexPartition handle2, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_intersection (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexPartitionT< DIM, COORD_T > handle1, IndexPartitionT< DIM, COORD_T > handle2, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_intersection (Context ctx, IndexSpace parent, IndexPartition partition, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, bool dominates=false, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_intersection (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexPartitionT< DIM, COORD_T > partition, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, bool dominates=false, const char *provenance=NULL)
 
IndexPartition create_partition_by_difference (Context ctx, IndexSpace parent, IndexPartition handle1, IndexPartition handle2, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_difference (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexPartitionT< DIM, COORD_T > handle1, IndexPartitionT< DIM, COORD_T > handle2, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
Color create_cross_product_partitions (Context ctx, IndexPartition handle1, IndexPartition handle2, std::map< IndexSpace, IndexPartition > &handles, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
Color create_cross_product_partitions (Context ctx, IndexPartitionT< DIM, COORD_T > handle1, IndexPartitionT< DIM, COORD_T > handle2, typename std::map< IndexSpaceT< DIM, COORD_T >, IndexPartitionT< DIM, COORD_T > > &handles, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
void create_association (Context ctx, LogicalRegion domain, LogicalRegion domain_parent, FieldID domain_fid, IndexSpace range, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
void create_bidirectional_association (Context ctx, LogicalRegion domain, LogicalRegion domain_parent, FieldID domain_fid, LogicalRegion range, LogicalRegion range_parent, FieldID range_fid, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM1, typename COORD_T1 , int DIM2, typename COORD_T2 >
void create_association (Context ctx, LogicalRegionT< DIM1, COORD_T1 > domain, LogicalRegionT< DIM1, COORD_T1 > domain_parent, FieldID domain_fid, IndexSpaceT< DIM2, COORD_T2 > range, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM1, typename COORD_T1 , int DIM2, typename COORD_T2 >
void create_bidirectional_association (Context ctx, LogicalRegionT< DIM1, COORD_T1 > domain, LogicalRegionT< DIM1, COORD_T1 > domain_parent, FieldID domain_fid, LogicalRegionT< DIM2, COORD_T2 > range, LogicalRegionT< DIM2, COORD_T2 > range_parent, FieldID range_fid, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
IndexPartition create_partition_by_restriction (Context ctx, IndexSpace parent, IndexSpace color_space, DomainTransform transform, Domain extent, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, int COLOR_DIM, typename COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_restriction (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexSpaceT< COLOR_DIM, COORD_T > color_space, Transform< DIM, COLOR_DIM, COORD_T > transform, Rect< DIM, COORD_T > extent, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_blockify (Context ctx, IndexSpace parent, DomainPoint blocking_factor, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_blockify (Context ctx, IndexSpaceT< DIM, COORD_T > parent, Point< DIM, COORD_T > blocking_factor, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_blockify (Context ctx, IndexSpace parent, DomainPoint blockify_factor, DomainPoint origin, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_blockify (Context ctx, IndexSpaceT< DIM, COORD_T > parent, Point< DIM, COORD_T > blocking_factor, Point< DIM, COORD_T > origin, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_domain (Context ctx, IndexSpace parent, const std::map< DomainPoint, Domain > &domains, IndexSpace color_space, bool perform_intersections=true, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_domain (Context ctx, IndexSpaceT< DIM, COORD_T > parent, const std::map< Point< COLOR_DIM, COLOR_COORD_T >, DomainT< DIM, COORD_T > > &domains, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, bool perform_intersections=true, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexPartition create_partition_by_domain (Context ctx, IndexSpace parent, const FutureMap &domain_future_map, IndexSpace color_space, bool perform_intersections=true, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_domain (Context ctx, IndexSpaceT< DIM, COORD_T > parent, const FutureMap &domain_future_map, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, bool perform_intersections=true, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_rectangles (Context ctx, IndexSpaceT< DIM, COORD_T > parent, const std::map< Point< COLOR_DIM, COLOR_COORD_T >, std::vector< Rect< DIM, COORD_T > > > &rectangles, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, bool perform_intersections=true, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL, bool collective=false)
 
IndexPartition create_partition_by_field (Context ctx, LogicalRegion handle, LogicalRegion parent, FieldID fid, IndexSpace color_space, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, PartitionKind part_kind=LEGION_DISJOINT_KIND, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_partition_by_field (Context ctx, LogicalRegionT< DIM, COORD_T > handle, LogicalRegionT< DIM, COORD_T > parent, FieldID fid, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, PartitionKind part_kind=LEGION_DISJOINT_KIND, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
IndexPartition create_partition_by_image (Context ctx, IndexSpace handle, LogicalPartition projection, LogicalRegion parent, FieldID fid, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM1, typename COORD_T1 , int DIM2, typename COORD_T2 , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM2, COORD_T2 > create_partition_by_image (Context ctx, IndexSpaceT< DIM2, COORD_T2 > handle, LogicalPartitionT< DIM1, COORD_T1 > projection, LogicalRegionT< DIM1, COORD_T1 > parent, FieldID fid, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
IndexPartition create_partition_by_image_range (Context ctx, IndexSpace handle, LogicalPartition projection, LogicalRegion parent, FieldID fid, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM1, typename COORD_T1 , int DIM2, typename COORD_T2 , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM2, COORD_T2 > create_partition_by_image_range (Context ctx, IndexSpaceT< DIM2, COORD_T2 > handle, LogicalPartitionT< DIM1, COORD_T1 > projection, LogicalRegionT< DIM1, COORD_T1 > parent, FieldID fid, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
IndexPartition create_partition_by_preimage (Context ctx, IndexPartition projection, LogicalRegion handle, LogicalRegion parent, FieldID fid, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM1, typename COORD_T1 , int DIM2, typename COORD_T2 , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM1, COORD_T1 > create_partition_by_preimage (Context ctx, IndexPartitionT< DIM2, COORD_T2 > projection, LogicalRegionT< DIM1, COORD_T1 > handle, LogicalRegionT< DIM1, COORD_T1 > parent, FieldID fid, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
IndexPartition create_partition_by_preimage_range (Context ctx, IndexPartition projection, LogicalRegion handle, LogicalRegion parent, FieldID fid, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
template<int DIM1, typename COORD_T1 , int DIM2, typename COORD_T2 , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM1, COORD_T1 > create_partition_by_preimage_range (Context ctx, IndexPartitionT< DIM2, COORD_T2 > projection, LogicalRegionT< DIM1, COORD_T1 > handle, LogicalRegionT< DIM1, COORD_T1 > parent, FieldID fid, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
 
IndexPartition create_pending_partition (Context ctx, IndexSpace parent, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT< DIM, COORD_T > create_pending_partition (Context ctx, IndexSpaceT< DIM, COORD_T > parent, IndexSpaceT< COLOR_DIM, COLOR_COORD_T > color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
 
IndexSpace create_index_space_union (Context ctx, IndexPartition parent, const DomainPoint &color, const std::vector< IndexSpace > &handles, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space_union (Context ctx, IndexPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color, const typename std::vector< IndexSpaceT< DIM, COORD_T > > &handles, const char *provenance=NULL)
 
IndexSpace create_index_space_union (Context ctx, IndexPartition parent, const DomainPoint &color, IndexPartition handle, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space_union (Context ctx, IndexPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color, IndexPartitionT< DIM, COORD_T > handle, const char *provenance=NULL)
 
IndexSpace create_index_space_intersection (Context ctx, IndexPartition parent, const DomainPoint &color, const std::vector< IndexSpace > &handles, const char *provenance=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space_intersection (Context ctx, IndexPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color, const typename std::vector< IndexSpaceT< DIM, COORD_T > > &handles, const char *provenance=NULL)
 
IndexSpace create_index_space_intersection (Context ctx, IndexPartition parent, const DomainPoint &color, IndexPartition handle, const char *provenannce=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space_intersection (Context ctx, IndexPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color, IndexPartitionT< DIM, COORD_T > handle, const char *provenance=NULL)
 
IndexSpace create_index_space_difference (Context ctx, IndexPartition parent, const DomainPoint &color, IndexSpace initial, const std::vector< IndexSpace > &handles, const char *provenancne=NULL)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< DIM, COORD_T > create_index_space_difference (Context ctx, IndexPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color, IndexSpaceT< DIM, COORD_T > initial, const typename std::vector< IndexSpaceT< DIM, COORD_T > > &handles, const char *provenance=NULL)
 
IndexPartition get_index_partition (Context ctx, IndexSpace parent, Color color)
 
IndexPartition get_index_partition (Context ctx, IndexSpace parent, const DomainPoint &color)
 
IndexPartition get_index_partition (IndexSpace parent, Color color)
 
IndexPartition get_index_partition (IndexSpace parent, const DomainPoint &color)
 
template<int DIM, typename COORD_T >
IndexPartitionT< DIM, COORD_T > get_index_partition (IndexSpaceT< DIM, COORD_T > parent, Color color)
 
bool has_index_partition (Context ctx, IndexSpace parent, Color color)
 
bool has_index_partition (Context ctx, IndexSpace parent, const DomainPoint &color)
 
bool has_index_partition (IndexSpace parent, Color color)
 
bool has_index_partition (IndexSpace parent, const DomainPoint &color)
 
template<int DIM, typename COORD_T >
bool has_index_partition (IndexSpaceT< DIM, COORD_T > parent, Color color)
 
IndexSpace get_index_subspace (Context ctx, IndexPartition p, Color color)
 
IndexSpace get_index_subspace (Context ctx, IndexPartition p, const DomainPoint &color)
 
IndexSpace get_index_subspace (IndexPartition p, Color color)
 
IndexSpace get_index_subspace (IndexPartition p, const DomainPoint &color)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< DIM, COORD_T > get_index_subspace (IndexPartitionT< DIM, COORD_T > p, Point< COLOR_DIM, COLOR_COORD_T > color)
 
bool has_index_subspace (Context ctx, IndexPartition p, const DomainPoint &color)
 
bool has_index_subspace (IndexPartition p, const DomainPoint &color)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
bool has_index_subspace (IndexPartitionT< DIM, COORD_T > p, Point< COLOR_DIM, COLOR_COORD_T > color)
 
bool has_multiple_domains (Context ctx, IndexSpace handle)
 
bool has_multiple_domains (IndexSpace handle)
 
Domain get_index_space_domain (Context ctx, IndexSpace handle)
 
Domain get_index_space_domain (IndexSpace handle)
 
template<int DIM, typename COORD_T >
DomainT< DIM, COORD_T > get_index_space_domain (IndexSpaceT< DIM, COORD_T > handle)
 
void get_index_space_domains (Context ctx, IndexSpace handle, std::vector< Domain > &domains)
 
void get_index_space_domains (IndexSpace handle, std::vector< Domain > &domains)
 
Domain get_index_partition_color_space (Context ctx, IndexPartition p)
 
Domain get_index_partition_color_space (IndexPartition p)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
DomainT< COLOR_DIM, COLOR_COORD_T > get_index_partition_color_space (IndexPartitionT< DIM, COORD_T > p)
 
IndexSpace get_index_partition_color_space_name (Context ctx, IndexPartition p)
 
IndexSpace get_index_partition_color_space_name (IndexPartition p)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexSpaceT< COLOR_DIM, COLOR_COORD_T > get_index_partition_color_space_name (IndexPartitionT< DIM, COORD_T > p)
 
void get_index_space_partition_colors (Context ctx, IndexSpace sp, std::set< Color > &colors)
 
void get_index_space_partition_colors (Context ctx, IndexSpace sp, std::set< DomainPoint > &colors)
 
void get_index_space_partition_colors (IndexSpace sp, std::set< Color > &colors)
 
void get_index_space_partition_colors (IndexSpace sp, std::set< DomainPoint > &colors)
 
bool is_index_partition_disjoint (Context ctx, IndexPartition p)
 
bool is_index_partition_disjoint (IndexPartition p)
 
bool is_index_partition_complete (Context ctx, IndexPartition p)
 
bool is_index_partition_complete (IndexPartition p)
 
Color get_index_space_color (Context ctx, IndexSpace handle)
 
DomainPoint get_index_space_color_point (Context ctx, IndexSpace handle)
 
Color get_index_space_color (IndexSpace handle)
 
DomainPoint get_index_space_color_point (IndexSpace handle)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
Point< COLOR_DIM, COLOR_COORD_T > get_index_space_color (IndexSpaceT< DIM, COORD_T > handle)
 
Color get_index_partition_color (Context ctx, IndexPartition handle)
 
DomainPoint get_index_partition_color_point (Context ctx, IndexPartition handle)
 
Color get_index_partition_color (IndexPartition handle)
 
DomainPoint get_index_partition_color_point (IndexPartition handle)
 
IndexSpace get_parent_index_space (Context ctx, IndexPartition handle)
 
IndexSpace get_parent_index_space (IndexPartition handle)
 
template<int DIM, typename COORD_T >
IndexSpaceT< DIM, COORD_T > get_parent_index_space (IndexPartitionT< DIM, COORD_T > handle)
 
bool has_parent_index_partition (Context ctx, IndexSpace handle)
 
bool has_parent_index_partition (IndexSpace handle)
 
IndexPartition get_parent_index_partition (Context ctx, IndexSpace handle)
 
IndexPartition get_parent_index_partition (IndexSpace handle)
 
template<int DIM, typename COORD_T >
IndexPartitionT< DIM, COORD_T > get_parent_index_partition (IndexSpaceT< DIM, COORD_T > handle)
 
unsigned get_index_space_depth (Context ctx, IndexSpace handle)
 
unsigned get_index_space_depth (IndexSpace handle)
 
unsigned get_index_partition_depth (Context ctx, IndexPartition handle)
 
unsigned get_index_partition_depth (IndexPartition handle)
 
size_t get_field_size (Context ctx, FieldSpace handle, FieldID fid)
 
size_t get_field_size (FieldSpace handle, FieldID fid)
 
void get_field_space_fields (Context ctx, FieldSpace handle, std::vector< FieldID > &fields)
 
void get_field_space_fields (FieldSpace handle, std::vector< FieldID > &fields)
 
void get_field_space_fields (Context ctx, FieldSpace handle, std::set< FieldID > &fields)
 
void get_field_space_fields (FieldSpace handle, std::set< FieldID > &fields)
 
LogicalPartition get_logical_partition (Context ctx, LogicalRegion parent, IndexPartition handle)
 
LogicalPartition get_logical_partition (LogicalRegion parent, IndexPartition handle)
 
template<int DIM, typename COORD_T >
LogicalPartitionT< DIM, COORD_T > get_logical_partition (LogicalRegionT< DIM, COORD_T > parent, IndexPartitionT< DIM, COORD_T > handle)
 
LogicalPartition get_logical_partition_by_color (Context ctx, LogicalRegion parent, Color c)
 
LogicalPartition get_logical_partition_by_color (Context ctx, LogicalRegion parent, const DomainPoint &c)
 
LogicalPartition get_logical_partition_by_color (LogicalRegion parent, Color c)
 
LogicalPartition get_logical_partition_by_color (LogicalRegion parent, const DomainPoint &c)
 
template<int DIM, typename COORD_T >
LogicalPartitionT< DIM, COORD_T > get_logical_partition_by_color (LogicalRegionT< DIM, COORD_T > parent, Color c)
 
bool has_logical_partition_by_color (Context ctx, LogicalRegion parent, const DomainPoint &c)
 
bool has_logical_partition_by_color (LogicalRegion parent, const DomainPoint &c)
 
LogicalPartition get_logical_partition_by_tree (Context ctx, IndexPartition handle, FieldSpace fspace, RegionTreeID tid)
 
LogicalPartition get_logical_partition_by_tree (IndexPartition handle, FieldSpace fspace, RegionTreeID tid)
 
template<int DIM, typename COORD_T >
LogicalPartitionT< DIM, COORD_T > get_logical_partition_by_tree (IndexPartitionT< DIM, COORD_T > handle, FieldSpace fspace, RegionTreeID tid)
 
LogicalRegion get_logical_subregion (Context ctx, LogicalPartition parent, IndexSpace handle)
 
LogicalRegion get_logical_subregion (LogicalPartition parent, IndexSpace handle)
 
template<int DIM, typename COORD_T >
LogicalRegionT< DIM, COORD_T > get_logical_subregion (LogicalPartitionT< DIM, COORD_T > parent, IndexSpaceT< DIM, COORD_T > handle)
 
LogicalRegion get_logical_subregion_by_color (Context ctx, LogicalPartition parent, Color c)
 
LogicalRegion get_logical_subregion_by_color (Context ctx, LogicalPartition parent, const DomainPoint &c)
 
LogicalRegion get_logical_subregion_by_color (LogicalPartition parent, Color c)
 
LogicalRegion get_logical_subregion_by_color (LogicalPartition parent, const DomainPoint &c)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
LogicalRegionT< DIM, COORD_T > get_logical_subregion_by_color (LogicalPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color)
 
bool has_logical_subregion_by_color (Context ctx, LogicalPartition parent, const DomainPoint &c)
 
bool has_logical_subregion_by_color (LogicalPartition parent, const DomainPoint &c)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
bool has_logical_subregion_by_color (LogicalPartitionT< DIM, COORD_T > parent, Point< COLOR_DIM, COLOR_COORD_T > color)
 
LogicalRegion get_logical_subregion_by_tree (Context ctx, IndexSpace handle, FieldSpace fspace, RegionTreeID tid)
 
LogicalRegion get_logical_subregion_by_tree (IndexSpace handle, FieldSpace fspace, RegionTreeID tid)
 
template<int DIM, typename COORD_T >
LogicalRegionT< DIM, COORD_T > get_logical_subregion_by_tree (IndexSpaceT< DIM, COORD_T > handle, FieldSpace space, RegionTreeID tid)
 
Color get_logical_region_color (Context ctx, LogicalRegion handle)
 
DomainPoint get_logical_region_color_point (Context ctx, LogicalRegion handle)
 
Color get_logical_region_color (LogicalRegion handle)
 
DomainPoint get_logical_region_color_point (LogicalRegion handle)
 
template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
Point< COLOR_DIM, COLOR_COORD_T > get_logical_region_color_point (LogicalRegionT< DIM, COORD_T > handle)
 
Color get_logical_partition_color (Context ctx, LogicalPartition handle)
 
DomainPoint get_logical_partition_color_point (Context ctx, LogicalPartition handle)
 
Color get_logical_partition_color (LogicalPartition handle)
 
DomainPoint get_logical_partition_color_point (LogicalPartition handle)
 
LogicalRegion get_parent_logical_region (Context ctx, LogicalPartition handle)
 
LogicalRegion get_parent_logical_region (LogicalPartition handle)
 
template<int DIM, typename COORD_T >
LogicalRegionT< DIM, COORD_T > get_parent_logical_region (LogicalPartitionT< DIM, COORD_T > handle)
 
bool has_parent_logical_partition (Context ctx, LogicalRegion handle)
 
bool has_parent_logical_partition (LogicalRegion handle)
 
LogicalPartition get_parent_logical_partition (Context ctx, LogicalRegion handle)
 
LogicalPartition get_parent_logical_partition (LogicalRegion handle)
 
template<int DIM, typename COORD_T >
LogicalPartitionT< DIM, COORD_T > get_parent_logical_partition (LogicalRegionT< DIM, COORD_T > handle)
 

Static Public Member Functions

static TraceID generate_static_trace_id (void)
 
static long long get_zero_time (void)
 
static MapperID generate_static_mapper_id (void)
 
static ProjectionID generate_static_projection_id (void)
 
static void preregister_projection_functor (ProjectionID pid, ProjectionFunctor *functor)
 
static ProjectionFunctorget_projection_functor (ProjectionID pid)
 
static ShardingID generate_static_sharding_id (void)
 
static void preregister_sharding_functor (ShardingID sid, ShardingFunctor *functor)
 
static ShardingFunctorget_sharding_functor (ShardingID sid)
 
static ReductionOpID generate_static_reduction_id (void)
 
template<typename REDOP >
static void register_reduction_op (ReductionOpID redop_id, bool permit_duplicates=false)
 
static void register_reduction_op (ReductionOpID redop_id, ReductionOp *op, SerdezInitFnptr init_fnptr=NULL, SerdezFoldFnptr fold_fnptr=NULL, bool permit_duplicates=false)
 
static const ReductionOp * get_reduction_op (ReductionOpID redop_id)
 
static CustomSerdezID generate_static_serdez_id (void)
 
template<typename SERDEZ >
static void register_custom_serdez_op (CustomSerdezID serdez_id, bool permit_duplicates=false)
 
static void register_custom_serdez_op (CustomSerdezID serdez_id, SerdezOp *serdez_op, bool permit_duplicates=false)
 
static const SerdezOp * get_serdez_op (CustomSerdezID serdez_id)
 
static const char * get_legion_version (void)
 
static int start (int argc, char **argv, bool background=false, bool supply_default_mapper=true, bool filter=false)
 
static void initialize (int *argc, char ***argv, bool filter=false, bool parse=true)
 
static int wait_for_shutdown (void)
 
static void set_return_code (int return_code)
 
static void set_top_level_task_id (TaskID top_id)
 
static void set_top_level_task_mapper_id (MapperID mapper_id)
 
static size_t get_maximum_dimension (void)
 
static void configure_MPI_interoperability (int rank)
 
static LegionHandshake create_external_handshake (bool init_in_ext=true, int ext_participants=1, int legion_participants=1)
 
static MPILegionHandshake create_handshake (bool init_in_MPI=true, int mpi_participants=1, int legion_participants=1)
 
template<LogicalRegion(*)(LogicalRegion, const DomainPoint &, Runtime *) PROJ_PTR>
static ProjectionID register_region_function (ProjectionID handle)
 
template<LogicalRegion(*)(LogicalPartition, const DomainPoint &, Runtime *) PROJ_PTR>
static ProjectionID register_partition_function (ProjectionID handle)
 
static void add_registration_callback (RegistrationCallbackFnptr callback, bool dedup=true, size_t dedup_tag=0)
 
static void add_registration_callback (RegistrationWithArgsCallbackFnptr callback, const UntypedBuffer &buffer, bool dedup=true, size_t dedup_tag=0)
 
static void perform_registration_callback (RegistrationCallbackFnptr callback, bool global, bool deduplicate=true, size_t dedup_tag=0)
 
static void perform_registration_callback (RegistrationWithArgsCallbackFnptr callback, const UntypedBuffer &buffer, bool global, bool deduplicate=true, size_t dedup_tag=0)
 
static void set_registration_callback (RegistrationCallbackFnptr callback)
 
static const InputArgsget_input_args (void)
 
static void enable_profiling (void)
 
static void disable_profiling (void)
 
static void dump_profiling (void)
 
static LayoutConstraintID preregister_layout (const LayoutConstraintRegistrar &registrar, LayoutConstraintID layout_id=LEGION_AUTO_GENERATE_ID)
 
static TaskID generate_static_task_id (void)
 
template<typename T , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static VariantID preregister_task_variant (const TaskVariantRegistrar &registrar, const char *task_name=NULL, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
template<typename T , typename UDT , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static VariantID preregister_task_variant (const TaskVariantRegistrar &registrar, const UDT &user_data, const char *task_name=NULL, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
template<void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static VariantID preregister_task_variant (const TaskVariantRegistrar &registrar, const char *task_name=NULL, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
template<typename UDT , void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static VariantID preregister_task_variant (const TaskVariantRegistrar &registrar, const UDT &user_data, const char *task_name=NULL, VariantID vid=LEGION_AUTO_GENERATE_ID)
 
static VariantID preregister_task_variant (const TaskVariantRegistrar &registrar, const CodeDescriptor &codedesc, const void *user_data=NULL, size_t user_len=0, const char *task_name=NULL, VariantID vid=LEGION_AUTO_GENERATE_ID, size_t return_type_size=LEGION_MAX_RETURN_SIZE, bool has_return_type_size=true, bool check_task_id=true)
 
static void legion_task_preamble (const void *data, size_t datalen, Processor p, const Task *&task, const std::vector< PhysicalRegion > *&reg, Context &ctx, Runtime *&runtime)
 
static void legion_task_postamble (Context ctx, const void *retvalptr=NULL, size_t retvalsize=0, bool owned=false, Realm::RegionInstance inst=Realm::RegionInstance::NO_INST, const void *metadataptr=NULL, size_t metadatasize=0)
 
static void legion_task_postamble (Context ctx, const void *retvalptr, size_t retvalsize, bool owned, const Realm::ExternalInstanceResource &allocation, void(*freefunc)(const Realm::ExternalInstanceResource &)=NULL, const void *metadataptr=NULL, size_t metadatasize=0)
 
static void legion_task_postamble (Context ctx, FutureFunctor *callback_functor, bool owned=false)
 
template<typename T , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static TaskID register_legion_task (TaskID id, Processor::Kind proc_kind, bool single, bool index, VariantID vid=LEGION_AUTO_GENERATE_ID, TaskConfigOptions options=TaskConfigOptions(), const char *task_name=NULL)
 
template<void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static TaskID register_legion_task (TaskID id, Processor::Kind proc_kind, bool single, bool index, VariantID vid=LEGION_AUTO_GENERATE_ID, TaskConfigOptions options=TaskConfigOptions(), const char *task_name=NULL)
 
template<typename T , typename UDT , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static TaskID register_legion_task (TaskID id, Processor::Kind proc_kind, bool single, bool index, const UDT &user_data, VariantID vid=LEGION_AUTO_GENERATE_ID, TaskConfigOptions options=TaskConfigOptions(), const char *task_name=NULL)
 
template<typename UDT , void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static TaskID register_legion_task (TaskID id, Processor::Kind proc_kind, bool single, bool index, const UDT &user_data, VariantID vid=LEGION_AUTO_GENERATE_ID, TaskConfigOptions options=TaskConfigOptions(), const char *task_name=NULL)
 
static bool has_runtime (void)
 
static Runtimeget_runtime (Processor p=Processor::NO_PROC)
 
static bool has_context (void)
 
static Context get_context (void)
 
static const Taskget_context_task (Context ctx)
 

Protected Member Functions

 Runtime (Internal::Runtime *rt)
 

Detailed Description

The Runtime class is the primary interface for Legion. Every task is given a reference to the runtime as part of its arguments. All Legion operations are then performed by directing the runtime to perform them through the methods of this class. The methods in Runtime are broken into three categories. The first group of calls are the methods that can be used by application tasks during runtime. The second group contains calls for initializing the runtime during start-up callback. The final section of calls are static methods that are used to configure the runtime prior to starting it up.

A note on context free functions: context free functions have equivalent functionality to their non-context-free couterparts. However, context free functions can be safely used in a leaf task while any runtime function that requires a context cannot be used in a leaf task. If your task variant only uses context free functions as part of its implementation then it is safe for you to annotate it as a leaf task variant.

Member Typedef Documentation

◆ PointTransformFnptr

typedef DomainPoint(* Legion::Runtime::PointTransformFnptr) (const DomainPoint &point, const Domain &domain, const Domain &range)

Apply a transform to a FutureMap. All points that access the FutureMap will be transformed by the 'transform' function before accessing the backing future map. Note that multiple transforms can be composed this way to create new FutureMaps. This version takes a function pointer which must take a domain point and the range of the original future map and returns a new domain point that must fall within the range.

Parameters
ctxenclosing task context
fmfuture map to apply a new coordinate space to
new_domainan index space to describe the domain of points for the transformed future map
fnptra function pointer to call to transform points
provenancean optional string describing the provenance information for this operation
Returns
a new future map with the coordinate space transformed

Member Function Documentation

◆ acquire_grant()

Grant Legion::Runtime::acquire_grant ( Context  ctx,
const std::vector< LockRequest > &  requests 
)

Acquire one or more locks in the given mode. Returns a grant object which can be passed to many kinds of launchers for indicating that the operations must be performed while the grant his held. Note that the locks will be acquired in the order specified by the in the vector which may be necessary for applications to avoid deadlock.

Parameters
ctxthe enclosing task context
requestsvector of locks to acquire
Returns
a grant object

◆ add_mapper()

void Legion::Runtime::add_mapper ( MapperID  map_id,
Mapping::Mapper *  mapper,
Processor  proc = Processor::NO_PROC 
)

Add a mapper at the given mapper ID for the runtime to use when mapping tasks. If a specific processor is passed to the call then the mapper instance will only be registered on that processor. Alternatively, if no processor is passed, then the mapper will be registered with all processors on the local node.

Parameters
map_idthe mapper ID to associate with the mapper
mapperpointer to the mapper object
procthe processor to associate the mapper with

◆ add_registration_callback()

static void Legion::Runtime::add_registration_callback ( RegistrationCallbackFnptr  callback,
bool  dedup = true,
size_t  dedup_tag = 0 
)
static

This call allows the application to add a callback function that will be run prior to beginning any task execution on every runtime in the system. It can be used to register or update the mapping between mapper IDs and mappers, register reductions, register projection function, register coloring functions, or configure any other static runtime variables prior to beginning the application.

Parameters
callbackfunction pointer to the callback function to be run
bufferoptional argument buffer to pass to the callback
dedupwhether to deduplicate this with other registration callbacks for the same function
dedup_taga tag to use for deduplication in the case where applications may want to deduplicate across multiple callbacks with the same function pointer

◆ advance_dynamic_collective()

DynamicCollective Legion::Runtime::advance_dynamic_collective ( Context  ctx,
DynamicCollective  dc 
)

Advance an existing dynamic collective to the next phase. It has the same semantics as the equivalent call for phase barriers.

Parameters
ctxenclosing task context
dcthe dynamic collective to be advanced
Returns
an updated dynamic collective used for the next phase

◆ advance_phase_barrier()

PhaseBarrier Legion::Runtime::advance_phase_barrier ( Context  ctx,
PhaseBarrier  pb 
)

Advance an existing phase barrier to the next phase. Note this is NOT arrive which indicates an actual arrival at the next phase. Instead this allows tasks launched with the returned phase barrier to indicate that they should be executed in the next phase of the computation. Note that once a phase barrier exhausts its total number of generations then it will fail the 'exists' method test. It is the responsibility of the application to detect this case and handle it correctly by making a new PhaseBarrier.

Parameters
ctxenclosing task context
pbthe phase barrier to be advanced
Returns
an updated phase barrier used for the next phase

◆ arrive_dynamic_collective()

void Legion::Runtime::arrive_dynamic_collective ( Context  ctx,
DynamicCollective  dc,
const void *  buffer,
size_t  size,
unsigned  count = 1 
)

Arrive on a dynamic collective immediately with a value stored in an untyped buffer.

Parameters
ctxenclosing task context
dcdynamic collective on which to arrive
bufferpointer to an untyped buffer
sizesize of the buffer in bytes
countarrival count on the barrier

◆ attach_external_resource()

PhysicalRegion Legion::Runtime::attach_external_resource ( Context  ctx,
const AttachLauncher launcher 
)

Attach an external resource to a logical region

Parameters
ctxenclosing task context
launcherthe attach launcher that describes the resource
Returns
the physical region for the external resource

◆ attach_external_resources()

ExternalResources Legion::Runtime::attach_external_resources ( Context  ctx,
const IndexAttachLauncher launcher 
)

Attach multiple external resources to logical regions using an index space attach operation. In a control replicated context this method is an unusual "collective" method meaning that different shards are allowed to pass in different arguments and the runtime will interpret them as different sub-operations coming from different shards. All the physical regions returned from this method must be detached together as well using the 'detach_external_resources' method and cannot be detached individually using the 'detach_external_resource' method.

Parameters
ctxenclosing task context
launcherthe index attach launcher describing the external resources to be attached
Returns
an external resources objects containing the physical regions for the attached resources with regions in the same order as specified in the launcher

◆ attach_file()

PhysicalRegion Legion::Runtime::attach_file ( Context  ctx,
const char *  file_name,
LogicalRegion  handle,
LogicalRegion  parent,
const std::vector< FieldID > &  field_vec,
LegionFileMode  mode 
)
Deprecated:
Attach an normal file as a physical region. This attach is similar to attach_hdf5 operation, except that the file has exact same data format as in-memory physical region. Data lays out as SOA in file.

◆ attach_hdf5()

PhysicalRegion Legion::Runtime::attach_hdf5 ( Context  ctx,
const char *  file_name,
LogicalRegion  handle,
LogicalRegion  parent,
const std::map< FieldID, const char * > &  field_map,
LegionFileMode  mode 
)
Deprecated:
Attach an HDF5 file as a physical region. The file must already exist. Legion will defer the attach operation until all other operations on the logical region are finished. After the attach operation succeeds, then all other physical instances for the logical region will be invalidated, making the physical instance the only valid version of the logical region. The resulting physical instance is attached with restricted coherence (the same as logical regions mapped with simultaneous coherence). All operations using the logical region will be required to use the physical instance until the restricted coherence is removed using an acquire operation. The restricted coherence can be reinstated by performing a release operation. Just like other physical regions, the HDF5 file can be both mapped and unmapped after it is created. The runtime will report an error for an attempt to attach an file to a logical region which is already mapped in the enclosing parent task's context. The runtime will also report an error if the task launching the attach operation does not have the necessary privileges (read-write) on the logical region. The resulting physical region is unmapped, but can be mapped using the standard inline mapping calls.
Parameters
ctxenclosing task context
file_namethe path to an existing HDF5 file
handlethe logical region with which to associate the file
parentthe parent logical region containing privileges
field_mapmapping for field IDs to HDF5 dataset names
modethe access mode for attaching the file
Returns
a new physical instance corresponding to the HDF5 file

◆ attach_name() [1/7]

void Legion::Runtime::attach_name ( FieldSpace  handle,
const char *  name,
bool  is_mutable = false 
)

Attach a name to a field space

Parameters
handlefield space handle
namepointer to a name
is_mutablecan the name be changed later

◆ attach_name() [2/7]

void Legion::Runtime::attach_name ( FieldSpace  handle,
FieldID  fid,
const char *  name,
bool  is_mutable = false 
)

Attach a name to a specific field

Parameters
handlefield space handle
fidfield ID
namepointer to a name
is_mutablecan the name be changed later

◆ attach_name() [3/7]

void Legion::Runtime::attach_name ( IndexPartition  handle,
const char *  name,
bool  is_mutable = false 
)

Attach a name to an index partition

Parameters
handleindex partition handle
namepointer to a name
is_mutablecan the name be changed later

◆ attach_name() [4/7]

void Legion::Runtime::attach_name ( IndexSpace  handle,
const char *  name,
bool  is_mutable = false 
)

Attach a name to an index space

Parameters
handleindex space handle
namepointer to a name
is_mutablecan the name be changed later

◆ attach_name() [5/7]

void Legion::Runtime::attach_name ( LogicalPartition  handle,
const char *  name,
bool  is_mutable = false 
)

Attach a name to a logical partition

Parameters
handlelogical partition handle
namepointer to a name
is_mutablecan the name be changed later

◆ attach_name() [6/7]

void Legion::Runtime::attach_name ( LogicalRegion  handle,
const char *  name,
bool  is_mutable = false 
)

Attach a name to a logical region

Parameters
handlelogical region handle
namepointer to a name
is_mutablecan the name be changed later

◆ attach_name() [7/7]

void Legion::Runtime::attach_name ( TaskID  task_id,
const char *  name,
bool  is_mutable = false,
bool  local_only = false 
)

Attach a name to a task

Parameters
task_idthe ID of the task
namepointer to the name
is_mutablecan the name be changed later
local_onlyattach the name only on the local node

◆ attach_semantic_information() [1/7]

void Legion::Runtime::attach_semantic_information ( FieldSpace  handle,
FieldID  fid,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false 
)

Attach semantic information to a specific field

Parameters
handlefield space handle
fidfield ID
tagsemantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later

◆ attach_semantic_information() [2/7]

void Legion::Runtime::attach_semantic_information ( FieldSpace  handle,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false 
)

Attach semantic information to a field space

Parameters
handlefield space handle
tagsemantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later

◆ attach_semantic_information() [3/7]

void Legion::Runtime::attach_semantic_information ( IndexPartition  handle,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false 
)

Attach semantic information to an index partition

Parameters
handleindex partition handle
tagsemantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later

◆ attach_semantic_information() [4/7]

void Legion::Runtime::attach_semantic_information ( IndexSpace  handle,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false 
)

Attach semantic information to an index space

Parameters
handleindex space handle
tagsemantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later

◆ attach_semantic_information() [5/7]

void Legion::Runtime::attach_semantic_information ( LogicalPartition  handle,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false 
)

Attach semantic information to a logical partition

Parameters
handlelogical partition handle
tagsemantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later

◆ attach_semantic_information() [6/7]

void Legion::Runtime::attach_semantic_information ( LogicalRegion  handle,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false 
)

Attach semantic information to a logical region

Parameters
handlelogical region handle
tagsemantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later

◆ attach_semantic_information() [7/7]

void Legion::Runtime::attach_semantic_information ( TaskID  task_id,
SemanticTag  tag,
const void *  buffer,
size_t  size,
bool  is_mutable = false,
bool  local_only = false 
)

Attach semantic information to a logical task

Parameters
handletask_id the ID of the task
tagthe semantic tag
bufferpointer to a buffer
sizesize of the buffer to save
is_mutablecan the tag value be changed later
local_onlyattach the name only on this node

◆ begin_implicit_task()

Context Legion::Runtime::begin_implicit_task ( TaskID  top_task_id,
MapperID  mapper_id,
Processor::Kind  proc_kind,
const char *  task_name = NULL,
bool  control_replicable = false,
unsigned  shard_per_address_space = 1,
int  shard_id = -1,
DomainPoint  shard_point = DomainPoint() 
)

In addition to launching top-level tasks from outside the runtime, applications can bind external threads as new implicit top-level tasks to the runtime. This will tell the runtime that this external thread should now function as new top-level task that is executing. After this call the trhead will be treated as through it is a top-level task running on a specific kind of processor. Users can also mark that this implicit top-level task is control replicable for supporting implicit top-level tasks for multi-node runs. For the control replicable case we expect to see the same number of calls from every address space. This number is controlled by shard_per_address_space and defaults to one. The application can also optionally specify the shard ID for every implicit top level task for control replication settings. If it is specified, then the application must specify it for all shards. Otherwise the runtime will allocate shard IDs contiguously on each node before proceeding to the next node.

◆ begin_mapper_call()

Mapping::MapperContext Legion::Runtime::begin_mapper_call ( Context  ctx,
MapperID  id,
Processor  target = Processor::NO_PROC 
)

Start a mapper call from the application side. This will create a mapper context to use during the mapper call. The creation of this mapper context will ensure appropriate synchronization with other mapper calls consistent with the mapper synchronization model.

Parameters
ctxthe enclosing task context
idthe mapper ID for which mapper to locate
targetprocessor if any, if none specified then the executing processor for the current context is used, if specified processor must be local to the address space
Returns
a fresh mapper context to use for the mapper call

◆ begin_static_trace()

void Legion::Runtime::begin_static_trace ( Context  ctx,
const std::set< RegionTreeID > *  managed = NULL 
)

Start a new static trace of operations. Inside of this trace it is the application's responsibility to specify any dependences that would normally have existed between each operation being launched and any prior operations in the trace (there is no need to specify dependences on anything outside of the trace). The application can optionally specify a set of region trees for which it will be supplying dependences, with all other region trees being left to the runtime to handle. If no such set is specified then the runtime will operate under the assumption that the application is specifying dependences for all region trees.

Parameters
ctxthe enclosing task context
managedoptional list of region trees managed by the application

◆ begin_trace()

void Legion::Runtime::begin_trace ( Context  ctx,
TraceID  tid,
bool  logical_only = false,
bool  static_trace = false,
const std::set< RegionTreeID > *  managed = NULL,
const char *  provenance = NULL 
)

Start a new trace of legion operations. Tracing enables the runtime to memoize the dynamic logical dependence analysis for these operations. Future executions of the trace will no longer need to perform the dynamic dependence analysis, reducing overheads and improving the parallelism available in the physical analysis. The trace ID need only be local to the enclosing context. Traces are currently not permitted to be nested. In general, the runtime will capture all dependence information for the trace. However, in some cases, compilers may want to pass information along for the logical dependence analysis as a static trace. Inside of a static trace it is the application's responsibility to specify any dependences that would normally have existed between each operation being launched and any prior operations in the trace (there is no need to specify dependences on anything outside of the trace). The application can optionally specify a set of region trees for which it will be supplying dependences, with all other region trees being left to the runtime to handle. If no such set is specified then the runtime will operate under the assumption that the application is specifying dependences for all region trees.

Parameters
ctxthe enclosing task context
tidthe trace ID of the trace to be captured
logical_onlywhether physical tracing is permitted
static_tracewhether this is a static trace
managedspecific region trees the application will handle in the case of a static trace

◆ bind_implicit_task_to_external_thread()

void Legion::Runtime::bind_implicit_task_to_external_thread ( Context  ctx)

Bind an implicit context to an external thread. It is the user's responsibility to make sure that no more than one external thread is bound to an implicit task's context at a time or undefined behavior will occur.

◆ complete_frame()

void Legion::Runtime::complete_frame ( Context  ctx,
const char *  provenance = NULL 
)

Frames are a very simple way to control the number of outstanding operations in a task context. By default, mappers have control over this by saying how many outstanding operations each task context can have using the 'configure_context' mapper call. However, in many cases, it is easier for custom mappers to reason about how many iterations or some other application-specific set of operations are in flight. To facilitate this, applications can create 'frames' of tasks. Using the 'configure_context' mapper call, custom mappers can specify the maximum number of outstanding frames that make up the operation window. It is best to place these calls at the end of a frame of tasks.

◆ concurrent_task_barrier()

void Legion::Runtime::concurrent_task_barrier ( Context  ctx)

This method provides a mechanism for performing a blocking barrier inside the point tasks of concurrent index space task launch. This may seem very un-Legion-like and indeed it is. However, there is one very important use case that we've identified where it is imperative that we have such a feature and there's really no good way to work around the issue at the moment other than to provide this feature.

Launching collective kernels on a GPU is currently an unsafe thing to do (see this section of the CUDA programming guide: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#streams "for example, inter-kernel communication is undefined") which means that technically using collective kernel libraries such as NCCL is illegal in CUDA programs. To help make this safer, we recommend putting a barrier both before and after every single collective kernel launch performed in a concurrent index space task launch. Yes, we know this sucks and it will probably hurt your performance. Please raise issues with the NVIDIA CUDA team.

To use this method all variants selected by each point task must have set the 'concurrent_barrier' flag when they were registered which tells the runtime to make this barrier available. The runtime will check that all variants in the concurrent index space task launch have this set. It will raise an error if any of the selected variants do not have this set (as this probably means you have some points that are going to expect to arrive on the barrier while others will not). This method will perform a barrier across the N tasks in the concurrent index space task launch. The expected cost of this barrier is O(log N) in the number of tasks N in the collective index space task launch.

When using this barrier to address the CUDA issue described above: it is the user's responsibility to make sure that one barrier is performed before the kernel is launched and one is performed after the launch in order to be avoid deadlocks. Furthermore, it is the user's responsibility to make sure that the kernel has actually been issued to GPU driver (be very careful with non-blocking communicators).

◆ configure_MPI_interoperability()

static void Legion::Runtime::configure_MPI_interoperability ( int  rank)
static

Configre the runtime for interoperability with MPI. This call should be made once in each MPI process before invoking the 'start' function when running Legion within the same process as MPI. As a result of this call the 'find_forward_MPI_mapping' and 'find_reverse_MPI_mapping' methods on a runtime instance will return a map which associates an AddressSpace with each MPI rank.

Parameters
rankthe integer naming this MPI rank

◆ construct_future_map() [1/2]

FutureMap Legion::Runtime::construct_future_map ( Context  ctx,
IndexSpace  domain,
const std::map< DomainPoint, Future > &  futures,
bool  collective = false,
ShardingID  sid = 0,
bool  implicit_sharding = false,
const char *  provenance = NULL 
)

Construct a future map from a collection of futures. The user must also specify the domain of the futures and there must be one future for every point in the domain. In the case of 'collective=true' the runtime supports different shards in a control-replicated context to work collectively to construct the future map. The runtime will not detect if points are missing or if points are duplicated and undefined behavior will occur. If the task is not control-replicated then the 'collective' flag will not have any effect.

Parameters
ctxenclosing task context
domainthe index space that names all points in the future map
futuresthe set of futures from which to create the future map
collectivewhether shards from a control replicated context should work collectively to construct the map
sidthe sharding function ID that describes the sharding pattern if collective=true
implicit_shardingif collective=true this says whether the sharding should be implicitly handled by the runtime and the sharding function ID ignored
provenancean optional string describing the provenance information for this operation
Returns
a new future map containing all the futures

◆ construct_future_map() [2/2]

FutureMap Legion::Runtime::construct_future_map ( Context  ctx,
IndexSpace  domain,
const std::map< DomainPoint, UntypedBuffer > &  data,
bool  collective = false,
ShardingID  sid = 0,
bool  implicit_sharding = false,
const char *  provenance = NULL 
)

Construct a future map from a collection of buffers. The user must also specify the domain of the future map and there must be one buffer for every point in the domain. In the case of 'collective=true' the runtime supports different shards in a control-replicated context to work collectively to construct the future map. The runtime will not detect if points are missing or if points are duplicated and undefined behavior will occur. If 'collective=true', the application must provide a sharding function that describes assignment of points to shards for the runtime to use. The runtime will verify this sharding function accurately describes all the points passed in. If the task is not control-replicated then the 'collective' flag will not have any effect.

Parameters
ctxenclosing task context
domainthe index space that names all points in the future map
datathe set of futures from which to create the future map
collectivewhether shards from a control replicated context should work collectively to construct the map
sidthe sharding function ID that describes the sharding pattern if collective=true
implicit_shardingif collective=true this says whether the sharding should be implicitly handled by the runtime and the sharding function ID ignored
provenancean optional string describing the provenance information for this operation
Returns
a new future map containing all the futures

◆ create_argument_map()

ArgumentMap Legion::Runtime::create_argument_map ( Context  ctx)
Deprecated:
Create an argument map in the given context. This method is deprecated as argument maps can now be created directly by a simple declaration.
Parameters
ctxenclosing task context
Returns
a new argument map

◆ create_association()

void Legion::Runtime::create_association ( Context  ctx,
LogicalRegion  domain,
LogicalRegion  domain_parent,
FieldID  domain_fid,
IndexSpace  range,
MapperID  id = 0,
MappingTagID  tag = 0,
UntypedBuffer  map_arg = UntypedBuffer(),
const char *  provenance = NULL 
)

Create association will construct an injective mapping between the points of two different index spaces. The mapping will be constructed in a field of the domain logical region so that there is one entry for each point in the index space of the domain logical region. If the cardinality of domain index space is larger than the cardinality of the range index space then some entries in the field may not be written. It is the responsiblity of the user to have initialized the field with a "null" value to detect such cases. Users wishing to create a bi-directional mapping between index spaces can also use the versions of this method that take a logical region on the range as well.

Parameters
ctxthe enclosing task context
domainthe region for the results and source index space
domain_parentthe region from which privileges are derived
fidthe field of domain in which to place the results
rangethe index space to serve as the range of the mapping
idthe ID of the mapper to use for mapping the fields
tagthe tag to pass to the mapper for context
map_argan untyped buffer for the mapper data of the Partition
provenancean optional string describing the provenance information for this operation

◆ create_cross_product_partitions()

Color Legion::Runtime::create_cross_product_partitions ( Context  ctx,
IndexPartition  handle1,
IndexPartition  handle2,
std::map< IndexSpace, IndexPartition > &  handles,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

This performs a cross product between two different index partitions. For every index subspace in the first index partition the runtime will create a new index partition of that index space by intersecting each of the different index subspaces in the second index partition. As a result, whole set of new index partitions will be created. The user can request which partition names to return by specifying a map of domain points from the color space of the first index partition. If the map is empty, no index partitions will be returned. The user can can say what kind the partitions are using the 'part_kind' argument. The user can also specify a color for the new partitions using the 'color' argument. If a specific color is specified, it must be available for a partition in each of the index subspaces in the first index partition.

Parameters
ctxthe enclosing task context
handle1the first index partition
handle2the second index partition
handleoptional map for new partitions (can be empty)
part_kindindicate the kinds for the partitions
coloroptional color for each of the new partitions
provenancean optional string describing the provenance information for this operation
Returns
the color used for each of the partitions

◆ create_dynamic_collective()

DynamicCollective Legion::Runtime::create_dynamic_collective ( Context  ctx,
unsigned  arrivals,
ReductionOpID  redop,
const void *  init_value,
size_t  init_size 
)

A dynamic collective is a special type of phase barrier that is also associated with a reduction operation that allows arrivals to contribute a value to a generation of the barrier. The runtime reduces down all the applied values to a common value for each generation of the phase barrier. The number of arrivals gives a default number of expected arrivals for each generation.

Parameters
ctxenclosing task context
arrivalsdefault number of expected arrivals
redopthe associated reduction operation
init_valuethe inital value for each generation
init_sizethe size in bytes of the initial value
Returns
a new dynamic collective handle

◆ create_equal_partition()

IndexPartition Legion::Runtime::create_equal_partition ( Context  ctx,
IndexSpace  parent,
IndexSpace  color_space,
size_t  granularity = 1,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

Create 'color_space' index subspaces (one for each point) in a common partition of the 'parent' index space. By definition the resulting partition will be disjoint. Users can also specify a minimum 'granularity' for the size of the index subspaces. Users can specify an optional color for the index partition. Note: for multi-dimensional cases, this implementation will currently only split across the first dimension. This is useful for providing an initial equal partition, but is unlikely to be an ideal partition for long repetitive use. Do NOT rely on this behavior as the runtime reserves the right to change the implementation in the future.

Parameters
ctxthe enclosing task context
parentindex space of the partition to be made
color_spacespace of colors to create
granularitythe minimum size of the index subspaces
coloroptional color paramter for the partition
provenancean optional string describing the provenance information for this operation
Returns
name of the created index partition

◆ create_external_handshake()

static LegionHandshake Legion::Runtime::create_external_handshake ( bool  init_in_ext = true,
int  ext_participants = 1,
int  legion_participants = 1 
)
static

Create a handshake object for exchanging control between an external application and Legion. We make this a static method so that it can be created before the Legion runtime is initialized.

Parameters
init_in_extwho owns initial control of the handshake, by default it is the external application
ext_participantsnumber of calls that need to be made to the handshake to pass control from the external application to Legion
legion_participantsnumber of calls that need to be made to the handshake to pass control from Legion to the external application

◆ create_field_allocator()

FieldAllocator Legion::Runtime::create_field_allocator ( Context  ctx,
FieldSpace  handle 
)

Create a field space allocator object for the given field space

Parameters
ctxenclosing task context
handlefor the field space to create an allocator
Returns
a new field space allocator for the given field space

◆ create_field_space() [1/3]

FieldSpace Legion::Runtime::create_field_space ( Context  ctx,
const char *  provenance = NULL 
)

Create a new field space.

Parameters
ctxenclosing task context
provenancean optional string describing the provenance information for this operation
Returns
handle for the new field space

◆ create_field_space() [2/3]

FieldSpace Legion::Runtime::create_field_space ( Context  ctx,
const std::vector< Future > &  field_sizes,
std::vector< FieldID > &  resulting_fields,
CustomSerdezID  serdez_id = 0,
const char *  provenance = NULL 
)

Create a new field space with an existing set of fields

Parameters
ctxenclosing task context
field_sizesinitial field sizes for fields
resulting_fieldsoptional field snames for fields
serdez_idoptional parameter for specifying a custom serdez object for serializing and deserializing fields
provenancean optional string describing the provenance information for this operation
Returns
handle for the new field space

◆ create_field_space() [3/3]

FieldSpace Legion::Runtime::create_field_space ( Context  ctx,
const std::vector< size_t > &  field_sizes,
std::vector< FieldID > &  resulting_fields,
CustomSerdezID  serdez_id = 0,
const char *  provenance = NULL 
)

Create a new field space with an existing set of fields

Parameters
ctxenclosing task context
field_sizesinitial field sizes for fields
resulting_fieldsoptional field snames for fields
serdez_idoptional parameter for specifying a custom serdez object for serializing and deserializing fields
provenancean optional string describing the provenance information for this operation
Returns
handle for the new field space

◆ create_handshake()

static MPILegionHandshake Legion::Runtime::create_handshake ( bool  init_in_MPI = true,
int  mpi_participants = 1,
int  legion_participants = 1 
)
static

Create a handshake object for exchanging control between MPI and Legion. We make this a static method so that it can be created before the Legion runtime is initialized.

Parameters
init_in_MPIwho owns initial control of the handshake, by default it is MPI
mpi_participantsnumber of calls that need to be made to the handshake to pass control from MPI to Legion
legion_participantsnumber of calls that need to be made to the handshake to pass control from Legion to MPI

◆ create_index_space() [1/6]

IndexSpace Legion::Runtime::create_index_space ( Context  ctx,
const Domain bounds,
TypeTag  type_tag = 0,
const char *  provenance = NULL 
)

Create a new top-level index space based on the given domain bounds If the bounds contains a Realm index space then Legion will take ownership of any sparsity maps.

Parameters
ctxthe enclosing task context
boundsthe bounds for the new index space
type_tagoptional type tag to use for the index space
provenancean optional string describing the provenance information for this index space
Returns
the handle for the new index space

◆ create_index_space() [2/6]

IndexSpace Legion::Runtime::create_index_space ( Context  ctx,
const std::set< Domain > &  domains 
)
Deprecated:
Create a new top-level index space based on a set of domains
Parameters
ctxthe enclosing task context
domainsthe set of domains
Returns
the handle for the new index space

◆ create_index_space() [3/6]

IndexSpace Legion::Runtime::create_index_space ( Context  ctx,
const std::vector< Domain > &  rects,
const char *  provenance = NULL 
)

Create a new top-level index space from a vector of rectangles

Parameters
ctxthe enclosing task context
rectsa vector of rectangles to have in the index space
provenancean optional string describing the provenance information for this index space
Returns
the handle for the new index space

◆ create_index_space() [4/6]

IndexSpace Legion::Runtime::create_index_space ( Context  ctx,
const std::vector< DomainPoint > &  points,
const char *  provenance = NULL 
)

Create a new top-level index space from a vector of points

Parameters
ctxthe enclosing task context
pointsa vector of points to have in the index space
provenancean optional string describing the provenance information for this index space
Returns
the handle for the new index space

◆ create_index_space() [5/6]

IndexSpace Legion::Runtime::create_index_space ( Context  ctx,
size_t  dimensions,
const Future f,
TypeTag  type_tag = 0,
const char *  provenance = NULL 
)

Create a new top-level index space from a future which contains a Domain object. If the Domain conaints a Realm index space then Legion will take ownership of any sparsity maps.

Parameters
ctxthe enclosing task context
dimensionsnumber of dimensions for the created space
futurethe future value containing the bounds
type_tagoptional type tag to use for the index space defaults to 'coord_t'
provenancean optional string describing the provenance information for this index space
Returns
the handle for the new index space

◆ create_index_space() [6/6]

IndexSpace Legion::Runtime::create_index_space ( Context  ctx,
size_t  max_num_elmts 
)
Deprecated:
Create a new top-level index space with the maximum number of elements
Parameters
ctxthe enclosing task context
max_num_elmtsmaximum number of elements in the index space
Returns
the handle for the new index space

◆ create_index_space_difference()

IndexSpace Legion::Runtime::create_index_space_difference ( Context  ctx,
IndexPartition  parent,
const DomainPoint color,
IndexSpace  initial,
const std::vector< IndexSpace > &  handles,
const char *  provenancne = NULL 
)

Create a new index space by taking the set difference of an existing index space with a set of other index spaces. The resulting index space is assigned to be the index space corresponding to 'color' of the 'parent' index partition. It is illegal to invoke this method with a 'parent' index partition that was not created by a call to 'create_pending_partition'. The 'initial' index space is the index space from which differences will be performed, and each of the index spaces in 'handles' will be subsequently subtracted from the 'initial' index space. All of the index spaces in 'handles' as well as 'initial' must come from the same index space tree.

Parameters
ctxthe enclosing task context
parentthe parent index partition
colorthe color to assign the index space to in the parent
initialthe starting index space
handlesa vector index space handles to subtract
provenancean optional string describing the provenance information for this operation
Returns
handle of the new index space

◆ create_index_space_intersection() [1/2]

IndexSpace Legion::Runtime::create_index_space_intersection ( Context  ctx,
IndexPartition  parent,
const DomainPoint color,
const std::vector< IndexSpace > &  handles,
const char *  provenance = NULL 
)

Create a new index space by intersecting together a bunch of index spaces from a common index space tree. The resulting index space is assigned to be the index space corresponding to 'color' of the 'parent' index partition. It is illegal to invoke this method with a 'parent' index partition that was not created by a call to 'create_pending_partition'. All of the index spaces being intersected together must come from the same index space tree.

Parameters
ctxthe enclosing task context
parentthe parent index partition
colorthe color to assign the index space to in the parent
handlesa vector index space handles to intersect
provenancean optional string describing the provenance information for this operation
Returns
handle of the new index space

◆ create_index_space_intersection() [2/2]

IndexSpace Legion::Runtime::create_index_space_intersection ( Context  ctx,
IndexPartition  parent,
const DomainPoint color,
IndexPartition  handle,
const char *  provenannce = NULL 
)

This method is the same as the one above, except the index spaces all come from a common partition specified by 'handle'. The resulting index space will be an intersection of all the index spaces of 'handle'.

Parameters
ctxthe enlcosing task context
parentthe parent index partition
colorthe color to assign the index space to in the parent
handlean index partition to intersect together
provenancean optional string describing the provenance information for this operation
Returns
handle of the new index space

◆ create_index_space_union() [1/2]

IndexSpace Legion::Runtime::create_index_space_union ( Context  ctx,
IndexPartition  parent,
const DomainPoint color,
const std::vector< IndexSpace > &  handles,
const char *  provenance = NULL 
)

Create a new index space by unioning together a bunch of index spaces from a common index space tree. The resulting index space is assigned to be the index space corresponding to 'color' of the 'parent' index partition. It is illegal to invoke this method with a 'parent' index partition that was not created by a 'create_pending_partition' call. All of the index spaces being unioned together must come from the same index space tree.

Parameters
ctxthe enclosing task context
parentthe parent index partition
colorthe color to assign the index space to in the parent
handlesa vector index space handles to union
provenancean optional string describing the provenance information for this operation
Returns
handle of the new index space

◆ create_index_space_union() [2/2]

IndexSpace Legion::Runtime::create_index_space_union ( Context  ctx,
IndexPartition  parent,
const DomainPoint color,
IndexPartition  handle,
const char *  provenance = NULL 
)

This method is the same as the one above, except the index spaces all come from a common partition specified by 'handle'. The resulting index space will be a union of all the index spaces of 'handle'.

Parameters
ctxthe enlcosing task context
parentthe parent index partition
colorthe color to assign the index space to in the parent
handlean index partition to union together
provenancean optional string describing the provenance information for this operation
Returns
handle of the new index space

◆ create_lock()

Lock Legion::Runtime::create_lock ( Context  ctx)

Create a new lock.

Parameters
ctxenclosing task context
Returns
a new lock handle

◆ create_logical_region()

LogicalRegion Legion::Runtime::create_logical_region ( Context  ctx,
IndexSpace  index,
FieldSpace  fields,
bool  task_local = false,
const char *  provenance = NULL 
)

Create a new logical region tree from the given index space and field space. It is important to note that every call to this function will return a new logical region with a new tree ID. Only the triple of an index space, a field space, and a tree ID uniquely define a logical region.

Parameters
ctxenclosing task context
indexhandle for the index space of the logical region
fieldshandle for the field space of the logical region
provenancean optional string describing the provenance information for this operation
Returns
handle for the logical region created

◆ create_partition_by_blockify() [1/2]

IndexPartition Legion::Runtime::create_partition_by_blockify ( Context  ctx,
IndexSpace  parent,
DomainPoint  blockify_factor,
DomainPoint  origin,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

An alternate version of create partition by blockify that also takes an origin to use for the computation of the extent.

Parameters
ctxthe enclosing task context
parentthe parent index space to be partitioned
blockingfactor the blocking factors for each dimension
originthe origin to use for computing the extent
coloroptional new color for the index partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the parent index space

◆ create_partition_by_blockify() [2/2]

IndexPartition Legion::Runtime::create_partition_by_blockify ( Context  ctx,
IndexSpace  parent,
DomainPoint  blocking_factor,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

Create partition by blockify is a special (but common) case of create partition by restriction, that is guaranteed to create a disjoint partition given the blocking factor specified for each dimension. This call will also create an implicit color space for the partition that is the caller's responsibility to reclaim. This assumes an origin of (0)* for all dimensions of the extent.

Parameters
ctxthe enclosing task context
parentthe parent index space to be partitioned
blockingfactor the blocking factors for each dimension
coloroptional new color for the index partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the parent index space

◆ create_partition_by_difference()

IndexPartition Legion::Runtime::create_partition_by_difference ( Context  ctx,
IndexSpace  parent,
IndexPartition  handle1,
IndexPartition  handle2,
IndexSpace  color_space,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

This function zips a set difference operation over all the index subspaces in two different partitions. The zip operation is only applied to the points contained in the intersection of the two color spaces. The difference is taken from the corresponding pairs of index spaces from each partition. The resulting partition is created off the 'parent' index space. In order to be sound, both index partitions must be from the same index tree and the first index partition must have the 'parent' index space as an ancestor. The user can say whether the partition is disjoint or not or ask the runtime to compute the result using the 'part_kind' argument. The user can assign a color to the new partition by the 'color' argument. index spaces.

Parameters
ctxthe enclosing task context
parentthe parent index space for the new partition
handle1first index partition
handle2second index partition
color_spacespace of colors to zip over
part_kindindicate the kind of partition
colorthe new color for the index partition
provenancean optional string describing the provenance information for this operation
Returns
name of the created index partition

◆ create_partition_by_domain() [1/2]

IndexPartition Legion::Runtime::create_partition_by_domain ( Context  ctx,
IndexSpace  parent,
const FutureMap domain_future_map,
IndexSpace  color_space,
bool  perform_intersections = true,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

This is an alternate version of create_partition_by_domain that instead takes a future map for the list of domains to be used. The runtime will automatically interpret the results in the individual futures as domains for creating the partition. This allows users to create this partition without blocking.

Parameters
ctxthe enclosing task context
parentthe parent index space to be partitioned
domainsfuture map of points to domains
color_spacethe color space for the partition
perform_intersectionsintersect domains with parent space
part_kindspecify the partition kind or ask to compute it
colorthe color of the result of the partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the parent index space

◆ create_partition_by_domain() [2/2]

IndexPartition Legion::Runtime::create_partition_by_domain ( Context  ctx,
IndexSpace  parent,
const std::map< DomainPoint, Domain > &  domains,
IndexSpace  color_space,
bool  perform_intersections = true,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

Create partition by domain allows users to specify an explicit Domain object to use for one or more subregions directly. This is similar to the old (deprecated) coloring APIs. However, instead of specifying colors for each element, we encourage users to create domains that express as few dense rectangles in them as necessary for expressing the index space. The runtime will not attempt to coalesce the rectangles in each domain further.

Parameters
ctxthe enclosing task context
parentthe parent index space to be partitioned
domainsmap of points in the color space points to domains
color_spacethe color space for the partition
perform_intersectionsintersect domains with parent space
part_kindspecify the partition kind or ask to compute it
colorthe color of the result of the partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the parent index space

◆ create_partition_by_field()

IndexPartition Legion::Runtime::create_partition_by_field ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
FieldID  fid,
IndexSpace  color_space,
Color  color = LEGION_AUTO_GENERATE_ID,
MapperID  id = 0,
MappingTagID  tag = 0,
PartitionKind  part_kind = LEGION_DISJOINT_KIND,
UntypedBuffer  map_arg = UntypedBuffer(),
const char *  provenance = NULL 
)

Create partition by field uses an existing field in a logical region to perform a partitioning operation. The field type must be of 'Point<COLOR_DIM,COLOR_COORD_T>' type so that the runtime can interpret the field as an enumerated function from Point<DIM,COORD_TT> -> Point<COLOR_DIM,COLOR_COORD_T>. Pointers are assigned into index subspaces based on their assigned color. Pointers with negative entries will not be assigned into any index subspace. The resulting index partition is a partition of the index space of the logical region over which the operation is performed. By definition this partition is disjoint. The 'color' argument can be used to specify an optional color for the index partition.

Parameters
ctxthe enclosing task context
handlelogical region handle containing the chosen field and of which a partition will be created
parentthe parent region from which privileges are derived
fidthe field ID of the logical region containing the coloring
color_spacespace of colors for the partition
coloroptional new color for the index partition
idthe ID of the mapper to use for mapping the fields
tagthe context tag to pass to the mapper
part_kindthe kind of the partition
map_argan untyped buffer for the mapper data of the Partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the index space of the logical region

◆ create_partition_by_image()

IndexPartition Legion::Runtime::create_partition_by_image ( Context  ctx,
IndexSpace  handle,
LogicalPartition  projection,
LogicalRegion  parent,
FieldID  fid,
IndexSpace  color_space,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
MapperID  id = 0,
MappingTagID  tag = 0,
UntypedBuffer  map_arg = UntypedBuffer(),
const char *  provenance = NULL 
)

Create partition by image creates a new index partition from an existing field that represents an enumerated function from pointers into the logical region containing the field 'fid' to pointers in the 'handle' index space. The function the field represents therefore has type ptr_t@projection -> ptr_t@handle. We can therefore create a new index partition of 'handle' by mapping each of the pointers in the index subspaces in the index partition of the 'projection' logical partition to get pointers into the 'handle' index space and assigning them to a corresponding index subspace. The runtime will automatically compute if the resulting partition is disjoint or not. The user can give the new partition a color by specifying the 'color' argument.

Parameters
ctxthe enclosing task context
handlethe parent index space of the new index partition and the one in which all the ptr_t contained in 'fid' must point
projectionthe logical partition of which we are creating a projected version of through the field
parentthe parent region from which privileges are derived
fidthe field ID of the 'projection' logical partition we are reading which contains ptr_t@handle
color_spacethe index space of potential colors
part_kindspecify the kind of partition
coloroptional new color for the index partition
idthe ID of the mapper to use for mapping field
tagthe mapper tag to provide context to the mapper
map_argan untyped buffer for the mapper data of the Partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the 'handle' index space

◆ create_partition_by_intersection() [1/2]

IndexPartition Legion::Runtime::create_partition_by_intersection ( Context  ctx,
IndexSpace  parent,
IndexPartition  handle1,
IndexPartition  handle2,
IndexSpace  color_space,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

This function zips an intersection operation over all the index subspaces in two different partitions. The zip operation is only applied to points contained in the intersection of the two color spaces. The corresponding pairs of index spaces from each partition are intersected together and assigned to the same color in the new index partition. The resulting partition is created off the 'parent' index space. In order to be sound both index partitions must come from the same index tree as the parent and at least one must have the 'parent' index space as an ancestor. The user can say whether the partition is disjoint or not or ask the runtime to compute the result using the 'part_kind' argument. The user can assign a color to the new partition by the 'color' argument.

Parameters
ctxthe enclosing task context
parentthe parent index space for the new partition
handle1first index partition
handle2second index partition
color_spacespace of colors to zip over
part_kindindicate the kind of partition
colorthe new color for the index partition
provenancean optional string describing the provenance information for this operation
Returns
name of the created index partition

◆ create_partition_by_intersection() [2/2]

IndexPartition Legion::Runtime::create_partition_by_intersection ( Context  ctx,
IndexSpace  parent,
IndexPartition  partition,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
bool  dominates = false,
const char *  provenance = NULL 
)

This version of create partition by intersection will intersect an existing partition with a parent index space in order to generate a new partition where each subregion is the intersection of the parent with the corresponding subregion in the original partition. We require that the partition and the parent index space both have the same dimensionality and coordinate type, but they can be otherwise unrelated. The application can also optionally indicate that the parent will dominate all the subregions in the partition which will allow the runtime to elide the intersection test and turn this into a partition copy operation.

Parameters
ctxthe enclosing task context
parentthe new parent index space for the mirrored partition
partitionthe partition to mirror
part_kindoptinally specify the completenss of the partition
coloroptional new color for the mirrored partition
provenancean optional string describing the provenance information for this operation
dominateswhether the parent dominates the partition

◆ create_partition_by_preimage()

IndexPartition Legion::Runtime::create_partition_by_preimage ( Context  ctx,
IndexPartition  projection,
LogicalRegion  handle,
LogicalRegion  parent,
FieldID  fid,
IndexSpace  color_space,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
MapperID  id = 0,
MappingTagID  tag = 0,
UntypedBuffer  map_arg = UntypedBuffer(),
const char *  provenance = NULL 
)


Create partition by premimage performs the opposite operation of create partition by image. The function will create a new index partition of the index space of 'handle' by projecting it through another index space 'projection'. The field contained in 'fid' of the logical region 'handle' must contain pointers into 'projection' index space. For each 'pointer' in the index space of 'handle', this function will compute its equivalent pointer into the index space tree of 'projection' by looking it up in the field 'fid'. The input pointer will be assigned to analogous index subspaces for each of the index subspaces in 'projection' that its projected pointer belonged to. The runtime will compute if the resulting partition is disjoint. The user can also assign a color to the new index partition with the 'color' argument.

Parameters
ctxthe enclosing task context
projectionthe index partition being projected
handlelogical region over which to evaluate the function
parentthe parent region from which privileges are derived
fidthe field ID of the 'handle' logical region containing the function being evaluated
color_spacethe space of colors for the partition
part_kindspecify the kind of partition
coloroptional new color for the index partition
idthe ID of the mapper to use for mapping field
tagthe mapper tag to provide context to the mapper
map_argan untyped buffer for the mapper data of the Partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the index space of 'handle'

◆ create_partition_by_rectangles()

template<int DIM, typename COORD_T , int COLOR_DIM, typename COLOR_COORD_T >
IndexPartitionT<DIM,COORD_T> Legion::Runtime::create_partition_by_rectangles ( Context  ctx,
IndexSpaceT< DIM, COORD_T >  parent,
const std::map< Point< COLOR_DIM, COLOR_COORD_T >, std::vector< Rect< DIM, COORD_T > > > &  rectangles,
IndexSpaceT< COLOR_DIM, COLOR_COORD_T >  color_space,
bool  perform_intersections = true,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL,
bool  collective = false 
)

Create partition by rectangles is a special case of partition by domain that will create a partition from a list of rectangles supplied for each point in the color space.

Parameters
ctxthe enclosing task context
parentthe parent index space to be partitioned
rectanglesmap of rectangle lists for each point
color_spacethe color space for the partition
perform_intersectionsintersect domains with parent space
part_kindspecify the partition kind or ask to compute it
colorthe color of the result of the partition
provenancean optional string describing the provenance information for this operation
collectivewhether shards from a control replicated context should work collectively to construct the map
Returns
a new index partition of the parent index space

◆ create_partition_by_restriction()

IndexPartition Legion::Runtime::create_partition_by_restriction ( Context  ctx,
IndexSpace  parent,
IndexSpace  color_space,
DomainTransform  transform,
Domain  extent,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

Create partition by restriction will make a new partition of a logical region by computing new restriction bounds for each of the different subregions. All the sub-regions will have the same 'extent' (e.g. contain the same number of initial points). The particular location of the extent for each sub-region is determined by taking a point in the color space and transforming it by multiplying it by a 'transform' matrix to compute a 'delta' for the particular subregion. This 'delta' is then added to the bounds of the 'extent' rectangle to generate a new bounding rectangle for the subregion of the given color. The runtime will also automatically intersect the resulting bounding rectangle with the original bounds of the parent region to ensure proper containment. This may result in empty subregions.

Parameters
ctxthe enclosing task context
parentthe parent index space to be partitioned
color_spacethe color space of the partition
transforma matrix transformation to be performed on each color
extentthe rectangle shape of each of the bounds
part_kindthe specify the partition kind
coloroptional new color for the index partition
provenancean optional string describing the provenance information for this operation
Returns
a new index partition of the parent index space

◆ create_partition_by_union()

IndexPartition Legion::Runtime::create_partition_by_union ( Context  ctx,
IndexSpace  parent,
IndexPartition  handle1,
IndexPartition  handle2,
IndexSpace  color_space,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

This function zips a union operation over all the index subspaces in two different partitions. The zip operation is only applied to the points contained in the intersection of the two color spaces. The corresponding pairs of index spaces are unioned together and assigned to the same color in the new index partition. The resulting partition is created off the 'parent' index space. In order to be sound the parent must be an ancestor of both index partitions. The kind of partition (e.g. disjoint or aliased) can be specified with the 'part_kind' argument. This argument can also be used to request that the runtime compute the kind of partition. The user can assign a color to the new partition by the 'color' argument.

Parameters
ctxthe enclosing task context
parentthe parent index space for the new partition
handle1first index partition
handle2second index partition
color_spacespace of colors to zip over
part_kindindicate the kind of partition
colorthe new color for the index partition
provenancean optional string describing the provenance information for this operation
Returns
name of the created index partition

◆ create_partition_by_weights()

IndexPartition Legion::Runtime::create_partition_by_weights ( Context  ctx,
IndexSpace  parent,
const std::map< DomainPoint, int > &  weights,
IndexSpace  color_space,
size_t  granularity = 1,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

Create 'color_space' index spaces (one for each point) to partition the parent 'parent' index space using the 'weights' to proportionally size the resulting subspaces. By definition the resulting partition will be disjoint. Users can also specify a minimum 'granularity' for the size of the index subspaces. Users can specify an optional 'color' for the name of the created index partition.

Parameters
ctxthe enclosing task context
parentindex space of the partition to be made
weightsper-color weights for sizing output regions
color_spacespace of the colors to create
granularitythe minimum size of the index subspaces
coloroptional color parameter for the partition
provenancean optional string describing the provenance information for this operation
Returns
name of the created index partition

◆ create_pending_partition()

IndexPartition Legion::Runtime::create_pending_partition ( Context  ctx,
IndexSpace  parent,
IndexSpace  color_space,
PartitionKind  part_kind = LEGION_COMPUTE_KIND,
Color  color = LEGION_AUTO_GENERATE_ID,
const char *  provenance = NULL 
)

Create a new index partition in which the individual sub-regions will computed by one of the following calls:

  • create_index_space_union (2 variants)
  • create_index_space_intersection (2 variants)
  • create_index_space_difference Once this call is made the application can immediately retrieve the names of the new sub-regions corresponding to each the different colors in the color space. However, it is the responsibility of the application to ensure that it actually computes an index space for each of the colors. Undefined behavior will result if the application tries to assign to a color of an index space more than once. If the runtime is asked to compute the disjointness, the application must assign values to each of the different subspace colors before querying the disjointness or deadlock will likely result (unless a different task is guaranteed to compute any remaining index subspaces).
    Parameters
    ctxthe enclosing task context
    parentthe parent index space for the partition
    color_spacethe color space for the new partition
    part_kindoptionally specify the partition kind
    coloroptionally assign a color to the partition
    provenancean optional string describing the provenance information for this operation
    Returns
    handle of the new index partition

◆ create_phase_barrier()

PhaseBarrier Legion::Runtime::create_phase_barrier ( Context  ctx,
unsigned  arrivals 
)

Create a new phase barrier with an expected number of arrivals. Note that this number of arrivals is the number of arrivals performed on each generation of the phase barrier and cannot be changed.

Parameters
ctxenclosing task context
arrivalsnumber of arrivals on the barrier
Returns
a new phase barrier handle

◆ create_predicate() [1/2]

Predicate Legion::Runtime::create_predicate ( Context  ctx,
const Future f,
const char *  provenance = NULL 
)

Create a new predicate value from a future. The future passed must be a boolean future.

Parameters
ctxenclosing task context
ffuture value to convert to a predicate
provenancean optional string describing the provenance information for this operation
Returns
predicate value wrapping the future

◆ create_predicate() [2/2]

Predicate Legion::Runtime::create_predicate ( Context  ctx,
const PredicateLauncher launcher 
)

Generic predicate constructor for an arbitrary number of predicates

Parameters
ctxenclosing task context
launcherthe predicate launcher #return predicate value of combining other predicates

◆ create_shared_ownership() [1/4]

void Legion::Runtime::create_shared_ownership ( Context  ctx,
FieldSpace  handle 
)

Create a new shared ownership of a field space to prevent it from being destroyed by other potential owners. Every call to this method that succeeds must be matched with a corresponding call to destroy the field space in order for the field space to actually be deleted. The field space must not have been destroyed prior to this call being performed.

Parameters
ctxthe enclosing task context
handlefor field space to request ownership for

◆ create_shared_ownership() [2/4]

void Legion::Runtime::create_shared_ownership ( Context  ctx,
IndexPartition  handle 
)

Create a new shared ownership of an index partition to prevent it from being destroyed by other potential owners. Every call to this method that succeeds must be matched with a corresponding call to destroy the index partition in order for the index partition to actually be deleted. The index partition must not have been destroyed prior to this call being performed.

Parameters
ctxthe enclosing task context
handlefor index partition to request ownership for

◆ create_shared_ownership() [3/4]

void Legion::Runtime::create_shared_ownership ( Context  ctx,
IndexSpace  handle 
)

Create a new shared ownership of a top-level index space to prevent it from being destroyed by other potential owners. Every call to this method that succeeds must be matched with a corresponding call to destroy the index space in order for the index space to actually be deleted. The index space must not have been destroyed prior to this call being performed.

Parameters
ctxthe enclosing task context
handlefor top-level index space to request ownership for

◆ create_shared_ownership() [4/4]

void Legion::Runtime::create_shared_ownership ( Context  ctx,
LogicalRegion  handle 
)

Create a new shared ownership of a top-level logical region to prevent it from being destroyed by other potential owners. Every call to this method that succeeds must be matched with a corresponding call to destroy the logical region in order for the logical region to actually be deleted. The logical region must not have been destroyed prior to this call being performed.

Parameters
ctxthe enclosing task context
handlefor top-level logical region to request ownership for

◆ defer_dynamic_collective_arrival()

void Legion::Runtime::defer_dynamic_collective_arrival ( Context  ctx,
DynamicCollective  dc,
const Future f,
unsigned  count = 1 
)

Perform a deferred arrival on a dynamic collective dependent upon a future value. The runtime will automatically pipe the future value through to the dynamic collective.

Parameters
ctxenclosing task context
dcdynamic collective on which to arrive
ffuture to use for performing the arrival
counttotal arrival count

◆ destroy_dynamic_collective()

void Legion::Runtime::destroy_dynamic_collective ( Context  ctx,
DynamicCollective  dc 
)

Destroy a dynamic collective operation. It has the same semantics as the destruction of a phase barrier.

Parameters
ctxenclosing task context
dcdynamic collective to destroy

◆ destroy_field_space()

void Legion::Runtime::destroy_field_space ( Context  ctx,
FieldSpace  handle,
const bool  unordered = false,
const char *  provenance = NULL 
)

Destroy an existing field space.

Parameters
ctxenclosing task context
handleof the field space to be destroyed
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)
provenancean optional string describing the provenance information for this operation

◆ destroy_index_partition()

void Legion::Runtime::destroy_index_partition ( Context  ctx,
IndexPartition  handle,
const bool  unordered = false,
const bool  recurse = true,
const char *  provenance = NULL 
)

Destroy an index partition

Parameters
ctxthe enclosing task context
handleindex partition to be destroyed
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)
recursedestroy the full sub-tree below this partition
provenancean optional string describing the provenance information for this index space

◆ destroy_index_space()

void Legion::Runtime::destroy_index_space ( Context  ctx,
IndexSpace  handle,
const bool  unordered = false,
const bool  recurse = true,
const char *  provenance = NULL 
)

Destroy an existing index space

Parameters
ctxthe enclosing task context
handlethe index space to destroy
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)
recursedelete the full index tree
provenancean optional string describing the provenance information for this index space

◆ destroy_lock()

void Legion::Runtime::destroy_lock ( Context  ctx,
Lock  l 
)

Destroy a lock. This operation will defer the lock destruction until the completion of the task in which the destruction is performed so the user does not need to worry about races with child operations which may be using the lock.

Parameters
ctxenclosing task context
rlock to be destroyed

◆ destroy_logical_partition()

void Legion::Runtime::destroy_logical_partition ( Context  ctx,
LogicalPartition  handle,
const bool  unordered = false 
)

Destroy a logical partition and all of it is logical sub-regions.

Parameters
ctxenclosing task context
handlelogical partition handle to destroy
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)

◆ destroy_logical_region()

void Legion::Runtime::destroy_logical_region ( Context  ctx,
LogicalRegion  handle,
const bool  unordered = false,
const char *  provenance = NULL 
)

Destroy a logical region and all of its logical sub-regions.

Parameters
ctxenclosing task context
handlelogical region handle to destroy
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)
provenancean optional string describing the provenance information for this operation

◆ destroy_phase_barrier()

void Legion::Runtime::destroy_phase_barrier ( Context  ctx,
PhaseBarrier  pb 
)

Destroy a phase barrier. This operation will defer the phase barrier destruciton until the completion of the task in which in the destruction is performed so the the user does not need to worry about races with child operations which may still be using the phase barrier.

Parameters
ctxenclosing task context
pbphase barrier to be destroyed

◆ detach_external_resource()

Future Legion::Runtime::detach_external_resource ( Context  ctx,
PhysicalRegion  region,
const bool  flush = true,
const bool  unordered = false,
const char *  provenance = NULL 
)

Detach an external resource from a logical region

Parameters
ctxenclosing task context
regionthe physical region for the external resource
flushcopy out data to the physical region before detaching
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)
provenancean optional string describing the provenance information for this operation
Returns
an empty future indicating when the resource is detached

◆ detach_external_resources()

Future Legion::Runtime::detach_external_resources ( Context  ctx,
ExternalResources  external,
const bool  flush = true,
const bool  unordered = false,
const char *  provenance = NULL 
)

Detach multiple external resources that were all created by a common call to 'attach_external_resources'.

Parameters
ctxenclosing task context
externalthe external resources to detach
flushcopy out data to the physical region before detaching
unorderedset to true if this is performed by a different thread than the one for the task (e.g a garbage collector)
provenancean optional string describing the provenance information for this operation
Returns
an empty future indicating when the resources are detached

◆ detach_file()

void Legion::Runtime::detach_file ( Context  ctx,
PhysicalRegion  region 
)
Deprecated:
Detach an normal file. THis detach operation is similar to detach_hdf5

◆ detach_hdf5()

void Legion::Runtime::detach_hdf5 ( Context  ctx,
PhysicalRegion  region 
)
Deprecated:
Detach an HDF5 file. This can only be performed on a physical region that was created by calling attach_hdf5. The runtime will properly defer the detach call until all other operations on the logical region are complete. It is the responsibility of the user to perform the necessary operations to flush any data back to the physical instance before detaching (e.g. releasing coherence, etc). If the physical region is still mapped when this function is called, then it will be unmapped by this call. Note that this file may not actually get detached until much later in the execution of the program due to Legion's deferred execution model.
Parameters
ctxenclosing task context
regionthe physical region for an HDF5 file to detach

◆ disable_profiling()

static void Legion::Runtime::disable_profiling ( void  )
static

Disable recording of profiling information.

◆ discard_fields()

void Legion::Runtime::discard_fields ( Context  ctx,
const DiscardLauncher launcher 
)

Discard the data inside the fields of a particular logical region

Parameters
ctxenclosing task context
launcherthe launcher that describes the discard operation

◆ dump_profiling()

static void Legion::Runtime::dump_profiling ( void  )
static

Dump the current profiling information to file.

◆ enable_profiling()

static void Legion::Runtime::enable_profiling ( void  )
static

Enable recording of profiling information.

◆ end_mapper_call()

void Legion::Runtime::end_mapper_call ( Mapping::MapperContext  ctx)

End a mapper call from the application side. This must be done for all mapper contexts created by calls into begin_mapper_call.

Parameters
ctxmapper context to end

◆ end_static_trace()

void Legion::Runtime::end_static_trace ( Context  ctx)

Finish a static trace of operations

Parameters
ctxthe enclosing task context

◆ end_trace()

void Legion::Runtime::end_trace ( Context  ctx,
TraceID  tid,
const char *  provenance = NULL 
)

Mark the end of trace that was being performed.

◆ execute_index_space() [1/4]

Future Legion::Runtime::execute_index_space ( Context  ctx,
const IndexTaskLauncher launcher,
ReductionOpID  redop,
bool  ordered = true,
std::vector< OutputRequirement > *  outputs = NULL 
)

Launch an index space of tasks with arguments specified by the index launcher configuration. Reduce all the return values into a single value using the specified reduction operator into a single future value. The reduction operation must be a foldable reduction.

See also
IndexTaskLauncher
Parameters
ctxenclosing task context
launcherthe task launcher configuration
redopID for the reduction op to use for reducing return values
orderedrequest that the reduced future value be computed in an ordered way so that all shards see a consistent result, this is more expensive than unordered which allows for the creation of a butterfly all-reduce network across the shards, integer reductions should be safe to use with the unordered mode and still give the same result on each shard whereas floating point reductions may produce different answers on each shard if ordered is set to false
outputsoptional output requirements
Returns
a future result representing the reduction of all the return values from the index space of tasks

◆ execute_index_space() [2/4]

FutureMap Legion::Runtime::execute_index_space ( Context  ctx,
const IndexTaskLauncher launcher,
std::vector< OutputRequirement > *  outputs = NULL 
)

Launch an index space of tasks with arguments specified by the index launcher configuration.

See also
IndexTaskLauncher
Parameters
ctxenclosing task context
launcherthe task launcher configuration
outputsoptional output requirements
Returns
a future map for return values of the points in the index space of tasks

◆ execute_index_space() [3/4]

FutureMap Legion::Runtime::execute_index_space ( Context  ctx,
TaskID  task_id,
const Domain  domain,
const std::vector< IndexSpaceRequirement > &  indexes,
const std::vector< FieldSpaceRequirement > &  fields,
const std::vector< RegionRequirement > &  regions,
const UntypedBuffer global_arg,
const ArgumentMap arg_map,
const Predicate predicate = Predicate::TRUE_PRED,
bool  must_paralleism = false,
MapperID  id = 0,
MappingTagID  tag = 0 
)
Deprecated:
An older method for launching an index space of tasks maintained for backwards compatibility with older Legion programs.
Parameters
ctxenclosing task context
task_idthe ID of the task to launch
domainfor the set of points in the index space to create
indexesthe index space requirements for the tasks
fieldsthe field space requirements for the tasks
regionsthe region requirements for the tasks
global_arguntyped arguments passed by value to all tasks
arg_mapargument map containing point arguments for tasks
predicatefor controlling speculation
must_parallelismare tasks required to be run concurrently
idof the mapper to associate with the task
tagmapping tag to be passed to any mapping calls
Returns
future map containing results for all tasks

◆ execute_index_space() [4/4]

Future Legion::Runtime::execute_index_space ( Context  ctx,
TaskID  task_id,
const Domain  domain,
const std::vector< IndexSpaceRequirement > &  indexes,
const std::vector< FieldSpaceRequirement > &  fields,
const std::vector< RegionRequirement > &  regions,
const UntypedBuffer global_arg,
const ArgumentMap arg_map,
ReductionOpID  reduction,
const UntypedBuffer initial_value,
const Predicate predicate = Predicate::TRUE_PRED,
bool  must_parallelism = false,
MapperID  id = 0,
MappingTagID  tag = 0 
)
Deprecated:
An older method for launching an index space of tasks that reduce all of their values by a reduction operation down to a single future. Maintained for backwards compatibility with older Legion programs.
Parameters
ctxenclosing task context
task_idthe ID of the task to launch
domainfor the set of points in the index space to create
indexesthe index space requirements for the tasks
fieldsthe field space requirements for the tasks
regionsthe region requirements for the tasks
global_arguntyped arguments passed by value to all tasks
arg_mapargument map containing point arguments for tasks
reductionoperation to be used for reducing return values
predicatefor controlling speculation
must_parallelismare tasks required to be run concurrently
idof the mapper to associate with the task
tagmapping tag to be passed to any mapping calls
Returns
future containing reduced return value of all tasks

◆ execute_must_epoch()

FutureMap Legion::Runtime::execute_must_epoch ( Context  ctx,
const MustEpochLauncher launcher 
)

Launch a collection of operations that all must be guaranteed to execute in parallel. This construct is necessary for ensuring the correctness of tasks which use simultaneous coherence and perform synchronization between different physical instances (e.g. using phase barriers or reservations).

◆ execute_task() [1/2]

Future Legion::Runtime::execute_task ( Context  ctx,
const TaskLauncher launcher,
std::vector< OutputRequirement > *  outputs = NULL 
)

Launch a single task with arguments specified by the configuration of the task launcher.

See also
TaskLauncher
Parameters
ctxenclosing task context
launcherthe task launcher configuration
outputsoptional output requirements
Returns
a future for the return value of the task

◆ execute_task() [2/2]

Future Legion::Runtime::execute_task ( Context  ctx,
TaskID  task_id,
const std::vector< IndexSpaceRequirement > &  indexes,
const std::vector< FieldSpaceRequirement > &  fields,
const std::vector< RegionRequirement > &  regions,
const UntypedBuffer arg,
const Predicate predicate = Predicate::TRUE_PRED,
MapperID  id = 0,
MappingTagID  tag = 0 
)
Deprecated:
An older method for launching a single task maintained for backwards compatibility with older Legion programs.
Parameters
ctxenclosing task context
task_idthe ID of the task to launch
indexesthe index space requirements for the task
fieldsthe field space requirements for the task
regionsthe region requirements for the task
arguntyped arguments passed by value to the task
predicatefor controlling speculation
idof the mapper to associate with the task
tagmapping tag to be passed to any mapping calls
Returns
future representing return value of the task

◆ fill_field() [1/3]

template<typename T >
void Legion::Runtime::fill_field ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
FieldID  fid,
const T &  value,
Predicate  pred = Predicate::TRUE_PRED 
)

Fill the specified field by setting all the entries in the index space from the given logical region to a specified value. Importantly this operation is done lazily so that the writes only need to happen the next time the field is used and therefore it is a very inexpensive operation to perform. This operation requires read-write privileges on the requested field.

Parameters
ctxenclosing task context
handlethe logical region on which to fill the field
parentthe parent region from which privileges are derived
fidthe field to fill
valuethe value to assign to all the entries
predthe predicate for this operation

◆ fill_field() [2/3]

void Legion::Runtime::fill_field ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
FieldID  fid,
const void *  value,
size_t  value_size,
Predicate  pred = Predicate::TRUE_PRED 
)

This version of fill field is exactly the same as the one above, but is untyped and allows the value to be specified as a buffer with a size. The runtime will make a copy of the buffer. This operation requires read-write privileges on the field.

Parameters
ctxenclosing task context
handlethe logical region on which to fill the field
parentthe parent region from which privileges are derived
fidthe field to fill
valuepointer to the buffer containing the value to be used
value_sizesize of the buffer in bytes
predthe predicate for this operation

◆ fill_field() [3/3]

void Legion::Runtime::fill_field ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
FieldID  fid,
Future  f,
Predicate  pred = Predicate::TRUE_PRED 
)

This version of fill field is exactly the same as the one above, but uses a future value. This operation requires read-write privileges on the field.

Parameters
ctxenclosing task context
handlethe logical region on which to fill the field
parentthe parent region from which privileges are derived
fidthe field to fill
valuepointer to the buffer containing the value to be used
value_sizesize of the buffer in bytes
predthe predicate for this operation

◆ fill_fields() [1/5]

void Legion::Runtime::fill_fields ( Context  ctx,
const FillLauncher launcher 
)

Perform a fill operation using a launcher which specifies all of the parameters of the launch.

Parameters
ctxenclosing task context
launcherthe launcher that describes the fill operation

◆ fill_fields() [2/5]

void Legion::Runtime::fill_fields ( Context  ctx,
const IndexFillLauncher launcher 
)

Perform an index fill operation using a launcher which specifies all the parameters of the launch.

Parameters
ctxenclosing task context
launcherthe launcher that describes the index fill operation

◆ fill_fields() [3/5]

template<typename T >
void Legion::Runtime::fill_fields ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
const std::set< FieldID > &  fields,
const T &  value,
Predicate  pred = Predicate::TRUE_PRED 
)

Fill multiple fields of a logical region with the same value. This operation requires read-write privileges on the fields.

Parameters
ctxenclosing task context
handlethe logical region on which to fill the field
parentthe parent region from which privileges are derived
fieldsthe set of fields to fill
valuethe value to assign to all the entries
predthe predicate for this operation

◆ fill_fields() [4/5]

void Legion::Runtime::fill_fields ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
const std::set< FieldID > &  fields,
const void *  value,
size_t  value_size,
Predicate  pred = Predicate::TRUE_PRED 
)

Fill multiple fields of a logical region with the same value. The runtime will make a copy of the buffer passed. This operation requires read-write privileges on the fields.

Parameters
ctxenclosing task context
handlethe logical region on which to fill the field
parentthe parent region from which privileges are derived
fieldsthe set of fields to fill
valuepointer to the buffer containing the value to be used
value_sizesize of the buffer in bytes
predthe predicate for this operation

◆ fill_fields() [5/5]

void Legion::Runtime::fill_fields ( Context  ctx,
LogicalRegion  handle,
LogicalRegion  parent,
const std::set< FieldID > &  fields,
Future  f,
Predicate  pred = Predicate::TRUE_PRED 
)

Fill multiple fields of a logical region with the same future value. This operation requires read-write privileges on the fields.

Parameters
ctxenclosing task context
handlethe logical region on which to fill the field
parentthe parent region from which privileges are derived
fieldsthe set of fields to fill
futurethe future value to use for filling the fields
predthe predicate for this operation

◆ find_forward_MPI_mapping()

const std::map<int,AddressSpace>& Legion::Runtime::find_forward_MPI_mapping ( void  )

Return a reference to the mapping from MPI ranks to address spaces. This method is only valid if the static initialization method 'configure_MPI_interoperability' was called on all nodes before starting the runtime with the static 'start' method.

Returns
a const reference to the forward map

◆ find_local_MPI_rank()

int Legion::Runtime::find_local_MPI_rank ( void  )

Return the local MPI rank ID for the current Legion runtime

◆ find_reverse_MPI_mapping()

const std::map<AddressSpace,int>& Legion::Runtime::find_reverse_MPI_mapping ( void  )

Return a reference to the reverse mapping from address spaces to MPI ranks. This method is only valid if the static initialization method 'configure_MPI_interoperability' was called on all nodes before starting the runtime with the static 'start' method.

Returns
a const reference to the reverse map

◆ finish_implicit_task()

void Legion::Runtime::finish_implicit_task ( Context  ctx,
Realm::Event  effects = Realm::Event::NO_EVENT 
)

This is the final method for marking the end of an implicit top-level task. If there are any asynchronous effects that were launched during the implicit top-level task (such as a CUDA kernel launch) then users are required to capture all those effects as a Realm event to tell Legion when all those effects are completed. Finishing an implicit top-level task still requires waiting explicitly for the runtime to shutdown. The Context object is no longer valid after this call.

◆ generate_dynamic_mapper_id()

MapperID Legion::Runtime::generate_dynamic_mapper_id ( void  )

Dynamically generate a unique Mapper ID for use across the machine

Returns
a Mapper ID that is globally unique across the machine

◆ generate_dynamic_projection_id()

ProjectionID Legion::Runtime::generate_dynamic_projection_id ( void  )

Dynamically generate a unique projection ID for use across the machine @reutrn a ProjectionID that is globally unique across the machine

◆ generate_dynamic_reduction_id()

ReductionOpID Legion::Runtime::generate_dynamic_reduction_id ( void  )

Dynamically generate a unique reduction ID for use across the machine

Returns
a ReductionOpID that is globally unique across the machine

◆ generate_dynamic_serdez_id()

CustomSerdezID Legion::Runtime::generate_dynamic_serdez_id ( void  )

Dynamically generate a unique serdez ID for use across the machine

Returns
a CustomSerdezID that is globally unique across the machine

◆ generate_dynamic_sharding_id()

ShardingID Legion::Runtime::generate_dynamic_sharding_id ( void  )

Dynamically generate a unique sharding ID for use across the machine

Returns
a ShardingID that is globally unique across the machine

◆ generate_dynamic_task_id()

TaskID Legion::Runtime::generate_dynamic_task_id ( void  )

Dynamically generate a unique Task ID for use across the machine

Returns
a Task ID that is globally unique across the machine

◆ generate_dynamic_trace_id()

TraceID Legion::Runtime::generate_dynamic_trace_id ( void  )

Dynamically generate a unique TraceID for use across the machine

Returns
a TraceID that is globally unique across the machine

◆ generate_library_mapper_ids()

MapperID Legion::Runtime::generate_library_mapper_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of MapperIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of mapper IDs that should be generated
Returns
the first mapper ID that is allocated to the library

◆ generate_library_projection_ids()

ProjectionID Legion::Runtime::generate_library_projection_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of ProjectionIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of projection IDs that should be generated
Returns
the first projection ID that is allocated to the library

◆ generate_library_reduction_ids()

ReductionOpID Legion::Runtime::generate_library_reduction_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of ReductionOpIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of reduction IDs that should be generated
Returns
the first reduction ID that is allocated to the library

◆ generate_library_serdez_ids()

CustomSerdezID Legion::Runtime::generate_library_serdez_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of CustomSerdezIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of serdez IDs that should be generated
Returns
the first serdez ID that is allocated to the library

◆ generate_library_sharding_ids()

ShardingID Legion::Runtime::generate_library_sharding_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of ShardingIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of sharding IDs that should be generated
Returns
the first sharding ID that is allocated to the library

◆ generate_library_task_ids()

TaskID Legion::Runtime::generate_library_task_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of TaskIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of task IDs that should be generated
Returns
the first task ID that is allocated to the library

◆ generate_library_trace_ids()

TraceID Legion::Runtime::generate_library_trace_ids ( const char *  name,
size_t  count 
)

Generate a contiguous set of TraceIDs for use by a library. This call will always generate the same answer for the same library name no many how many times it is called or on how many nodes it is called. If the count passed in to this method differs for the same library name the runtime will raise an error.

Parameters
namea unique null-terminated string that names the library
countthe number of trace IDs that should be generated
Returns
the first TraceID that is allocated to the library

◆ generate_static_mapper_id()

static MapperID Legion::Runtime::generate_static_mapper_id ( void  )
static

Statically generate a unique Mapper ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all nodes in the machine prior to starting the rutnime.

Returns
a MapperID that is globally unique across the machine

◆ generate_static_projection_id()

static ProjectionID Legion::Runtime::generate_static_projection_id ( void  )
static

Statically generate a unique Projection ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all the nodes in the machine prior to starting the runtime.

Returns
a ProjectionID that is globally unique across the machine

◆ generate_static_reduction_id()

static ReductionOpID Legion::Runtime::generate_static_reduction_id ( void  )
static

Statically generate a unique reduction ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all the nodes in the machine prior to starting the runtime.

Returns
a ReductionOpID that is globally unique across the machine

◆ generate_static_serdez_id()

static CustomSerdezID Legion::Runtime::generate_static_serdez_id ( void  )
static

Statically generate a unique serdez ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all the nodes in the machine prior to starting the runtime.

Returns
a CustomSerdezID that is globally unique across the machine

◆ generate_static_sharding_id()

static ShardingID Legion::Runtime::generate_static_sharding_id ( void  )
static

Statically generate a unique Sharding ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all the nodes in the machine prior to starting the runtime.

Returns
ShardingID that is globally unique across the machine

◆ generate_static_task_id()

static TaskID Legion::Runtime::generate_static_task_id ( void  )
static

Statically generate a unique Task ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all nodes in the machine prior to starting the runtime.

Returns
a TaskID that is globally unique across the machine

◆ generate_static_trace_id()

static TraceID Legion::Runtime::generate_static_trace_id ( void  )
static

Statically generate a unique Trace ID for use across the machine. This can only be called prior to the runtime starting. It must be invoked symmetrically across all the nodes in the machine prior to starting the runtime.

Returns
a TraceID that is globally unique across the machine

◆ get_context()

static Context Legion::Runtime::get_context ( void  )
static

Get the context for the currently executing task this must be called inside of an actual Legion task. Calling it outside of a Legion task will result in undefined behavior

Returns
the context for the enclosing task in which we are executing

◆ get_context_task()

static const Task* Legion::Runtime::get_context_task ( Context  ctx)
static

Get the task object associated with a context

Parameters
ctxenclosing processor context
Returns
the task representation of the context

◆ get_current_task()

const Task* Legion::Runtime::get_current_task ( Context  ctx)

Return a pointer to the task object for the currently executing task.

Parameters
ctxenclosing task context
Returns
a pointer to the Task object for the current task

◆ get_current_time()

Future Legion::Runtime::get_current_time ( Context  ctx,
Future  precondition = Future() 
)

Issue an operation into the stream to record the current time in seconds. The resulting future should be interpreted as a 'double' that represents the absolute time when this measurement was taken. The operation can be given an optional future which will not be interpreted, but will be used as a precondition to ensure that the measurement will not be taken until the precondition is complete.

◆ get_current_time_in_microseconds()

Future Legion::Runtime::get_current_time_in_microseconds ( Context  ctx,
Future  precondition = Future() 
)

Issue an operation into the stream to record the current time in microseconds. The resulting future should be interpreted as a 'long long' with no fractional microseconds. The operation can be givien an optional future precondition which will not be interpreted, but ill be used as a precondition to ensure that the measurement will not be taken until the precondition is complete.

◆ get_current_time_in_nanoseconds()

Future Legion::Runtime::get_current_time_in_nanoseconds ( Context  ctx,
Future  precondition = Future() 
)

Issue an operation into the stream to record the current time in nanoseconds. The resulting future should be interpreted as a 'long long' with no fractional nanoseconds. The operation can be givien an optional future precondition which will not be interpreted, but ill be used as a precondition to ensure that the measurement will not be taken until the precondition is complete.

◆ get_dynamic_collective_result()

Future Legion::Runtime::get_dynamic_collective_result ( Context  ctx,
DynamicCollective  dc,
const char *  provenance = NULL 
)

This will return the value of a dynamic collective in the form of a future. Applications can then use this future just like all other futures.

Parameters
ctxenclosing task context
dcdynamic collective on which to get the result
provenancean optional string describing the provenance information for this operation
Returns
future value that contains the result of the collective

◆ get_executing_processor()

Processor Legion::Runtime::get_executing_processor ( Context  ctx)

Return the processor on which the current task is being executed.

Parameters
ctxenclosing task context
Returns
the processor on which the task is running

◆ get_field_size()

size_t Legion::Runtime::get_field_size ( Context  ctx,
FieldSpace  handle,
FieldID  fid 
)

Get the size of a specific field within field space.

Parameters
ctxenclosing task context
handlefield space handle
fidfield ID for which to find the size
Returns
the size of the field in bytes

◆ get_field_space_fields() [1/2]

void Legion::Runtime::get_field_space_fields ( Context  ctx,
FieldSpace  handle,
std::set< FieldID > &  fields 
)

Get the IDs of the fields currently allocated in a field space.

Parameters
ctxenclosing task context
handlefield space handle
setin which to place the field IDs

◆ get_field_space_fields() [2/2]

void Legion::Runtime::get_field_space_fields ( Context  ctx,
FieldSpace  handle,
std::vector< FieldID > &  fields 
)

Get the IDs of the fields currently allocated in a field space.

Parameters
ctxenclosing task context
handlefield space handle
setin which to place the field IDs

◆ get_index_partition()

IndexPartition Legion::Runtime::get_index_partition ( Context  ctx,
IndexSpace  parent,
Color  color 
)

Return the index partitioning of an index space with the assigned color.

Parameters
ctxenclosing task context
parentindex space
colorof index partition
Returns
handle for the index partition with the specified color

◆ get_index_partition_color()

Color Legion::Runtime::get_index_partition_color ( Context  ctx,
IndexPartition  handle 
)

Return the color for the corresponding index partition in in relation to its parent logical region.

Parameters
ctxenclosing task context
handlethe index partition for which to find the color
Returns
the color for the index partition

◆ get_index_partition_color_space()

Domain Legion::Runtime::get_index_partition_color_space ( Context  ctx,
IndexPartition  p 
)

Return a domain that represents the color space for the specified partition.

Parameters
ctxenclosing task context
phandle for the index partition
Returns
a domain for the color space of the specified partition

◆ get_index_partition_color_space_name()

IndexSpace Legion::Runtime::get_index_partition_color_space_name ( Context  ctx,
IndexPartition  p 
)

Return the name of the color space for a partition

Parameters
ctxenclosing task context
phandle for the index partition
Returns
the name of the color space of the specified partition

◆ get_index_partition_depth()

unsigned Legion::Runtime::get_index_partition_depth ( Context  ctx,
IndexPartition  handle 
)

Return the depth in the index space tree of the given index partition.

Parameters
ctxenclosing task context
handlethe index partition
Returns
depth in the index space tree of the index partition

◆ get_index_space_color()

Color Legion::Runtime::get_index_space_color ( Context  ctx,
IndexSpace  handle 
)

Return the color for the corresponding index space in its member partition. If it is a top-level index space then zero will be returned.

Parameters
ctxenclosing task context
handlethe index space for which to find the color
Returns
the color for the index space

◆ get_index_space_depth()

unsigned Legion::Runtime::get_index_space_depth ( Context  ctx,
IndexSpace  handle 
)

Return the depth in the index space tree of the given index space.

Parameters
ctxenclosing task context
handlethe index space
Returns
depth in the index space tree of the index space

◆ get_index_space_domain()

Domain Legion::Runtime::get_index_space_domain ( Context  ctx,
IndexSpace  handle 
)

Return the domain corresponding to the specified index space if it exists

Parameters
ctxenclosing task context
handleindex space handle
Returns
the domain corresponding to the index space

◆ get_index_space_domains()

void Legion::Runtime::get_index_space_domains ( Context  ctx,
IndexSpace  handle,
std::vector< Domain > &  domains 
)
Deprecated:
Return the domains that represent the index space. While the previous call only works when there is a single domain for the index space, this call will work in all circumstances.
Parameters
ctxenclosing task context
handleindex space handle
vectorto populate with domains

◆ get_index_space_partition_colors()

void Legion::Runtime::get_index_space_partition_colors ( Context  ctx,
IndexSpace  sp,
std::set< Color > &  colors 
)

Return a set that contains the colors of all the partitions of the index space. It is unlikely the colors are numerically dense which precipitates the need for a set.

Parameters
ctxenclosing task context
sphandle for the index space
colorsreference to the set object in which to place the colors

◆ get_index_subspace()

IndexSpace Legion::Runtime::get_index_subspace ( Context  ctx,
IndexPartition  p,
Color  color 
)

Return the index subspace of an index partitioning with the specified color.

Parameters
ctxenclosing task context
pparent index partitioning
colorof the index sub-space
Returns
handle for the index space with the specified color

◆ get_input_args()

static const InputArgs& Legion::Runtime::get_input_args ( void  )
static

This method can be used to retrieve the default arguments passed into the runtime at the start call from any point in the machine.

Returns
a reference to the input arguments passed in at start-up

◆ get_layout_constraint_field_space()

FieldSpace Legion::Runtime::get_layout_constraint_field_space ( LayoutConstraintID  layout_id)

Get the field space for a specific layout description

Parameters
layout_idthe layout ID for which to obtain the field space
Returns
the field space handle for the layout description

◆ get_layout_constraints()

void Legion::Runtime::get_layout_constraints ( LayoutConstraintID  layout_id,
LayoutConstraintSet &  layout_constraints 
)

Get the constraints for a specific layout description

Parameters
layout_idthe layout ID for which to obtain the constraints
layout_constraintsa LayoutConstraintSet to populate

◆ get_layout_constraints_name()

const char* Legion::Runtime::get_layout_constraints_name ( LayoutConstraintID  layout_id)

Get the name associated with a particular layout description

Parameters
layout_idthe layout ID for which to obtain the name
Returns
a pointer to a string of the name of the layou description

◆ get_legion_version()

static const char* Legion::Runtime::get_legion_version ( void  )
static

Return a string representing the Legion version. This string can be compared in application code against the LEGION_VERSION macro defined by legion.h to detect header/library mismatches.

◆ get_local_task()

const Task* Legion::Runtime::get_local_task ( Context  ctx)

Get a reference to the task for the current context.

Parameters
theenclosing task context
Returns
a pointer to the task for the context

◆ get_local_task_variable_untyped()

void* Legion::Runtime::get_local_task_variable_untyped ( Context  ctx,
LocalVariableID  id 
)

Get the value of a task-local variable named by the ID. This variable only has the lifetime of the task

Parameters
ctxthe enclosing task context
idthe ID of the task-local variable to return
Returns
pointer to the value of the variable if any

◆ get_logical_partition()

LogicalPartition Legion::Runtime::get_logical_partition ( Context  ctx,
LogicalRegion  parent,
IndexPartition  handle 
)

Return the logical partition instance of the given index partition in the region tree for the parent logical region.

Parameters
ctxenclosing task context
parentthe logical region parent
handleindex partition handle
Returns
corresponding logical partition in the same tree as the parent region

◆ get_logical_partition_by_color()

LogicalPartition Legion::Runtime::get_logical_partition_by_color ( Context  ctx,
LogicalRegion  parent,
Color  c 
)

Return the logical partition of the logical region parent with the specified color.

Parameters
ctxenclosing task context
parentlogical region
colorfor the specified logical partition
Returns
the logical partition for the specified color

◆ get_logical_partition_by_tree()

LogicalPartition Legion::Runtime::get_logical_partition_by_tree ( Context  ctx,
IndexPartition  handle,
FieldSpace  fspace,
RegionTreeID  tid 
)

Return the logical partition identified by the triple of index partition, field space, and region tree ID.

Parameters
ctxenclosing task context
handleindex partition handle
fspacefield space handle
tidregion tree ID
Returns
the corresponding logical partition

◆ get_logical_partition_color()

Color Legion::Runtime::get_logical_partition_color ( Context  ctx,
LogicalPartition  handle 
)

Return the color for the logical partition corresponding to its location relative to the parent logical region.

Parameters
ctxenclosing task context
handlethe logical partition handle for which to find the color
Returns
the color for the logical partition

◆ get_logical_region_color()

Color Legion::Runtime::get_logical_region_color ( Context  ctx,
LogicalRegion  handle 
)

Return the color for the logical region corresponding to its location in the parent partition. If the region is a top-level region then zero is returned.

Parameters
ctxenclosing task context
handlethe logical region for which to find the color
Returns
the color for the logical region

◆ get_logical_subregion()

LogicalRegion Legion::Runtime::get_logical_subregion ( Context  ctx,
LogicalPartition  parent,
IndexSpace  handle 
)

Return the logical region instance of the given index space in the region tree for the parent logical partition.

Parameters
ctxenclosing task context
parentthe logical partition parent
handleindex space handle
Returns
corresponding logical region in the same tree as the parent partition

◆ get_logical_subregion_by_color()

LogicalRegion Legion::Runtime::get_logical_subregion_by_color ( Context  ctx,
LogicalPartition  parent,
Color  c 
)

Return the logical region of the logical partition parent with the specified color.

Parameters
ctxenclosing task context
parentlogical partition
colorfor the specified logical region
Returns
the logical region for the specified color

◆ get_logical_subregion_by_tree()

LogicalRegion Legion::Runtime::get_logical_subregion_by_tree ( Context  ctx,
IndexSpace  handle,
FieldSpace  fspace,
RegionTreeID  tid 
)

Return the logical partition identified by the triple of index space, field space, and region tree ID.

Parameters
ctxenclosing task context
handleindex space handle
fspacefield space handle
tidregion tree ID
Returns
the corresponding logical region

◆ get_mapper()

Mapping::Mapper* Legion::Runtime::get_mapper ( Context  ctx,
MapperID  id,
Processor  target = Processor::NO_PROC 
)

Retrieve the mapper at the given mapper ID associated with the processor in which this task is executing. This call allows applications to make calls into mappers that they have created to inform that mapper of important application level information.

Parameters
ctxthe enclosing task context
idthe mapper ID for which mapper to locate
targetprocessor if any, if none specified then the executing processor for the current context is used, if specified processor must be local to the address space
Returns
a pointer to the specified mapper object

◆ get_mapper_runtime()

Mapping::MapperRuntime* Legion::Runtime::get_mapper_runtime ( void  )

Get the mapper runtime for passing to a newly created mapper.

Returns
a pointer to the mapper runtime for this Legion instance

◆ get_maximum_dimension()

static size_t Legion::Runtime::get_maximum_dimension ( void  )
static

Return the maximum number of dimensions that Legion was configured to support in this build.

Returns
the maximum number of dimensions that Legion supports

◆ get_output_region()

OutputRegion Legion::Runtime::get_output_region ( Context  ctx,
unsigned  index 
)

Return a single output region of a task.

Parameters
ctxenclosing task context
indexthe output region index to query

◆ get_output_regions()

void Legion::Runtime::get_output_regions ( Context  ctx,
std::vector< OutputRegion > &  regions 
)

Return all output regions of a task.

Parameters
ctxenclosing task context
regionsa vector to which output regions are returned

◆ get_parent_index_partition()

IndexPartition Legion::Runtime::get_parent_index_partition ( Context  ctx,
IndexSpace  handle 
)

Returns the parent partition for the given index space. Use the previous call to check to see if a parent actually exists.

Parameters
ctxenclosing task context
handlefor the index space
Returns
the parent index partition

◆ get_parent_index_space()

IndexSpace Legion::Runtime::get_parent_index_space ( Context  ctx,
IndexPartition  handle 
)

Return the index space parent for the given index partition.

Parameters
ctxenclosing task context
handlefor the index partition
Returns
index space for the parent

◆ get_parent_logical_partition()

LogicalPartition Legion::Runtime::get_parent_logical_partition ( Context  ctx,
LogicalRegion  handle 
)

Return the parent logical partition for a logical region.

Parameters
ctxenclosing task context
handlefor the logical region for which to find a parent
Returns
the parent logical partition

◆ get_parent_logical_region()

LogicalRegion Legion::Runtime::get_parent_logical_region ( Context  ctx,
LogicalPartition  handle 
)

Return the parent logical region for a given logical partition.

Parameters
ctxenclosing task context
handlethe logical partition handle for which to find a parent
Returns
the parent logical region

◆ get_predicate_future()

Future Legion::Runtime::get_predicate_future ( Context  ctx,
const Predicate p,
const char *  provenance = NULL 
)

Get a future value that will be completed when the predicate triggers

Parameters
ctxenclosing task context
predthe predicate for which to get a future
provenancean optional string describing the provenance information for this operation
Returns
a boolean future with the result of the predicate

◆ get_projection_functor()

static ProjectionFunctor* Legion::Runtime::get_projection_functor ( ProjectionID  pid)
static

Return a pointer to a given projection functor object. The runtime retains ownership of this object.

Parameters
pidID of the projection functor to find
Returns
a pointer to the projection functor if it exists

◆ get_reduction_op()

static const ReductionOp* Legion::Runtime::get_reduction_op ( ReductionOpID  redop_id)
static

Return a pointer to a given reduction operation object.

Parameters
redop_idID of the reduction operation to find
Returns
a pointer to the reduction operation object if it exists

◆ get_runtime()

static Runtime* Legion::Runtime::get_runtime ( Processor  p = Processor::NO_PROC)
static

Provide a mechanism for finding the Legion runtime pointer for a processor wrapper tasks that are starting a new application level task.

Parameters
processorthe task will run on
Returns
the Legion runtime pointer for the specified processor

◆ get_serdez_op()

static const SerdezOp* Legion::Runtime::get_serdez_op ( CustomSerdezID  serdez_id)
static

Return a pointer to the given custom serdez operation object.

Parameters
serdez_idID of the serdez operation to find
Returns
a pointer to the serdez operation object if it exists

◆ get_sharding_functor()

static ShardingFunctor* Legion::Runtime::get_sharding_functor ( ShardingID  sid)
static

Return a pointer to a given sharding functor object. The runtime retains ownership of this object.

Parameters
sidID of the sharding functor to find
Returns
a pointer o the sharding functor if it exists

◆ get_tunable_value()

int Legion::Runtime::get_tunable_value ( Context  ctx,
TunableID  tid,
MapperID  mapper = 0,
MappingTagID  tag = 0 
)
Deprecated:
This is the old method for asking the mapper to specify a tunable value. It will assume that the resulting tunable future can be interpreted as an integer.

◆ get_zero_time()

static long long Legion::Runtime::get_zero_time ( void  )
static

Return the base time in nanoseconds on THIS node with which all other aboslute timings can be compared. This value will not change during the course of the lifetime of a Legion application and may therefore be safely cached.

◆ has_context()

static bool Legion::Runtime::has_context ( void  )
static

Test whether we are inside of a Legion task and therefore have a context available. This can be used to see if it is safe to call 'Runtime::get_context'.

Returns
boolean indicating if we are inside of a Legion task

◆ has_index_partition()

bool Legion::Runtime::has_index_partition ( Context  ctx,
IndexSpace  parent,
Color  color 
)

Return true if the index space has an index partition with the specified color.

Parameters
ctxenclosing task context
parentindex space
colorof index partition
Returns
true if an index partition exists with the specified color

◆ has_index_subspace()

bool Legion::Runtime::has_index_subspace ( Context  ctx,
IndexPartition  p,
const DomainPoint color 
)

Return true if the index partition has an index subspace with the specified color.

Parameters
ctxenclosing task context
pparent index partitioning
colorof the index sub-space
Returns
true if an index space exists with the specified color

◆ has_logical_partition_by_color()

bool Legion::Runtime::has_logical_partition_by_color ( Context  ctx,
LogicalRegion  parent,
const DomainPoint c 
)

Return true if the logical region has a logical partition with the specified color.

Parameters
ctxenclosing task context
parentlogical region
colorfor the specified logical partition
Returns
true if the logical partition exists with the specified color

◆ has_logical_subregion_by_color()

bool Legion::Runtime::has_logical_subregion_by_color ( Context  ctx,
LogicalPartition  parent,
const DomainPoint c 
)

Return true if the logical partition has a logical region with the specified color.

Parameters
ctxenclosing task context
parentlogical partition
colorfor the specified logical region
Returns
true if a logical region exists with the specified color

◆ has_multiple_domains()

bool Legion::Runtime::has_multiple_domains ( Context  ctx,
IndexSpace  handle 
)
Deprecated:
Return if the given index space is represented by multiple domains or just a single one. If multiple domains represent the index space then 'get_index_space_domains' should be used for getting the set of domains.
Parameters
ctxenclosing task context
handleindex space handle
Returns
true if the index space has multiple domains

◆ has_parent_index_partition()

bool Legion::Runtime::has_parent_index_partition ( Context  ctx,
IndexSpace  handle 
)

Returns true if the given index space has a parent partition.

Parameters
ctxenclosing task context
handlefor the index space
Returns
true if there is a parent index partition

◆ has_parent_logical_partition()

bool Legion::Runtime::has_parent_logical_partition ( Context  ctx,
LogicalRegion  handle 
)

Return true if the logical region has a parent logical partition.

Parameters
ctxenclosing task context
handlefor the logical region for which to check for a parent
Returns
true if a parent exists

◆ has_runtime()

static bool Legion::Runtime::has_runtime ( void  )
static

Provide a method to test whether the Legion runtime has been started yet or not. Note that this method simply queries at a single point in time and can race with a call to Runtime::start performed by a different thread.

◆ initialize()

static void Legion::Runtime::initialize ( int *  argc,
char ***  argv,
bool  filter = false,
bool  parse = true 
)
static

This 'initialize' method is an optional method that provides users a way to look at the command line arguments before they actually start the Legion runtime. Users will still need to call 'start' in order to actually start the Legion runtime but this way they can do some static initialization and use their own command line parameters to initialize the runtime prior to actually starting it. The resulting 'argc' and 'argv' should be passed into the 'start' method or undefined behavior will occur.

Parameters
argcpointer to an integer in which to store the argument count
argvpointer to array of strings for storing command line args
filterremove any legion and realm command line arguments
parseparse any runtime command line arguments during this call (if set to false parsing happens during start method)

◆ intersect_index_spaces()

IndexSpace Legion::Runtime::intersect_index_spaces ( Context  ctx,
const std::vector< IndexSpace > &  spaces,
const char *  provenance = NULL 
)

Create a new top-level index space by intersecting several existing index spaces

Parameters
ctxthe enclosing task context
spacesthe index spaces to intersect
provenancean optional string describing the provenance information for this index space
Returns
the handle for the new index space

◆ is_index_partition_complete()

bool Legion::Runtime::is_index_partition_complete ( Context  ctx,
IndexPartition  p 
)

Return whether a given index partition is complete

Parameters
ctxenclosing task context
pindex partition handle
Returns
whether the index partition is complete

◆ is_index_partition_disjoint()

bool Legion::Runtime::is_index_partition_disjoint ( Context  ctx,
IndexPartition  p 
)

Return whether a given index partition is disjoint

Parameters
ctxenclosing task context
pindex partition handle
Returns
whether the index partition is disjoint

◆ is_MPI_interop_configured()

bool Legion::Runtime::is_MPI_interop_configured ( void  )
Returns
true if the MPI interop has been established

◆ issue_acquire()

void Legion::Runtime::issue_acquire ( Context  ctx,
const AcquireLauncher launcher 
)

Issue an acquire operation on the specified physical region provided by the acquire launcher. This call should be matched by a release call later in the same context on the same physical region.

◆ issue_copy_operation() [1/2]

void Legion::Runtime::issue_copy_operation ( Context  ctx,
const CopyLauncher launcher 
)

Launch a copy operation from the given configuration of the given copy launcher.

See also
CopyLauncher
Parameters
ctxenclosing task context
launchercopy launcher object

◆ issue_copy_operation() [2/2]

void Legion::Runtime::issue_copy_operation ( Context  ctx,
const IndexCopyLauncher launcher 
)

Launch an index copy operation from the given configuration of the given copy launcher

See also
IndexCopyLauncher
Parameters
ctxenclosing task context
launcherindex copy launcher object

◆ issue_execution_fence()

Future Legion::Runtime::issue_execution_fence ( Context  ctx,
const char *  provenance = NULL 
)

Issue a Legion execution fence in the current context. A Legion execution fence guarantees that all of the tasks issued in the context prior to the fence will finish running before the tasks after the fence begin to map. This will allow the necessary propagation of Legion meta-data such as modifications to the region tree made prior to the fence visible to tasks issued after the fence.

◆ issue_mapping_fence()

Future Legion::Runtime::issue_mapping_fence ( Context  ctx,
const char *  provenance = NULL 
)

Issue a Legion mapping fence in the current context. A Legion mapping fence guarantees that all of the tasks issued in the context prior to the fence will finish mapping before the tasks after the fence begin to map. This can be useful as a performance optimization to minimize the number of mapping independence tests required.

◆ issue_release()

void Legion::Runtime::issue_release ( Context  ctx,
const ReleaseLauncher launcher 
)

Issue a release operation on the specified physical region provided by the release launcher. This call should be preceded by an acquire call earlier in teh same context on the same physical region.

◆ issue_timing_measurement()

Future Legion::Runtime::issue_timing_measurement ( Context  ctx,
const TimingLauncher launcher 
)

Issue a timing measurement operation configured with a launcher. The above methods are just common special cases. This allows for the general case of an arbitrary measurement with an arbitrary number of preconditions.

◆ launch_top_level_task()

Future Legion::Runtime::launch_top_level_task ( const TaskLauncher launcher)

After the runtime is started, users can launch as many top-level tasks as they want using this method. Each one will start a new top-level task and returns values with a future. Currently we only permit this to be called from threads not managed by Legion.

◆ legion_task_postamble() [1/3]

static void Legion::Runtime::legion_task_postamble ( Context  ctx,
const void *  retvalptr,
size_t  retvalsize,
bool  owned,
const Realm::ExternalInstanceResource &  allocation,
void(*)(const Realm::ExternalInstanceResource &)  freefunc = NULL,
const void *  metadataptr = NULL,
size_t  metadatasize = 0 
)
static

This variant of the Legion task postamble allows clients to return data in arbitrary memory locations as a future result. Realm::ExternalInstanceResource objects provide ways of describing all kinds of external allocations that Legion can understand

Parameters
ctxthe context for the task
retvalptrraw pointer for the allocation (can be NULL)
retvalsizethe size of the return value in bytes
ownedwhether the runtime takes ownership of this result
allocationan external instance resource description of the future result data
freefuncoptional function pointer to invoke to free the resources associated with an external resource
metadataptra pointer to host memory that contains metadata for the future. The runtime will always make a copy of this data if it is not NULL.
metadatasizethe size of the metadata buffer if non-NULL

◆ legion_task_postamble() [2/3]

static void Legion::Runtime::legion_task_postamble ( Context  ctx,
const void *  retvalptr = NULL,
size_t  retvalsize = 0,
bool  owned = false,
Realm::RegionInstance  inst = Realm::RegionInstance::NO_INST,
const void *  metadataptr = NULL,
size_t  metadatasize = 0 
)
static

This is the necessary postamble call to use when registering a task variant with an explicit CodeDescriptor. It passes back the task return value and completes the task. It should be the last thing called before the task finishes. Note that if the return value is not backed by an instance, then it must be in host-visible memory.

Parameters
ctxthe context for the task
retvalptrpointer to the return value
retvalsizethe size of the return value in bytes
ownedwhether the runtime takes ownership of this result
instoptional Realm instance containing the data that Legion should take ownership of
metadataptra pointer to host memory that contains metadata for the future. The runtime will always make a copy of this data if it is not NULL.
metadatasizethe size of the metadata buffer if non-NULL

◆ legion_task_postamble() [3/3]

static void Legion::Runtime::legion_task_postamble ( Context  ctx,
FutureFunctor callback_functor,
bool  owned = false 
)
static

This variant of the Legion task postamble allows users to pass in a future functor object to serve as a callback interface for Legion to query so that it is only invoked in the case where futures actually need to be serialized.

Parameters
ctxthe context for the task
callback_functorpointer to the callback object
ownedwhether Legion should take ownership of the object

◆ legion_task_preamble()

static void Legion::Runtime::legion_task_preamble ( const void *  data,
size_t  datalen,
Processor  p,
const Task *&  task,
const std::vector< PhysicalRegion > *&  reg,
Context &  ctx,
Runtime *&  runtime 
)
static

This is the necessary preamble call to use when registering a task variant with an explicit CodeDescriptor. It takes the base Realm task arguments and will return the equivalent Legion task arguments from the runtime.

Parameters
datapointer to the Realm task data
datalensize of the Realm task data in bytes
pRealm processor on which the task is running
taskreference to the Task pointer to be set
regionsptrpointer to the vector of regions reference to set
ctxthe context to set
runtimethe runtime pointer to set

◆ log_once()

void Legion::Runtime::log_once ( Context  ctx,
Realm::LoggerMessage &  message 
)

Print the logger message exactly once regardless of the control replication status of the task.

Parameters
ctxthe enclosing task context
messagethe Realm Logger Message to be logged

◆ map_region() [1/3]

PhysicalRegion Legion::Runtime::map_region ( Context  ctx,
const InlineLauncher launcher 
)

Perform an inline mapping operation from the given inline operation configuration. Note the application must wait for the resulting physical region to become valid before using it.

See also
InlineLauncher
Parameters
ctxenclosing task context
launcherinline launcher object
Returns
a physical region for the resulting data

◆ map_region() [2/3]

PhysicalRegion Legion::Runtime::map_region ( Context  ctx,
const RegionRequirement req,
MapperID  id = 0,
MappingTagID  tag = 0,
const char *  provenance = NULL 
)

Perform an inline mapping operation which returns a physical region object for the requested region requirement. Note the application must wait for the resulting physical region to become valid before using it.

Parameters
ctxenclosing task context
reqthe region requirement for the inline mapping
idthe mapper ID to associate with the operation
tagthe mapping tag to pass to any mapping calls
provenancean optional string describing the provenance information for this operation
Returns
a physical region for the resulting data

◆ map_region() [3/3]

PhysicalRegion Legion::Runtime::map_region ( Context  ctx,
unsigned  idx,
MapperID  id = 0,
MappingTagID  tag = 0,
const char *  provenance = NULL 
)

Perform an inline mapping operation that re-maps a physical region that was initially mapped when the task began.

Parameters
ctxenclosing task context
idxindex of the region requirement from the enclosing task
idthe mapper ID to associate with the operation
themapping tag to pass to any mapping calls
provenancean optional string describing the provenance information for this operation
Returns
a physical region for the resulting data

◆ perform_registration_callback()

static void Legion::Runtime::perform_registration_callback ( RegistrationCallbackFnptr  callback,
bool  global,
bool  deduplicate = true,
size_t  dedup_tag = 0 
)
static

This call allows applications to request a registration callback be performed after the runtime has started. The application can select whether this registration is performed locally (e.g. once on the local node) or globally across all nodes in the machine. The method will not return until the registration has been performed on all the target address spaces. All function pointers passed into this method with 'global' set to true must "portable", meaning that we can lookup their shared object name and symbol name. This means they either need to originate with a shared object or the binary must be linked with '-rdynamic'. It's up the user to guarantee this or Legion will raise an error about a non-portable function pointer. For any given function pointer all calls must be made with the same value of 'global' or hangs can occur.

Parameters
ctxenclosing task context
globalwhether this registration needs to be performed in all address spaces or just the local one
bufferoptional buffer of data to pass to callback
dedupwhether to deduplicate this with other registration callbacks for the same function
dedup_taga tag to use for deduplication in the case where applications may want to deduplicate across multiple callbacks with the same function pointer

◆ predicate_and()

Predicate Legion::Runtime::predicate_and ( Context  ctx,
const Predicate p1,
const Predicate p2,
const char *  provenance = NULL 
)

Create a new predicate value that is the logical conjunction of two other predicate values.

Parameters
ctxenclosing task context
p1first predicate to logically and
p2second predicate to logically and
provenancean optional string describing the provenance information for this operation
Returns
predicate value logically and-ing two predicates

◆ predicate_not()

Predicate Legion::Runtime::predicate_not ( Context  ctx,
const Predicate p,
const char *  provenance = NULL 
)

Create a new predicate value that is the logical negation of another predicate value.

Parameters
ctxenclosing task context
ppredicate value to logically negate
provenancean optional string describing the provenance information for this operation
Returns
predicate value logically negating previous predicate

◆ predicate_or()

Predicate Legion::Runtime::predicate_or ( Context  ctx,
const Predicate p1,
const Predicate p2,
const char *  provenance = NULL 
)

Create a new predicate value that is the logical disjunction of two other predicate values.

Parameters
ctxenclosing task context
p1first predicate to logically or
p2second predicate to logically or
provenancean optional string describing the provenance information for this operation
Returns
predicate value logically or-ing two predicates

◆ preregister_layout()

static LayoutConstraintID Legion::Runtime::preregister_layout ( const LayoutConstraintRegistrar registrar,
LayoutConstraintID  layout_id = LEGION_AUTO_GENERATE_ID 
)
static

A static version of the method above to register layout descriptions prior to the runtime starting. Attempting to use this method after the runtime starts will result in a failure. All of the calls to this method must specifiy layout descriptions that are not associated with a field space. This call must be made symmetrically across all nodes.

Parameters
registrara layout description registrar
layout_idthe ID to associate with the description
Returns
the layout id assigned to the set of constraints

◆ preregister_projection_functor()

static void Legion::Runtime::preregister_projection_functor ( ProjectionID  pid,
ProjectionFunctor functor 
)
static

Register a projection functor before the runtime has started only. The runtime will update the projection functor so that it has contains a valid runtime pointer prior to the projection functor ever being invoked. The runtime takes ownership for deleting the projection functor after the application has finished executing.

Parameters
pidthe projection ID to use for the registration
functorthe object to register for handling projections

◆ preregister_sharding_functor()

static void Legion::Runtime::preregister_sharding_functor ( ShardingID  sid,
ShardingFunctor functor 
)
static

Register a sharding functor before the runtime has started only. The sharding functor will be invoked to handle queries during control replication about which shard owns a given point in an index space launch. The runtime takes ownership for deleting the sharding functor after the application has finished executing.

Parameters
sidthe sharding ID to use for the registration
functorthe object too register for handling sharding

◆ preregister_task_variant() [1/5]

template<typename T , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static VariantID Legion::Runtime::preregister_task_variant ( const TaskVariantRegistrar registrar,
const char *  task_name = NULL,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)
static

Statically register a new task variant with the runtime with a non-void return type prior to the runtime starting. This call must be made on all nodes and it will fail if done after the Runtime::start method has been invoked.

Parameters
registrarthe task variant registrar for describing the task
task_namean optional name to assign to the logical task
vidoptional static variant ID
Returns
variant ID for the task

◆ preregister_task_variant() [2/5]

template<void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static VariantID Legion::Runtime::preregister_task_variant ( const TaskVariantRegistrar registrar,
const char *  task_name = NULL,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)
static

Statically register a new task variant with the runtime with a void return type prior to the runtime starting. This call must be made on all nodes and it will fail if done after the Runtime::start method has been invoked.

Parameters
registrarthe task variant registrar for describing the task
anoptional name to assign to the logical task
vidoptional static variant ID
Returns
variant ID for the task

◆ preregister_task_variant() [3/5]

static VariantID Legion::Runtime::preregister_task_variant ( const TaskVariantRegistrar registrar,
const CodeDescriptor &  codedesc,
const void *  user_data = NULL,
size_t  user_len = 0,
const char *  task_name = NULL,
VariantID  vid = LEGION_AUTO_GENERATE_ID,
size_t  return_type_size = LEGION_MAX_RETURN_SIZE,
bool  has_return_type_size = true,
bool  check_task_id = true 
)
static

Statically register a new task variant with the runtime that has already built in the necessary preamble/postamble (i.e. calls to LegionTaskWrapper::legion_task_{pre,post}amble). This call must be made on all nodes and it will fail if done after the Runtime::start method has been invoked.

Parameters
registrarthe task variant registrar for describing the task
codedescthe code descriptor for the pre-wrapped task
user_datapointer to optional user data to associate with the task variant
user_lensize of optional user_data in bytes
return_type_sizesize in bytes of the maximum return type produced by this task variant
has_return_type_sizeboolean indicating whether the max return_type_size is valid or not, in cases with unbounded output futures this should be set to false but will come with a significant performance penalty
check_task_idverify validity of the task ID
Returns
variant ID for the task

◆ preregister_task_variant() [4/5]

template<typename T , typename UDT , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static VariantID Legion::Runtime::preregister_task_variant ( const TaskVariantRegistrar registrar,
const UDT &  user_data,
const char *  task_name = NULL,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)
static

Statically register a new task variant with the runtime with a non-void return type and userd data prior to the runtime starting. This call must be made on all nodes and it will fail if done after the Runtime::start method has been invoked.

Parameters
registrarthe task variant registrar for describing the task
user_datathe user data to associate with the task variant
task_namean optional name to assign to the logical task
vidoptional static variant ID
Returns
variant ID for the task

◆ preregister_task_variant() [5/5]

template<typename UDT , void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static VariantID Legion::Runtime::preregister_task_variant ( const TaskVariantRegistrar registrar,
const UDT &  user_data,
const char *  task_name = NULL,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)
static

Statically register a new task variant with the runtime with a void return type and user data prior to the runtime starting. This call must be made on all nodes and it will fail if done after the Runtime::start method has been invoked.

Parameters
registrarthe task variant registrar for describing the task
user_datathe user data to associate with the task variant
anoptional name to assign to the logical task
vidoptional static variant ID
Returns
variant ID for the task

◆ print_once()

void Legion::Runtime::print_once ( Context  ctx,
FILE *  f,
const char *  message 
)

Print the string to the given C file (may also be stdout/stderr) exactly once regardless of the replication status of the task.

Parameters
ctxthe enclosing task context
filethe file to be written to
messagepointer to the C string to be written

◆ progress_unordered_operations()

void Legion::Runtime::progress_unordered_operations ( Context  ctx)

Force progress on unordered operations. After performing one of these calls then all outstanding unordered operations that have been issued are guaranteed to be in the task stream.

Parameters
ctxenclosing task context

◆ query_available_memory()

size_t Legion::Runtime::query_available_memory ( Context  ctx,
Memory  target 
)

Query the space available to this task in a given memory. This is an instantaneous value and may be subject to change. If the mapper has provided an upper bound for a pool in this memory then it will reflect how much space is left available in that pool, otherwise it will reflect the space left in the actual memory. Note that the space available does not imply that you can create an instance of this size as the memory may be fragmented and the largest hole might be much smaller than the size returned by this function.

◆ raise_region_exception()

void Legion::Runtime::raise_region_exception ( Context  ctx,
PhysicalRegion  region,
bool  nuclear 
)

Indicate that data in a particular physical region appears to be incorrect for whatever reason. This will cause the runtime to trap into an error handler and may result in the task being re-executed if the fault is determined to be recoverable. Control will never return from this call. The application can also indicate whether it believes that this particular instance is invalid (nuclear=false) or whether it believes that all instances contain invalid data (nuclear=true). If all instances are bad the runtime will nuke all copies of the data and restart the tasks necessary to generate them.

Parameters
ctxenclosing task context
regionphysical region which contains bad data
nuclearwhether the single instance is invalid or all are

◆ reduce_future_map()

Future Legion::Runtime::reduce_future_map ( Context  ctx,
const FutureMap future_map,
ReductionOpID  redop,
bool  ordered = true,
MapperID  map_id = 0,
MappingTagID  tag = 0,
const char *  provenance = NULL,
Future  initial_value = Future() 
)

Reduce a future map down to a single future value using a specified reduction operator. This assumes that all the values in the future map are instance of the reduction operator's RHS type and the resulting future will also be an RHS type.

Parameters
ctxenclosing task context
future_mapthe future map to reduct the value
redopID for the reduction op to use for reducing values
orderedrequest that the reduced future value be computed in an ordered way so that all shards see a consistent result, this is more expensive than unordered which allows for the creation of a butterfly all-reduce network across the shards, integer reductions should be safe to use with the unordered mode and still give the same result on each shard whereas floating point reductions may produce different answers on each shard if ordered is set to false
map_idmapper to use for deciding where to map the output future
tagpass-through value to the mapper for application context
provenancean optional string for describing the provenance of this invocation
Returns
a future result representing the the reduction of all the values in the future map

◆ register_custom_serdez_op() [1/2]

template<typename SERDEZ >
static void Legion::Runtime::register_custom_serdez_op ( CustomSerdezID  serdez_id,
bool  permit_duplicates = false 
)
static

Register custom serialize/deserialize operation with the runtime. This can be used for providing custom serialization and deserialization method for fields that are not trivially copied (e.g. byte-wise copies). The type being registered must conform to the Realm definition of a CustomSerdez object (see realm/custom_serdez.h). Note that eventhough this is a static method you can safely call it both before and after the runtime has been started.

Parameters
serdez_idID at which to register the serdez operator
permit_duplicateswill allow a duplicate registration to be successful if this serdez ID has been used before

◆ register_custom_serdez_op() [2/2]

static void Legion::Runtime::register_custom_serdez_op ( CustomSerdezID  serdez_id,
SerdezOp *  serdez_op,
bool  permit_duplicates = false 
)
static

Register custom serialize/deserialize operation with the runtime. This can be used for providing custom serialization and deserialization method for fields that are not trivially copied (e.g. byte-wise copies). Note that eventhough this is a static method you can safely call it both before and after the runtime has been started.

Parameters
serdez_idID at which to register the serdez operator
serdez_opThe functor for the serdez op
permit_duplicateswill allow a duplicate registration to be successful if this serdez ID has been used before

◆ register_layout()

LayoutConstraintID Legion::Runtime::register_layout ( const LayoutConstraintRegistrar registrar)

Register a new layout description with the runtime. The runtime will return an ID that is a globally unique name for this set of constraints and can be used anywhere in the machine. Once this set of constraints is set, it cannot be changed.

Parameters
registrara layout description registrar
Returns
a unique layout ID assigned to this set of constraints

◆ register_legion_task() [1/4]

template<typename T , typename UDT , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static TaskID Legion::Runtime::register_legion_task ( TaskID  id,
Processor::Kind  proc_kind,
bool  single,
bool  index,
const UDT &  user_data,
VariantID  vid = LEGION_AUTO_GENERATE_ID,
TaskConfigOptions  options = TaskConfigOptions(),
const char *  task_name = NULL 
)
static
Deprecated:
Same as the register_legion_task above, but allow for users to pass some static data that will be passed as an argument to all invocations of the function.
Parameters
idthe ID at which to assign the task
proc_kindthe processor kind on which the task can run
singlewhether the task can be run as a single task
indexwhether the task can be run as an index space task
user_datauser data type to pass to all invocations of the task
vidthe variant ID to assign to the task
optionsthe task configuration options
task_namestring name for the task
Returns
the ID the task was assigned

◆ register_legion_task() [2/4]

template<typename UDT , void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
static TaskID Legion::Runtime::register_legion_task ( TaskID  id,
Processor::Kind  proc_kind,
bool  single,
bool  index,
const UDT &  user_data,
VariantID  vid = LEGION_AUTO_GENERATE_ID,
TaskConfigOptions  options = TaskConfigOptions(),
const char *  task_name = NULL 
)
static
Deprecated:
Same as the register_legion_task above, but allow for users to pass some static data that will be passed as an argument to all invocations of the function.
Parameters
idthe ID at which to assign the task
proc_kindthe processor kind on which the task can run
singlewhether the task can be run as a single task
indexwhether the task can be run as an index space task
user_datauser data type to pass to all invocations of the task
vidthe variant ID to assign to the task
optionsthe task configuration options
task_namestring name for the task
Returns
the ID the task was assigned

◆ register_legion_task() [3/4]

template<typename T , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static TaskID Legion::Runtime::register_legion_task ( TaskID  id,
Processor::Kind  proc_kind,
bool  single,
bool  index,
VariantID  vid = LEGION_AUTO_GENERATE_ID,
TaskConfigOptions  options = TaskConfigOptions(),
const char *  task_name = NULL 
)
static
Deprecated:
Register a task with a template return type for the given kind of processor.
Parameters
idthe ID to assign to the task
proc_kindthe processor kind on which the task can run
singlewhether the task can be run as a single task
indexwhether the task can be run as an index space task
vidthe variant ID to assign to the task
optionsthe task configuration options
task_namestring name for the task
Returns
the ID the task was assigned

◆ register_legion_task() [4/4]

template<void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
static TaskID Legion::Runtime::register_legion_task ( TaskID  id,
Processor::Kind  proc_kind,
bool  single,
bool  index,
VariantID  vid = LEGION_AUTO_GENERATE_ID,
TaskConfigOptions  options = TaskConfigOptions(),
const char *  task_name = NULL 
)
static
Deprecated:
Register a task with a void return type for the given kind of processor.
Parameters
idthe ID to assign to the task
proc_kindthe processor kind on which the task can run
singlewhether the task can be run as a single task
indexwhether the task can be run as an index space task
vidthe variant ID to assign to the task
optionsthe task configuration options
task_namestring name for the task
Returns
the ID the task was assigned

◆ register_partition_function()

template<LogicalRegion(*)(LogicalPartition, const DomainPoint &, Runtime *) PROJ_PTR>
static ProjectionID Legion::Runtime::register_partition_function ( ProjectionID  handle)
static
Deprecated:
Register a partition projection function that can be used to map from an upper bound of a logical partition down to a specific logical sub-region for a given domain point during index task execution. The projection ID zero is reserved for runtime use.
Parameters
handlethe projection ID to register the function at
Returns
ID where the function was registered

◆ register_projection_functor()

void Legion::Runtime::register_projection_functor ( ProjectionID  pid,
ProjectionFunctor functor,
bool  silence_warnings = false,
const char *  warning_string = NULL 
)

Register a projection functor for handling projection queries. The ProjectionID must be non-zero because zero is the identity projection. Unlike mappers which require a separate instance per processor, only one of these must be registered per projection ID. The runtime takes ownership for deleting the projection functor after the application has finished executing.

Parameters
pidthe projection ID to use for the registration
functorthe object to register for handling projections
silence_warningsdisable warnings about dynamic registration
warning_stringa string to be reported with any warnings

◆ register_reduction_op() [1/2]

template<typename REDOP >
static void Legion::Runtime::register_reduction_op ( ReductionOpID  redop_id,
bool  permit_duplicates = false 
)
static

Register a reduction operation with the runtime. Note that the reduction operation template type must conform to the specification for a reduction operation outlined in the Realm runtime interface. Reduction operations can be used either for reduction privileges on a region or for performing reduction of values across index space task launches. The reduction operation ID zero is reserved for runtime use. Note that even though this method is a static method it can be called either before or after the runtime has been started safely.

Parameters
redop_idID at which to register the reduction operation
permit_duplicateswill allow a duplicate registration to be successful if this reduction ID has been used before

◆ register_reduction_op() [2/2]

static void Legion::Runtime::register_reduction_op ( ReductionOpID  redop_id,
ReductionOp *  op,
SerdezInitFnptr  init_fnptr = NULL,
SerdezFoldFnptr  fold_fnptr = NULL,
bool  permit_duplicates = false 
)
static

Register an untyped reduction operation with the runtime. Note that the reduction operation template type must conform to the specification for a reduction operation outlined in the Realm runtime interface. Reduction operations can be used either for reduction privileges on a region or for performing reduction of values across index space task launches. The reduction operation ID zero is reserved for runtime use. The runtime will take ownership of this operation and delete it at the end of the program. Note that eventhough this is a static method it can be called either before or after the runtime has been started safely.

Parameters
redop_idID at which to register the reduction opeation
opthe untyped reduction operator (legion claims ownership)
init_fnptroptional function for initializing the reduction type of this reduction operator if they also support compression @pram fold_fnptr optional function for folding reduction types of this reduction operator if they also support compression
permit_duplicateswill allow a duplicate registration to be successful if this reduction ID has been used before

◆ register_region_function()

template<LogicalRegion(*)(LogicalRegion, const DomainPoint &, Runtime *) PROJ_PTR>
static ProjectionID Legion::Runtime::register_region_function ( ProjectionID  handle)
static
Deprecated:
Register a region projection function that can be used to map from an upper bound of a logical region down to a specific logical sub-region for a given domain point during index task execution. The projection ID zero is reserved for runtime use.
Parameters
handlethe projection ID to register the function at
Returns
ID where the function was registered

◆ register_sharding_functor()

void Legion::Runtime::register_sharding_functor ( ShardingID  sid,
ShardingFunctor functor,
bool  silence_warnings = false,
const char *  warning_string = NULL 
)

Register a sharding functor for handling control replication queries about which shard owns which a given point in an index space launch. The ShardingID must be non-zero because zero is the special "round-robin" sharding functor. The runtime takes ownership of for deleting the sharding functor after the application has finished executing.

Parameters
sidthe sharding ID to use for the registration
functorthe object to register for handling sharding requests
silence_warningsdisable warnings about dynamic registration
warning_stringa string to be reported with any warnings

◆ register_task_variant() [1/5]

VariantID Legion::Runtime::register_task_variant ( const TaskVariantRegistrar registrar,
const CodeDescriptor &  codedesc,
const void *  user_data = NULL,
size_t  user_len = 0,
size_t  return_type_size = LEGION_MAX_RETURN_SIZE,
VariantID  vid = LEGION_AUTO_GENERATE_ID,
bool  has_return_type_size = true 
)

Dynamically register a new task variant with the runtime that has already built in the necessary preamble/postamble (i.e. calls to LegionTaskWrapper::legion_task_{pre,post}amble)

Parameters
registrarthe task variant registrar for describing the task
codedescthe code descriptor for the pre-wrapped task
user_datapointer to optional user data to associate with the task variant
user_lensize of optional user_data in bytes
return_type_sizesize in bytes of the maximum return type produced by this task variant
vidoptional variant ID to use
has_return_type_sizeboolean indicating whether the max return_type_size is valid or not, in cases with unbounded output futures this should be set to false but will come with a significant performance penalty
Returns
variant ID for the task

◆ register_task_variant() [2/5]

template<typename T , typename UDT , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
VariantID Legion::Runtime::register_task_variant ( const TaskVariantRegistrar registrar,
const UDT &  user_data,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)

Dynamically register a new task variant with the runtime with a non-void return type and user data.

Parameters
registrarthe task variant registrar for describing the task
user_datathe user data to associate with the task variant
vidoptional variant ID to use
Returns
variant ID for the task

◆ register_task_variant() [3/5]

template<typename UDT , void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *, const UDT &) TASK_PTR>
VariantID Legion::Runtime::register_task_variant ( const TaskVariantRegistrar registrar,
const UDT &  user_data,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)

Dynamically register a new task variant with the runtime with a void return type and user data.

Parameters
registrarthe task variant registrar for describing the task
user_datathe user data to associate with the task variant
vidoptional variant ID to use
Returns
variant ID for the task

◆ register_task_variant() [4/5]

template<typename T , T(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
VariantID Legion::Runtime::register_task_variant ( const TaskVariantRegistrar registrar,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)

Dynamically register a new task variant with the runtime with a non-void return type.

Parameters
registrarthe task variant registrar for describing the task
vidoptional variant ID to use
Returns
variant ID for the task

◆ register_task_variant() [5/5]

template<void(*)(const Task *, const std::vector< PhysicalRegion > &, Context, Runtime *) TASK_PTR>
VariantID Legion::Runtime::register_task_variant ( const TaskVariantRegistrar registrar,
VariantID  vid = LEGION_AUTO_GENERATE_ID 
)

Dynamically register a new task variant with the runtime with a void return type.

Parameters
registrarthe task variant registrar for describing the task
vidoptional variant ID to use
Returns
variant ID for the task

◆ release_grant()

void Legion::Runtime::release_grant ( Context  ctx,
Grant  grant 
)

Release the grant object indicating that no more operations will be launched that require the grant object. Once this is done and all the tasks using the grant complete the runtime can release the lock.

Parameters
ctxthe enclosing task context
grantthe grant object to release

◆ release_layout()

void Legion::Runtime::release_layout ( LayoutConstraintID  layout_id)

Release the set of constraints associated the given layout ID. This promises that this set of constraints will never be used again.

Parameters
layout_idthe name for the set of constraints to release

◆ remap_region()

void Legion::Runtime::remap_region ( Context  ctx,
PhysicalRegion  region,
const char *  provenance = NULL 
)

Remap a region from an existing physical region. It will still be necessary for the application to wait until the physical region is valid again before using it.

Parameters
ctxenclosing task context
regionthe physical region to be remapped
provenancean optional string describing the provenance information for this operation

◆ replace_default_mapper()

void Legion::Runtime::replace_default_mapper ( Mapping::Mapper *  mapper,
Processor  proc = Processor::NO_PROC 
)

Replace the default mapper for a given processor with a new mapper. If a specific processor is passed to the call then the mapper instance will only be registered on that processor. Alternatively, if no processor is passed, then the mapper will be registered with all processors on the local node.

Parameters
mapperpointer to the mapper object to use as the new default mapper
procthe processor to associate the mapper with

◆ reset_equivalence_sets()

void Legion::Runtime::reset_equivalence_sets ( Context  ctx,
LogicalRegion  parent,
LogicalRegion  region,
const std::set< FieldID > &  fields 
)

Internally the runtime creates "equivalence sets" which are subsets of logical regions that it uses for performing its analyses. In general, these equivalence sets are established on a first touch basis and then altered using runtime heuristics. However, you can influence their selection using this API call which will reset the equivalence sets for certain fields on a arbitrary region in the region tree (note you must have privileges on this region). The next task to use this region or any overlapping regions will create new equivalence sets. Therefore it is useful to use this to inform the runtime when switching from one partition to a new partition. Note that this method will only impact your performance and has no bearing on the correctness of your application.

Parameters
ctxenclosing task context
parentthe logical region where privileges are derived from
regionthe region to reset the equivalence sets for
fieldsthe fields for which these should apply

◆ retrieve_name() [1/7]

void Legion::Runtime::retrieve_name ( FieldSpace  handle,
const char *&  result 
)

Retrieve the name of a field space

Parameters
handlefield space handle
resultpointer to assign to the name

◆ retrieve_name() [2/7]

void Legion::Runtime::retrieve_name ( FieldSpace  handle,
FieldID  fid,
const char *&  result 
)

Retrieve the name of a specific field

Parameters
handlefield space handle
fidfield ID
resultpointer to assign to the name

◆ retrieve_name() [3/7]

void Legion::Runtime::retrieve_name ( IndexPartition  handle,
const char *&  result 
)

Retrieve the name of an index partition

Parameters
handleindex partition handle
resultpointer to assign to the name

◆ retrieve_name() [4/7]

void Legion::Runtime::retrieve_name ( IndexSpace  handle,
const char *&  result 
)

Retrieve the name of an index space

Parameters
handleindex space handle
resultpointer to assign to the name

◆ retrieve_name() [5/7]

void Legion::Runtime::retrieve_name ( LogicalPartition  handle,
const char *&  result 
)

Retrieve the name of a logical partition

Parameters
handlelogical partition handle
resultpointer to assign to the name

◆ retrieve_name() [6/7]

void Legion::Runtime::retrieve_name ( LogicalRegion  handle,
const char *&  result 
)

Retrieve the name of a logical region

Parameters
handlelogical region handle
resultpointer to assign to the name

◆ retrieve_name() [7/7]

void Legion::Runtime::retrieve_name ( TaskID  task_id,
const char *&  result 
)

Retrieve the name of a task

Parameters
task_idthe ID of the task
resultpointer to assign to the name

◆ retrieve_semantic_information() [1/7]

bool Legion::Runtime::retrieve_semantic_information ( FieldSpace  handle,
FieldID  fid,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for a specific field

Parameters
handlefield space handle
fidfield ID
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ retrieve_semantic_information() [2/7]

bool Legion::Runtime::retrieve_semantic_information ( FieldSpace  handle,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for a field space

Parameters
handlefield space handle
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ retrieve_semantic_information() [3/7]

bool Legion::Runtime::retrieve_semantic_information ( IndexPartition  handle,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for an index partition

Parameters
handleindex partition handle
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ retrieve_semantic_information() [4/7]

bool Legion::Runtime::retrieve_semantic_information ( IndexSpace  handle,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for an index space

Parameters
handleindex space handle
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ retrieve_semantic_information() [5/7]

bool Legion::Runtime::retrieve_semantic_information ( LogicalPartition  handle,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for a logical partition

Parameters
handlelogical partition handle
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ retrieve_semantic_information() [6/7]

bool Legion::Runtime::retrieve_semantic_information ( LogicalRegion  handle,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for a logical region

Parameters
handlelogical region handle
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ retrieve_semantic_information() [7/7]

bool Legion::Runtime::retrieve_semantic_information ( TaskID  task_id,
SemanticTag  tag,
const void *&  result,
size_t &  size,
bool  can_fail = false,
bool  wait_until_ready = false 
)

Retrieve semantic information for a task

Parameters
task_idthe ID of the task
tagsemantic tag
resultpointer to assign to the semantic buffer
sizewhere to write the size of the semantic buffer
can_failquery allowed to fail
wait_until_readywait indefinitely for the tag
Returns
true if the query succeeds

◆ safe_cast() [1/2]

DomainPoint Legion::Runtime::safe_cast ( Context  ctx,
DomainPoint  point,
LogicalRegion  region 
)

Safe case a domain point down to a target region. If the point is not in the target region, then an empty domain point is returned.

Parameters
ctxenclosing task context
pointthe domain point to be cast
regionthe target logical region
Returns
the same point if it can be safely cast, otherwise empty

◆ safe_cast() [2/2]

template<int DIM, typename COORD_T >
bool Legion::Runtime::safe_cast ( Context  ctx,
Point< DIM, COORD_T >  point,
LogicalRegionT< DIM, COORD_T >  region 
)

Safe case a domain point down to a target region. If the point is not in the target region, returns false, otherwise returns true

Parameters
ctxenclosing task context
pointthe domain point to be cast
regionthe target logical region
Returns
if the point is in the logical region

◆ select_tunable_value()

Future Legion::Runtime::select_tunable_value ( Context  ctx,
TunableID  tid,
MapperID  mapper = 0,
MappingTagID  tag = 0,
const void *  args = NULL,
size_t  argsize = 0 
)

Similar to Legion's ancestral predecessor Sequoia, Legion supports tunable variables which are integers supplied by the mapper for individual task contexts. The idea is that there are some parameters which should be considered parameters determined by the underlying hardware. To make these parameters explicit, we express them as tunables which are filled in at runtime by mapper objects. This method will return asynchronously with a future that will be set once the mapper fills in the value for the future. It is the responsibility of the application to maintain consistency on the expected types for a given tunable between the application and the mapper.

◆ set_local_task_variable_untyped()

void Legion::Runtime::set_local_task_variable_untyped ( Context  ctx,
LocalVariableID  id,
const void *  value,
void(*)(void *)  destructor = NULL 
)

Set the value of a task-local variable named by ID. This variable will only have the lifetime of the task. The user can also specify an optional destructor function which will implicitly be called at the end the task's execution

Parameters
ctxthe enclosing task context
idthe ID of the task-local variable to set
valuethe value to set the variable to
destructoroptional method to delete the value

◆ set_registration_callback()

static void Legion::Runtime::set_registration_callback ( RegistrationCallbackFnptr  callback)
static
Deprecated:
This call allows the application to register a callback function that will be run prior to beginning any task execution on every runtime in the system. It can be used to register or update the mapping between mapper IDs and mappers, register reductions, register projection function, register coloring functions, or configure any other static runtime variables prior to beginning the application.
Parameters
callbackfunction pointer to the callback function to be run

◆ set_return_code()

static void Legion::Runtime::set_return_code ( int  return_code)
static

Set the return code for the application from Legion. This will be returned as the result from 'start' or 'wait_for_shutdown'. The default is zero. If multiple non-zero values are set then at least one of the non-zero values will be returned.

◆ set_top_level_task_id()

static void Legion::Runtime::set_top_level_task_id ( TaskID  top_id)
static

Set the top-level task ID for the runtime to use when beginning an application. This should be set before calling start. If no top-level task ID is set then the runtime will not start running any tasks at start-up.

Parameters
top_idID of the top level task to be run

◆ set_top_level_task_mapper_id()

static void Legion::Runtime::set_top_level_task_mapper_id ( MapperID  mapper_id)
static

Set the mapper ID for the runtime to use when starting the top-level task. This can be called either before the runtime is started, or during the registration callback, but will have no effect after the top-level task is started.

◆ start()

static int Legion::Runtime::start ( int  argc,
char **  argv,
bool  background = false,
bool  supply_default_mapper = true,
bool  filter = false 
)
static

After configuring the runtime object this method should be called to start the runtime running. The runtime will then launch the specified top-level task on one of the processors in the machine. Note if background is set to false, control will never return from this call. An integer is returned since this is routinely the last call at the end of 'main' in a program and it is nice to return an integer from 'main' to satisfy compiler type checkers.

In addition to the arguments passed to the application, there are also several flags that can be passed to the runtime to control execution.


Stealing

-lg:nosteal Disable any stealing in the runtime. The runtime

will never query any mapper about stealing.

Out-of-order Execution

-lg:window <int> Specify the maximum number of child tasks allowed in a given task context at a time. A call to launch more tasks than the allotted window will stall the parent task until child tasks begin completing. The default is 1024. -lg:sched <int> The run-ahead factor for the runtime. How many outstanding tasks ready to run should be on each processor before backing off the mapping procedure. -lg:vector <int> Set the initial vectorization option for fusing together important runtime meta tasks in the mapper. The default is 16. -lg:inorder Execute operations in strict propgram order. This flag will actually run the entire operation through the pipeline and wait for it to complete before

permitting the next operation to start.

Messaging

-lg:message <int> Maximum size in bytes of the active messages to be sent between instances of the Legion runtime. This can help avoid the use of expensive per-pair-of-node RDMA buffers in the low-level runtime. Default value is 4K which should guarantee

medium sized active messages on Infiniband clusters.

Configuration Flags

-lg:no_dyn Disable dynamic disjointness tests when the runtime has been compiled with macro DYNAMIC_TESTS defined which enables dynamic disjointness testing. -lg:epoch <int> Change the size of garbage collection epochs. The default value is 64. Increasing it adds latency to the garbage collection but makes it more efficient. Decreasing the value reduces latency, but adds inefficiency to the collection. -lg:unsafe_launch Tell the runtime to skip any checks for checking for deadlock between a parent task and the sub-operations that it is launching. Note that this is unsafe for a reason. The application can and will deadlock if any currently mapped regions conflict with those requested by a child task or other operation. -lg:unsafe_mapper Tell the runtime to skip any checks for validating the correctness of the results from mapper calls. Turning this off may result in internal crashes in the runtime if the mapper provides invalid output from any mapper call. (Default: false in debug mode, true in release mode.) -lg:safe_mapper Tell the runtime to perform all correctness checks on mapper calls regardless of the optimization level. (Default: true in debug mode, false in release mode.) -lg:safe_ctrlrepl <level> Perform dynamic checks to verify the correctness of control replication. This will compute a hash of all the arguments to each call into the runtime and perform a collective to compare it across the shards to see if they all align. Level 0: no checks Level 1: sound but incomplete checks (no false positives) Level 2: unsound but complete checks (no false negatives) -lg:local <int> Specify the maximum number of local fields

permitted in any field space within a context.

Resiliency

-lg:resilient Enable features that make the runtime resilient including deferred commit that can be controlled by the next two flags. By default this is off for performance reasons. Once resiliency mode is enabled, then the user can control when

operations commit using the next two flags.

Debugging

-lg:warn Enable all verbose runtime warnings -lg:warn_backtrace Print a backtrace for each warning -lg:leaks Report information about resource leaks -lg:ldb <replay_file> Replay the execution of the application with the associated replay file generted by LegionSpy. This will run the application in the Legion debugger. -lg:replay <replay_file> Rerun the execution of the application with the associated replay file generated by LegionSpy. -lg:tree Dump intermediate physical region tree states before and after every operation. The runtime must be compiled in debug mode with the DEBUG_LEGION macro defined. -lg:disjointness Verify the specified disjointness of partitioning operations. This flag is now a synonym for -lg:partcheck -lg:partcheck This flag will ask the runtime to dynamically verify that all correctness properties for partitions are upheld. This includes checking that the parent region dominates all subregions and that all annotations of disjointness and completeness from the user are correct. This is an expensive test and users should expect a significant slow-down of their application when using it. -lg:separate Indicate that separate instances of the Legion level runtime should be made for each processor. The default is one runtime instance per node. This is primarily useful for debugging purposes to force messages to be sent between runtime instances on the same node. -lg:registration Record the mapping from Realm task IDs to task variant names for debugging Realm runtime error messages. -lg:test Replace the default mapper with the test mapper which will generate sound but random mapping decision in order to stress-test the runtime. -lg:delay <sec> Delay the start of the runtime by 'sec' seconds. This is often useful for attaching debuggers on

one or more nodes prior to an application beginning.

Profiling

-lg:spy Enable light-weight logging for Legion Spy which is valuable for understanding properties of an application such as the shapes of region trees and the kinds of tasks/operations that are created. Checking of the runtime with Legion Spy will still require the runtime to be compiled with -DLEGION_SPY. -lg:prof <int> Specify the number of nodes on which to enable profiling information to be collected. By default all nodes are disabled. Zero will disable all profiling while each number greater than zero will profile on that number of nodes. -lg:serializer <string> Specify the kind of serializer to use: 'ascii' or 'binary'. The default is 'binary'. -lg:prof_logfile <filename> If using a binary serializer the name of the output file to write to. -lg:prof_footprint <int> The maximum goal size of Legion Prof footprint during runtime in MBs. If the total data captured by the profiler exceeds this footprint, the runtime will begin dumping data out to the output file in a minimally invasive way while the application is still running. The default is 512 (MB). -lg:prof_latency <int> The goal latency in microseconds of intermediate profiling tasks to be writing to output files if the maximum footprint size is exceeded. This allows control over the granularity so they can be made small enough to interleave with other runtime work. The default is 100 (us). -lg:prof_call_threshold <int> The minimum size of runtime and mapper calls in order for them to be logged by the profiler in microseconds. All runtime and mapper calls that are less than this threshold will be discarded and will not be recorded in the profiling logs. The default value is 0 (us) so all calls are logged.

Parameters
argcthe number of input arguments
argvpointer to an array of string arguments of size argc
backgroundwhether to execute the runtime in the background
supply_default_mapperwhether the runtime should initialize the default mapper for use by the application
filterfilter legion and realm command line arguments
Returns
only if running in background, otherwise never

◆ subtract_index_spaces()

IndexSpace Legion::Runtime::subtract_index_spaces ( Context  ctx,
IndexSpace  left,
IndexSpace  right,
const char *  provenance = NULL 
)

Create a new top-level index space by taking the set difference of two different index spaces

Parameters
provenancean optional string describing the provenance information for this index space

◆ transform_future_map()

FutureMap Legion::Runtime::transform_future_map ( Context  ctx,
const FutureMap fm,
IndexSpace  new_domain,
PointTransformFunctor functor,
bool  take_ownership = false,
const char *  provenance = NULL 
)

Apply a transform to a FutureMap. All points that access the FutureMap will be transformed by the 'transform' function before accessing the backing future map. Note that multiple transforms can be composed this way to create new FutureMaps. This version takes a pointer PointTransform functor object to invoke to transform the coordinate spaces of the points.

Parameters
ctxenclosing task context
fmfuture map to apply a new coordinate space to
new_domainan index space to describe the domain of points for the transformed future map
functorpointer to a functor to transform points
take_ownershipwhether the runtime should delete the functor
provenancean optional string describing the provenance information for this operation
Returns
a new future map with the coordinate space transformed

◆ unbind_implicit_task_from_external_thread()

void Legion::Runtime::unbind_implicit_task_from_external_thread ( Context  ctx)

Unbind an implicit context from the external thread it is currently associated with. It is the user's responsibility to make sure that no more than one external thread is bound to an implicit task's context at a time or undefined behavior will occur.

◆ union_index_spaces()

IndexSpace Legion::Runtime::union_index_spaces ( Context  ctx,
const std::vector< IndexSpace > &  spaces,
const char *  provenance = NULL 
)

Create a new top-level index space by unioning together several existing index spaces

Parameters
ctxthe enclosing task context
spacesthe index spaces to union together
provenancean optional string describing the provenance information for this index space
Returns
the handle for the new index space

◆ unmap_all_regions()

void Legion::Runtime::unmap_all_regions ( Context  ctx)

Unmap all the regions originally requested for a context (if they haven't already been unmapped). WARNING: this call will invalidate all accessors currently valid in the enclosing parent task context.

Parameters
ctxenclosing task context

◆ unmap_region()

void Legion::Runtime::unmap_region ( Context  ctx,
PhysicalRegion  region 
)

Unmap a physical region. This can unmap either a previous inline mapping physical region or a region initially mapped as part of the task's launch.

Parameters
ctxenclosing task context
regionphysical region to be unmapped

◆ wait_for_shutdown()

static int Legion::Runtime::wait_for_shutdown ( void  )
static

Blocking call to wait for the runtime to shutdown when running in background mode. Otherwise it is illegal to invoke this method. Returns the exit code for the application.

◆ yield()

void Legion::Runtime::yield ( Context  ctx)

Yield the task to allow other tasks on the processor. In most Legion programs calling this should never be necessary. However, sometimes an application may want to put its own polling loop inside a task. If it does it may need to yield the processor that it is running on to allow other tasks to run on that processor. This can be accomplished by invoking this method. The task will be pre-empted and other eligible tasks will be permitted to run on this processor.


The documentation for this class was generated from the following file: