Legion Runtime
Public Member Functions | Protected Attributes | List of all members
Legion::ProjectionFunctor Interface Referenceabstract

#include <legion.h>

Public Member Functions

 ProjectionFunctor (Runtime *rt)
 
virtual LogicalRegion project (const Mappable *mappable, unsigned index, LogicalRegion upper_bound, const DomainPoint &point)
 
virtual LogicalRegion project (const Mappable *mappable, unsigned index, LogicalPartition upper_bound, const DomainPoint &point)
 
virtual LogicalRegion project (LogicalRegion upper_bound, const DomainPoint &point, const Domain &launch_domain)
 
virtual LogicalRegion project (LogicalPartition upper_bound, const DomainPoint &point, const Domain &launch_domain)
 
virtual LogicalRegion project (LogicalRegion upper_bound, const DomainPoint &point, const Domain &launch_domain, const void *args, size_t size)
 
virtual LogicalRegion project (LogicalPartition upper_bound, const DomainPoint &point, const Domain &launch_domain, const void *args, size_t size)
 
virtual LogicalRegion project (Context ctx, Task *task, unsigned index, LogicalRegion upper_bound, const DomainPoint &point)
 
virtual LogicalRegion project (Context ctx, Task *task, unsigned index, LogicalPartition upper_bound, const DomainPoint &point)
 
virtual bool is_exclusive (void) const
 
virtual bool is_functional (void) const
 
virtual bool is_invertible (void) const
 
virtual unsigned get_depth (void) const =0
 
virtual void invert (LogicalRegion region, LogicalRegion upper_bound, const Domain &launch_domain, std::vector< DomainPoint > &ordered_points)
 
virtual void invert (LogicalRegion region, LogicalPartition upper_bound, const Domain &launch_domain, std::vector< DomainPoint > &ordered_points)
 
virtual bool is_complete (LogicalRegion upper_bound, const Domain &launch_domain)
 
virtual bool is_complete (LogicalPartition upper_bound, const Domain &launch_domain)
 
virtual bool is_complete (Mappable *mappable, unsigned index, LogicalRegion upper_bound, const Domain &launch_domain)
 
virtual bool is_complete (Mappable *mappable, unsigned index, LogicalPartition upper_bound, const Domain &launch_domain)
 

Protected Attributes

Runtimeruntime
 

Detailed Description

This defines an interface for objects that need to be able to handle projection requests for an application. Whenever index space tasks are launched with projection region requirements, instances of this object are used to handle the lowering down to individual regions for specific task instances in the index space of task. No more than one query of this interface will be made per object at a time.

Note also that the interface inherits from the RegionTreeInspector class which gives it access to all of the functions in that class for discovering the shape of index space trees, field spaces, and logical region trees.

Member Function Documentation

◆ get_depth()

virtual unsigned Legion::ProjectionFunctor::get_depth ( void  ) const
pure virtual

Specify the depth which this projection function goes for all the points in an index space launch from the upper bound node in the region tree. Depth is defined as the number of levels of the region tree crossed from the upper bound logical region or partition. So depth 0 for a REG_PROJECTION means the same region while depth 0 for a PART_PROJECTION means a subregion in the immediate partition. Depth 0 is the default for the identity projection function.

◆ invert()

virtual void Legion::ProjectionFunctor::invert ( LogicalRegion  region,
LogicalRegion  upper_bound,
const Domain launch_domain,
std::vector< DomainPoint > &  ordered_points 
)
virtual

Invert the projection function. Given a logical region for this operation return all of the points that alias with it. Dependences will be resolved in the order that they are returned to the runtime. The returned result must not be empty because it must contain at least the point for the given operation.

◆ is_complete()

virtual bool Legion::ProjectionFunctor::is_complete ( LogicalRegion  upper_bound,
const Domain launch_domain 
)
virtual

Indicate to the runtime whether this projection function invoked on the given upper bound node in the region tree with the given index space domain will completely "cover" the all the upper bound points. Specifically will each point in the upper bound node exist in at least one logical region that is projected to be one of the points in the domain. It is always sound to return 'false' even if the projection will ultimately turn out to be complete. The only cost will be in additional runtime analysis overhead. It is unsound to return 'true' if the resulting projection is not complete. Undefined behavior in this scenario. In general users only need to worry about implementing these functions if they have a projection functor that has depth greater than zero.

