Legion Runtime
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
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 (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)
 

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

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.

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.

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.

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.

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
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
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
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
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
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

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