Legion Runtime
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Deprecated List
Class Legion::ColoredPoints< T >

Colored points struct for describing colorings.

Class Legion::FieldSpaceRequirement
Field space requirements can be used to specify that a task requires additional privileges on a field spaces such as the ability to allocate and free fields.
Class Legion::IndexAllocator
Index allocators provide objects for doing allocation on index spaces. They must be explicitly created by the runtime so that they can be linked back to the runtime. Index allocators can be passed by value to functions and stored in data structures, but should not escape the enclosing context in which they were created.
Member Legion::IndexAllocator::alloc (unsigned num_elements=1)
Parameters
num_elementsnumber of elements to allocate
Returns
pointer to the first element in the allocated block
Member Legion::IndexAllocator::free (ptr_t ptr, unsigned num_elements=1)
Parameters
ptrpointer to the first element to free
num_elementsnumber of elements to be freed
Member Legion::IndexAllocator::get_index_space (void) const
Returns
the index space associated with this allocator
Class Legion::IndexIterator
This is a helper class for iterating over the points within an index space or the index space of a given logical region. It should never be copied and will assert fail if a copy is made of it.
Member Legion::PhysicalRegion::get_accessor (bool silence_warnings=false) const
Return a generic accessor for the entire physical region. This method is now deprecated. Please use the 'get_field_accessor' method instead. You can silence warnings about this blocking call with the 'silence_warnings' parameter.
Member Legion::PhysicalRegion::get_field_accessor (FieldID field, bool silence_warnings=false) const
You should be able to create accessors by passing this object directly to the constructor of an accessor Return a field accessor for a specific field within the region. You can silence warnings regarding this blocking call with the 'silence_warnings' parameter.
Member Legion::ProjectionFunctor::project (Context ctx, Task *task, unsigned index, LogicalRegion upper_bound, const DomainPoint &point)
Compute the projection for a logical region projection requirement down to a specific logical region.
Parameters
ctxthe context for this projection
taskthe task for the requested projection
indexwhich region requirement we are projecting
upper_boundthe upper bound logical region
pointthe point of the task in the index space
Returns
logical region to be used by the child task
Member Legion::ProjectionFunctor::project (Context ctx, Task *task, unsigned index, LogicalPartition upper_bound, const DomainPoint &point)
Compute the projection for a logical partition projection requirement down to a specific logical region.
Parameters
ctxthe context for this projection
taskthe task for the requested projection
indexwhich region requirement we are projecting
upper_boundthe upper bound logical partition
pointthe point of the task in the index space
Returns
logical region to be used by the child task
Member Legion::Runtime::attach_file (Context ctx, const char *file_name, LogicalRegion handle, LogicalRegion parent, const std::vector< FieldID > &field_vec, LegionFileMode mode)
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.
Member Legion::Runtime::attach_hdf5 (Context ctx, const char *file_name, LogicalRegion handle, LogicalRegion parent, const std::map< FieldID, const char * > &field_map, LegionFileMode mode)
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
Member Legion::Runtime::create_argument_map (Context ctx)
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
Member Legion::Runtime::create_index_allocator (Context ctx, IndexSpace handle)
Create an index allocator object for a given index space This method is deprecated becasue index spaces no longer support dynamic allocation. This will still work only if there is exactly one allocator made for the index space throughout the duration of its lifetime.
Parameters
ctxenclosing task context
handlefor the index space to create an allocator
Returns
a new index space allocator for the given index space
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, const Domain &color_space, const PointColoring &coloring, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, bool allocable=false)
Create an index partition from a point coloring
Parameters
ctxthe enclosing task context
parentindex space being partitioned
color_spacespace of colors for the partition
coloringthe coloring of the parent index space
part_kindthe kind of partition or whether to compute it
coloroptional color for the new partition
allocablewhether the child index spaces are allocable
Returns
handle for the new index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, const Coloring &coloring, bool disjoint, Color color=LEGION_AUTO_GENERATE_ID)
See the previous create_index_partition call Create an index partition.
Parameters
ctxthe enclosing task context
parentindex space being partitioned
coloringthe coloring of the parent index space
disjointwhether the partitioning is disjoint or not
coloroptional color name for the partition
Returns
handle for the next index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, LegionRuntime::Accessor::RegionAccessor< LegionRuntime::Accessor::AccessorType::Generic > field_accessor, Color color=LEGION_AUTO_GENERATE_ID)
See Also
create_partition_by_field instead Create an index partitioning from an existing field in a physical instance. This requires that the field accessor be valid for the entire parent index space. By definition colors are always non-negative. The runtime will iterate over the field accessor and interpret values as signed integers. Any locations less than zero will be ignored. Values greater than or equal to zero will be colored and placed in the appropriate subregion. By definition this partitioning mechanism has to disjoint since each pointer value has at most one color.
Parameters
ctxthe enclosing task context
field_accessorfield accessor for the coloring field
disjointwhether the partitioning is disjoint or not
completewhether the partitioning is complete or not
Returns
handle for the next index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, const Domain &color_space, const DomainPointColoring &coloring, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID)
Create an index partition from a domain point coloring
Parameters
ctxthe enclosing task context
parentthe index space being partitioned
color_spacespace of colors for the partition
coloringthe coloring of the parent index space
part_kindthe kind of partition or whether to compute it
coloroptional color for the new partition
Returns
handle for the new index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, Domain color_space, const DomainColoring &coloring, bool disjoint, Color color=LEGION_AUTO_GENERATE_ID)
See the previous create index partition call Create an index partition from a domain color space and coloring.
Parameters
ctxthe enclosing task context
parentindex space being partitioned
color_spacethe domain of colors
coloringthe domain coloring of the parent index space
disjointwhether the partitioning is disjoint or not
coloroptional color name for the partition
Returns
handle for the next index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, const Domain &color_space, const MultiDomainPointColoring &coloring, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID)
Create an index partition from a multi-domain point coloring
Parameters
ctxthe enclosing task context
parentthe index space being partitioned
color_spacespace of colors for the partition
coloringthe coloring of the parent index space
part_kindthe kind of partition or whether to compute it
coloroptional color for the new partition
Returns
handle for the new index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, Domain color_space, const MultiDomainColoring &coloring, bool disjoint, Color color=LEGION_AUTO_GENERATE_ID)
See the previous create index partition call Create an index partitiong from a domain color space and a multi-domain coloring which allows multiple domains to be associated with each color.
Parameters
ctxthe enclosing task context
parentindex space being partitioned
color_spacethe domain of colors
coloringthe multi-domain coloring
disjointwhether the partitioning is disjoint or not
coloroptional color name for the partition
Returns
handle for the next index partition
Member Legion::Runtime::create_index_partition (Context ctx, IndexSpace parent, const T &mapping, Color color=LEGION_AUTO_GENERATE_ID)
Create an index partitioning from a typed mapping.
Parameters
ctxthe enclosing task context
parentindex space being partitioned
mappingthe mapping of points to colors
coloroptional color name for the partition
Returns
handle for the next index partition
Member Legion::Runtime::create_index_space (Context ctx, size_t max_num_elmts)
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
Member Legion::Runtime::create_index_space (Context ctx, const std::set< Domain > &domains)
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
Member Legion::Runtime::detach_file (Context ctx, PhysicalRegion region)
Detach an normal file. THis detach operation is similar to detach_hdf5
Member Legion::Runtime::detach_hdf5 (Context ctx, PhysicalRegion region)
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
Member 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)
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
Member 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)
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
Member 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)
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
Member Legion::Runtime::get_index_space_domains (Context ctx, IndexSpace handle, std::vector< Domain > &domains)
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
Member Legion::Runtime::get_index_subspace (Context ctx, IndexPartition p, LegionRuntime::Arrays::Point< DIM > color_point)
Get an index subspace from a partition with a given color point.
Parameters
ctxenclosing task context
pparent index partition handle
color_pointpoint containing color value of index subspace
Returns
the corresponding index space to the specified color point
Member Legion::Runtime::get_tunable_value (Context ctx, TunableID tid, MapperID mapper=0, MappingTagID tag=0)
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.
Member Legion::Runtime::has_multiple_domains (Context ctx, IndexSpace handle)
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
Member 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)
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
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
Member 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)
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 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
Member Legion::Runtime::register_partition_function (ProjectionID handle)
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
Member Legion::Runtime::register_region_function (ProjectionID handle)
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
Member Legion::Runtime::set_registration_callback (RegistrationCallbackFnptr callback)
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