Parameters
mappablethe mappable oject for non-functional functors
indexindex of region requirement for non-functional functors
upper_boundthe upper bound region/partition to consider
launch_domainthe set of points for the projection
Returns
bool indicating whether this projection is complete

◆ is_exclusive()

virtual bool Legion::ProjectionFunctor::is_exclusive ( void  ) const
inlinevirtual

Indicate whether calls to this projection functor must be serialized or can be performed in parallel. Usually they must be exclusive if this functor contains state for memoizing results.

◆ is_invertible()

virtual bool Legion::ProjectionFunctor::is_invertible ( void  ) const
inlinevirtual

Indicate whether this is an invertible projection functor which can be used to handle dependences between point tasks in the same index space launch.

◆ project() [1/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( const Mappable mappable,
unsigned  index,
LogicalPartition  upper_bound,
const DomainPoint point 
)
virtual

Same method as above, but with a partition as an upper bound

Parameters
mappablethe operation requesting the projection
indexthe index of the region requirement being projected
upper_boundthe upper bound logical partition
pointthe point being projected
Returns
logical region result

◆ project() [2/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( const Mappable mappable,
unsigned  index,
LogicalRegion  upper_bound,
const DomainPoint point 
)
virtual

This is the more general implementation of projection functions that work for all kinds of operations. Implementations can switch on the mappable type to figure out the kind of the operation that is requesting the projection. The default implementation of this method calls the deprecated version of this method for tasks and fails for all other kinds of operations. Note that this method is not passed a context, because it should only be invoking context free runtime methods.

Parameters
mappablethe operation requesting the projection
indexthe index of the region requirement being projected
upper_boundthe upper bound logical region
pointthe point being projected
Returns
logical region result

◆ project() [3/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( Context  ctx,
Task task,
unsigned  index,
LogicalPartition  upper_bound,
const DomainPoint point 
)
virtual
Deprecated:
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

◆ project() [4/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( Context  ctx,
Task task,
unsigned  index,
LogicalRegion  upper_bound,
const DomainPoint point 
)
virtual
Deprecated:
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

◆ project() [5/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( LogicalPartition  upper_bound,
const DomainPoint point,
const Domain launch_domain 
)
virtual

This method corresponds to the one above for projecting from a logical partition but is only invoked if the 'is_functional' method for this projection functor returns true. It must always return the same result when called with the same parameters

Parameters
upper_boundthe upper bound logical partition
pointthe point being projected
launch_domainthe launch domain of the index operation
Returns
logical region result

◆ project() [6/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( LogicalPartition  upper_bound,
const DomainPoint point,
const Domain launch_domain,
const void *  args,
size_t  size 
)
virtual

This method will be invoked on functional projection functors for projecting from an upper bound logical partition when the the corresponding region requirement has projection arguments associated with it.

Parameters
upper_boundthe upper bound logical region
pointthe point being projected
launch_domainthe launch domain of the index operation
argspointer to the buffer of arguments
sizesize of the buffer of arguments in bytes
Returns
logical region result

◆ project() [7/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( LogicalRegion  upper_bound,
const DomainPoint point,
const Domain launch_domain 
)
virtual

This method corresponds to the one above for projecting from a logical region but is only invoked if the 'is_functional' method for this projection functor returns true. It must always return the same result when called with the same parameters

Parameters
upper_boundthe upper bound logical region
pointthe point being projected
launch_domainthe launch domain of the index operation
Returns
logical region result

◆ project() [8/8]

virtual LogicalRegion Legion::ProjectionFunctor::project ( LogicalRegion  upper_bound,
const DomainPoint point,
const Domain launch_domain,
const void *  args,
size_t  size 
)
virtual

This method will be invoked on functional projection functors for projecting from an upper bound logical region when the the corresponding region requirement has projection arguments associated with it.

Parameters
upper_boundthe upper bound logical region
pointthe point being projected
launch_domainthe launch domain of the index operation
argspointer to the buffer of arguments
sizesize of the buffer of arguments in bytes
Returns
logical region result

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