Legion Runtime
Public Member Functions | Public Attributes | List of all members
Legion::OutputRequirement Struct Reference

#include <legion.h>

Inheritance diagram for Legion::OutputRequirement:
Legion::RegionRequirement

Public Member Functions

 OutputRequirement (bool valid_requirement=false)
 
 OutputRequirement (const RegionRequirement &req)
 
 OutputRequirement (FieldSpace field_space, const std::set< FieldID > &fields, int dim=1, bool global_indexing=false)
 
 OutputRequirement (const OutputRequirement &rhs)
 
OutputRequirementoperator= (const RegionRequirement &req)
 
OutputRequirementoperator= (const OutputRequirement &req)
 
bool operator== (const OutputRequirement &req) const
 
bool operator< (const OutputRequirement &req) const
 
template<int DIM, typename COORD_T >
void set_type_tag ()
 
void set_projection (ProjectionID projection, IndexSpace color_space)
 
- Public Member Functions inherited from Legion::RegionRequirement
 RegionRequirement (LogicalRegion _handle, const std::set< FieldID > &privilege_fields, const std::vector< FieldID > &instance_fields, PrivilegeMode _priv, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalPartition pid, ProjectionID _proj, const std::set< FieldID > &privilege_fields, const std::vector< FieldID > &instance_fields, PrivilegeMode _priv, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, ProjectionID _proj, const std::set< FieldID > &privilege_fields, const std::vector< FieldID > &instance_fields, PrivilegeMode _priv, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, const std::set< FieldID > &privilege_fields, const std::vector< FieldID > &instance_fields, ReductionOpID op, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalPartition pid, ProjectionID _proj, const std::set< FieldID > &privilege_fields, const std::vector< FieldID > &instance_fields, ReductionOpID op, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, ProjectionID _proj, const std::set< FieldID > &privilege_fields, const std::vector< FieldID > &instance_fields, ReductionOpID op, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, PrivilegeMode _priv, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalPartition pid, ProjectionID _proj, PrivilegeMode _priv, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, ProjectionID _proj, PrivilegeMode _priv, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, ReductionOpID op, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalPartition pid, ProjectionID _proj, ReductionOpID op, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (LogicalRegion _handle, ProjectionID _proj, ReductionOpID op, CoherenceProperty _prop, LogicalRegion _parent, MappingTagID _tag=0, bool _verified=false)
 
 RegionRequirement (const RegionRequirement &rhs)
 
RegionRequirementoperator= (const RegionRequirement &req)
 
bool operator== (const RegionRequirement &req) const
 
bool operator< (const RegionRequirement &req) const
 
RegionRequirementadd_field (FieldID fid, bool instance=true)
 
RegionRequirementadd_fields (const std::vector< FieldID > &fids, bool instance=true)
 
RegionRequirementadd_flags (RegionFlags new_flags)
 
bool is_verified (void) const
 
bool is_no_access (void) const
 
bool is_restricted (void) const
 
bool must_premap (void) const
 
const void * get_projection_args (size_t *size) const
 
void set_projection_args (const void *args, size_t size, bool own=false)
 
bool has_field_privilege (FieldID fid) const
 

Public Attributes

TypeTag type_tag
 
FieldSpace field_space
 
bool global_indexing
 
bool valid_requirement
 
IndexSpace color_space
 
- Public Attributes inherited from Legion::RegionRequirement
LogicalRegion region
 
LogicalPartition partition
 
std::set< FieldID > privilege_fields
 
std::vector< FieldID > instance_fields
 
PrivilegeMode privilege
 
CoherenceProperty prop
 
LogicalRegion parent
 
ReductionOpID redop
 
MappingTagID tag
 
RegionFlags flags
 
ProjectionType handle_type
 
ProjectionID projection
 
void * projection_args
 
size_t projection_args_size
 

Detailed Description

Output requirements are a special kind of region requirement to inform the runtime that the task will be producing new instances as part of its execution that will be attached to the logical region at the end of the task, and are therefore not mapped ahead of the task's execution.

Output region requirements come in two flavors: those that are already valid region requirements and those which are going to produce variable sized outputs. Valid region requirements behave like normal region requirements except they will not be mapped by the task. Alternatively, for variable-sized output region requirements the runtime will create fresh region and partition names for output requirements right after the task is launched. Output requirements still pick field IDs and the field space for the output regions.

In case of individual task launch, the dimension of an output region is chosen by the dim argument to the output requirement , and and no partitions will be created by the runtime. For index space launches, the runtime gives back a fresh region and partition, whose construction is controlled by the indexing mode specified the output requirement:

0) For either indexing mode, the output partition is always a disjoint complete partition. The color space of the partition is identical to to the launch domain by default, but must be explicitly specified if the output requirement uses a non-identity projection functor. (see set_projection) Any projection functor associated with an output requirement must be bijective.

1) When the global indexing is requested, the dimension of the output region must be the same as the color space. The index space is constructed such that the extent of each dimension is a sum of that dimension's extents of the outputs produced by point tasks; i.e., the range of the i-th subregion on dimension k is [S, S+n), where S is the sum of the previous i-1 subregions' extents on the k dimension and n is the extent of the output of the i-th point task on the k dimension. Outputs are well-formed only when their extents are aligned with their neighbors'. For example, outputs of extents (3, 4) and (5, 4), respectively, are valid if the producers' points are (0, 0) and (1, 0), respectively, whereas they are not well-formed if the colors are (0, 0) and (0, 1); for the former, the bounds of the output subregions are ([0, 2], [0, 3]) and ([3, 7], [0, 3]), respectively.

2) With the local indexing, the output region has an (N+k)-D index space for an N-D launch domain, where k is the dimension chosen by the output requirement. The range of the subregion produced by the point task p (where p is a point in an N-D space) is [<p,lo>, <p,hi>] where [lo, hi] is the bounds of the point task p and <v1,v2> denotes a concatenation of points v1 and v2. The root index space is simply a union of all subspaces.

3) In the case of local indexing, the output region can either have a "loose" convex hull parent index space or a "tight" index space that contains exactly the points in the child space. With the convex hull, the runtime computes an upper bound rectangle with as many rows as children and as many columns as the extent of the larges child space. If convex_hull is set to false, the runtime will compute a more expensive sparse index space containing exactly the children points.

Note that the global indexing has performance consequences since the runtime needs to perform a global prefix sum to compute the ranges of subspaces. Similarly the "tight" bounds can be expensive to compute due to the cost of building the sparsity data structure.

Member Data Documentation

◆ color_space

IndexSpace Legion::OutputRequirement::color_space

color space for the output partition

◆ field_space

FieldSpace Legion::OutputRequirement::field_space

field space for the output region

◆ global_indexing

bool Legion::OutputRequirement::global_indexing

global indexing is used when true

◆ valid_requirement

bool Legion::OutputRequirement::valid_requirement

indicate requirement is valid


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