|
Legion Runtime
|
#include <mapping_utilities.h>
Classes | |
| struct | MemoizedMapping |
Public Member Functions | |
| bool | has_mapping (Processor target, const Task *task, unsigned index) const |
| bool | recall_mapping (Processor target, const Task *task, unsigned index, std::vector< Memory > &ranking) const |
| Memory | recall_chosen (Processor target, const Task *task, unsigned index) const |
| void | record_mapping (Processor target, const Task *task, unsigned index, const std::vector< Memory > &ranking) |
| void | notify_mapping (Processor target, const Task *task, unsigned index, Memory result) |
| void | commit_mapping (Processor target, const Task *task) |
Protected Types | |
| typedef std::pair< Processor, Processor::TaskFuncID > | MappingKey |
Protected Attributes | |
| std::map< MappingKey, MemoizedMapping > | temporary_mappings |
| std::map< MappingKey, MemoizedMapping > | permanent_mappings |
A mapping memoizer class for storing mappings for (processor,task_id) pairs. There is a two-phase process with the memoizer. All calls to record and notify mapping will update a temporary memoized mapping. If the performance of the mapping is good, then the programmer can commit the mapping as the permanent mapping for the pair. Otherwise the next calls to record and notify will overwrite the temporary mapping. If no temporary mapping is commited then the mapping memoizer will continue to return false for calls to has_mapping.
| void Legion::Mapping::Utilities::MappingMemoizer::commit_mapping | ( | Processor | target, |
| const Task * | task | ||
| ) |
Commit the mapping as the permanent mapping
| bool Legion::Mapping::Utilities::MappingMemoizer::has_mapping | ( | Processor | target, |
| const Task * | task, | ||
| unsigned | index | ||
| ) | const |
Check to see if there is a memoized mapping for this task on the given processor.
| void Legion::Mapping::Utilities::MappingMemoizer::notify_mapping | ( | Processor | target, |
| const Task * | task, | ||
| unsigned | index, | ||
| Memory | result | ||
| ) |
Remember exactly which memory was chosen for the temporary mapping
| Memory Legion::Mapping::Utilities::MappingMemoizer::recall_chosen | ( | Processor | target, |
| const Task * | task, | ||
| unsigned | index | ||
| ) | const |
Get the memory chosen for this mapping. Returns NO_MEMORY if it can't find it.
| bool Legion::Mapping::Utilities::MappingMemoizer::recall_mapping | ( | Processor | target, |
| const Task * | task, | ||
| unsigned | index, | ||
| std::vector< Memory > & | ranking | ||
| ) | const |
Get back the mapping for this task on the given processor. Returns true on success.
| void Legion::Mapping::Utilities::MappingMemoizer::record_mapping | ( | Processor | target, |
| const Task * | task, | ||
| unsigned | index, | ||
| const std::vector< Memory > & | ranking | ||
| ) |
Store a temporary mapping for this task on the given processor