|
Legion Runtime
|
#include <mapping.h>
This mapper call is invoked if the 'replicate' parameter was set in select_task_options. It provides the mapper the options to replicate the execution of this task on multiple different processors. All the copies of the task must use the same variant which must be set as supporting replication. If the variant is a non-leaf variant then the execution will be control-replicated. If instead you are doing replication of leaf tasks on different kinds of processors you can pick different variants for them using the leaf_variants vector which must be the same size as the target_processors vector and all the selected variants for each processor must be a leaf variant. If you specify a non-empty leaf_variants data structure then the chosen_variant member will be ignored.
Note that if the task has any region requirements with write or reduction privileges then it will be incumbent upon the mapper to ensure that each of the different copies of the task are mapped to different physical instances. This invariant will be verified by the runtime if safe mapping is enabled.
The mapper can optionally give names to the shards by filling in the 'shard_points' vector with a set of unique points, all which must be of the same dimension. The 'shard_points' vector must either be empty or be of the same size as the 'task_mappings'. The mapper can also provide an optional 'shard_domain' value to describe the set of points. If this is provided the runtime does not introspect it other than to check that its dimensionality matches that of the points. This value is then passed as the 'shard_domain' argument to all invocations of a sharding functor for operations launched by these shards.