20 #if !defined(LEGION_ENABLE_C_BINDINGS) && !defined(LEGION_DISABLE_C_BINDINGS)
22 #define LEGION_ENABLE_C_BINDINGS
25 #if !defined(LEGION_ENABLE_CXX_BINDINGS) && !defined(LEGION_DISABLE_CXX_BINDINGS)
27 #define LEGION_ENABLE_CXX_BINDINGS
31 #ifdef LEGION_ENABLE_C_BINDINGS
35 #ifdef LEGION_ENABLE_CXX_BINDINGS
36 #ifndef __LEGION_RUNTIME_H__
37 #define __LEGION_RUNTIME_H__
52 #if __cplusplus < 201103L
53 #error "Legion requires C++11 as the minimum standard version"
58 #include "legion/legion_constraint.h"
59 #include "legion/legion_redop.h"
61 #define LEGION_PRINT_ONCE(runtime, ctx, file, fmt, ...) \
64 snprintf(message, 4096, fmt, ##__VA_ARGS__); \
65 runtime->print_once(ctx, file, message); \
69 #define NO_LEGION_CONTROL_REPLICATION
93 FRIEND_ALL_RUNTIME_CLASSES
94 IndexSpace(IndexSpaceID
id, IndexTreeID tid, TypeTag tag);
98 inline bool operator==(
const IndexSpace &rhs)
const;
99 inline bool operator!=(
const IndexSpace &rhs)
const;
100 inline bool operator<(
const IndexSpace &rhs)
const;
101 inline bool operator>(
const IndexSpace &rhs)
const;
102 inline IndexSpaceID get_id(
void)
const {
return id; }
103 inline IndexTreeID get_tree_id(
void)
const {
return tid; }
104 inline bool exists(
void)
const {
return (
id != 0); }
105 inline TypeTag get_type_tag(
void)
const {
return type_tag; }
106 inline int get_dim(
void)
const;
108 friend std::ostream& operator<<(std::ostream& os,
109 const IndexSpace& is);
121 template<
int DIM,
typename COORD_T = coord_t>
124 static_assert(DIM > 0,
"DIM must be positive");
125 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
128 FRIEND_ALL_RUNTIME_CLASSES
134 inline IndexSpaceT& operator=(
const IndexSpace &rhs);
148 FRIEND_ALL_RUNTIME_CLASSES
149 IndexPartition(IndexPartitionID
id, IndexTreeID tid, TypeTag tag);
151 IndexPartition(
void);
153 inline bool operator==(
const IndexPartition &rhs)
const;
154 inline bool operator!=(
const IndexPartition &rhs)
const;
155 inline bool operator<(
const IndexPartition &rhs)
const;
156 inline bool operator>(
const IndexPartition &rhs)
const;
157 inline IndexPartitionID get_id(
void)
const {
return id; }
158 inline IndexTreeID get_tree_id(
void)
const {
return tid; }
159 inline bool exists(
void)
const {
return (
id != 0); }
160 inline TypeTag get_type_tag(
void)
const {
return type_tag; }
161 inline int get_dim(
void)
const;
163 friend std::ostream& operator<<(std::ostream& os,
164 const IndexPartition& ip);
176 template<
int DIM,
typename COORD_T = coord_t>
179 static_assert(DIM > 0,
"DIM must be positive");
180 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
183 FRIEND_ALL_RUNTIME_CLASSES
186 IndexPartitionT(
void);
206 FRIEND_ALL_RUNTIME_CLASSES
211 inline bool operator==(
const FieldSpace &rhs)
const;
212 inline bool operator!=(
const FieldSpace &rhs)
const;
213 inline bool operator<(
const FieldSpace &rhs)
const;
214 inline bool operator>(
const FieldSpace &rhs)
const;
215 inline FieldSpaceID get_id(
void)
const {
return id; }
216 inline bool exists(
void)
const {
return (
id != 0); }
218 friend std::ostream& operator<<(std::ostream& os,
const FieldSpace& fs);
241 FRIEND_ALL_RUNTIME_CLASSES
250 inline IndexSpace get_index_space(
void)
const {
return index_space; }
251 inline FieldSpace get_field_space(
void)
const {
return field_space; }
252 inline RegionTreeID get_tree_id(
void)
const {
return tree_id; }
253 inline bool exists(
void)
const {
return (tree_id != 0); }
254 inline TypeTag get_type_tag(
void)
const
255 {
return index_space.get_type_tag(); }
256 inline int get_dim(
void)
const {
return index_space.get_dim(); }
258 friend std::ostream& operator<<(std::ostream& os,
259 const LogicalRegion& lr);
261 RegionTreeID tree_id;
262 IndexSpace index_space;
263 FieldSpace field_space;
272 template<
int DIM,
typename COORD_T = coord_t>
275 static_assert(DIM > 0,
"DIM must be positive");
276 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
279 FRIEND_ALL_RUNTIME_CLASSES
282 LogicalRegionT(
void);
308 FRIEND_ALL_RUNTIME_CLASSES
318 {
return index_partition; }
319 inline FieldSpace get_field_space(
void)
const {
return field_space; }
320 inline RegionTreeID get_tree_id(
void)
const {
return tree_id; }
321 inline bool exists(
void)
const {
return (tree_id != 0); }
322 inline TypeTag get_type_tag(
void)
const
323 {
return index_partition.get_type_tag(); }
324 inline int get_dim(
void)
const {
return index_partition.get_dim(); }
326 friend std::ostream& operator<<(std::ostream& os,
327 const LogicalPartition& lp);
329 RegionTreeID tree_id;
330 IndexPartition index_partition;
331 FieldSpace field_space;
340 template<
int DIM,
typename COORD_T = coord_t>
343 static_assert(DIM > 0,
"DIM must be positive");
344 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
347 FRIEND_ALL_RUNTIME_CLASSES
350 LogicalPartitionT(
void);
361 #pragma GCC diagnostic push
362 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
365 #pragma clang diagnostic push
366 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
392 inline bool has_next(
void)
const;
397 inline ptr_t next(
void);
403 inline ptr_t next_span(
size_t& act_count,
404 size_t req_count = (
size_t)-1LL);
408 Realm::IndexSpaceIterator<1,coord_t> is_iterator;
409 Realm::PointInRectIterator<1,coord_t> rect_iterator;
429 class LEGION_DEPRECATED("Dynamic IndexAllocators are no longer supported")
436 FRIEND_ALL_RUNTIME_CLASSES
440 IndexAllocator& operator=(
const IndexAllocator &allocator);
441 inline bool operator<(
const IndexAllocator &rhs)
const;
442 inline bool operator==(
const IndexAllocator &rhs)
const;
449 LEGION_DEPRECATED(
"Dynamic allocation is no longer supported")
450 ptr_t alloc(
unsigned num_elements = 1);
456 LEGION_DEPRECATED(
"Dynamic allocation is no longer supported")
457 void free(ptr_t ptr,
unsigned num_elements = 1);
468 #pragma GCC diagnostic pop
471 #pragma clang diagnostic pop
497 FRIEND_ALL_RUNTIME_CLASSES
501 FieldAllocator& operator=(
const FieldAllocator &allocator);
502 FieldAllocator& operator=(FieldAllocator &&allocator);
503 inline bool operator<(
const FieldAllocator &rhs)
const;
504 inline bool operator==(
const FieldAllocator &rhs)
const;
527 FieldID desired_fieldid = LEGION_AUTO_GENERATE_ID,
528 CustomSerdezID serdez_id = 0,
529 bool local_field =
false,
530 const char *provenance = NULL);
532 FieldID desired_fieldid = LEGION_AUTO_GENERATE_ID,
533 CustomSerdezID serdez_id = 0,
534 bool local_field =
false,
535 const char *provenance = NULL);
545 void free_field(FieldID fid,
const bool unordered =
false,
546 const char *provenance = NULL);
556 FieldID desired_fieldid = LEGION_AUTO_GENERATE_ID,
557 CustomSerdezID serdez_id = 0,
const char *provenance = NULL);
577 std::vector<FieldID> &resulting_fields,
578 CustomSerdezID serdez_id = 0,
579 bool local_fields =
false,
580 const char *provenance = NULL);
582 std::vector<FieldID> &resulting_fields,
583 CustomSerdezID serdez_id = 0,
584 bool local_fields =
false,
585 const char *provenance = NULL);
596 const bool unordered =
false,
597 const char *provenance = NULL);
606 std::vector<FieldID> &resulting_fields,
607 CustomSerdezID serdez_id = 0,
608 const char *provenance = NULL);
614 Internal::FieldAllocatorImpl *impl;
633 : args(const_cast<void*>(arg)), arglen(argsize) { }
635 : args(rhs.args), arglen(rhs.arglen) { }
637 inline size_t get_size(
void)
const {
return arglen; }
638 inline void* get_ptr(
void)
const {
return args; }
641 {
return (args == arg.args) && (arglen == arg.arglen); }
643 {
return (args < arg.args) && (arglen < arg.arglen); }
645 { args = rhs.args; arglen = rhs.arglen;
return *
this; }
675 inline bool operator==(
const ArgumentMap &rhs)
const
676 {
return (impl == rhs.impl); }
677 inline bool operator<(
const ArgumentMap &rhs)
const
678 {
return (impl < rhs.impl); }
693 bool replace =
true);
701 bool replace =
true);
725 template<
typename PT,
unsigned DIM>
727 bool replace =
false);
733 template<
typename PT,
unsigned DIM>
736 FRIEND_ALL_RUNTIME_CLASSES
737 Internal::ArgumentMapImpl *impl;
739 explicit ArgumentMap(Internal::ArgumentMapImpl *i);
767 FRIEND_ALL_RUNTIME_CLASSES
768 Internal::PredicateImpl *impl;
770 explicit Predicate(Internal::PredicateImpl *impl);
774 inline bool operator==(
const Predicate &p)
const;
775 inline bool operator<(
const Predicate &p)
const;
776 inline bool operator!=(
const Predicate &p)
const;
819 FRIEND_ALL_RUNTIME_CLASSES
822 bool operator<(
const Lock &rhs)
const;
823 bool operator==(
const Lock &rhs)
const;
825 void acquire(
unsigned mode = 0,
bool exclusive =
true);
828 Reservation reservation_lock;
866 FRIEND_ALL_RUNTIME_CLASSES
867 explicit Grant(Internal::GrantImpl *impl);
869 bool operator==(
const Grant &g)
const
870 {
return impl == g.impl; }
871 bool operator<(
const Grant &g)
const
872 {
return impl < g.impl; }
873 Grant& operator=(
const Grant &g);
875 Internal::GrantImpl *impl;
911 FRIEND_ALL_RUNTIME_CLASSES
914 bool operator<(
const PhaseBarrier &rhs)
const;
915 bool operator==(
const PhaseBarrier &rhs)
const;
916 bool operator!=(
const PhaseBarrier &rhs)
const;
918 void arrive(
unsigned count = 1);
920 void alter_arrival_count(
int delta);
921 Realm::Barrier get_barrier(
void)
const {
return phase_barrier; }
922 bool exists(
void)
const;
925 friend std::ostream& operator<<(std::ostream& os,
const PhaseBarrier& pb);
947 FRIEND_ALL_RUNTIME_CLASSES
951 void arrive(
const void *value,
size_t size,
unsigned count = 1);
983 PrivilegeMode _priv, CoherenceProperty _prop,
985 bool _verified =
false);
990 const std::set<FieldID> &privilege_fields,
991 const std::vector<FieldID> &instance_fields,
992 PrivilegeMode _priv, CoherenceProperty _prop,
994 bool _verified =
false);
999 const std::set<FieldID> &privilege_fields,
1000 const std::vector<FieldID> &instance_fields,
1001 PrivilegeMode _priv, CoherenceProperty _prop,
1003 bool _verified =
false);
1009 const std::set<FieldID> &privilege_fields,
1010 const std::vector<FieldID> &instance_fields,
1011 ReductionOpID op, CoherenceProperty _prop,
1013 bool _verified =
false);
1018 const std::set<FieldID> &privilege_fields,
1019 const std::vector<FieldID> &instance_fields,
1020 ReductionOpID op, CoherenceProperty _prop,
1022 bool _verified =
false);
1027 const std::set<FieldID> &privilege_fields,
1028 const std::vector<FieldID> &instance_fields,
1029 ReductionOpID op, CoherenceProperty _prop,
1031 bool _verified =
false);
1036 MappingTagID _tag = 0,
bool _verified =
false);
1038 PrivilegeMode _priv, CoherenceProperty _prop,
1040 bool _verified =
false);
1042 PrivilegeMode _priv, CoherenceProperty _prop,
1044 bool _verified =
false);
1047 MappingTagID _tag = 0,
bool _verified =
false);
1049 ReductionOpID op, CoherenceProperty _prop,
1051 bool _verified =
false);
1053 ReductionOpID op, CoherenceProperty _prop,
1055 bool _verified =
false);
1071 bool instance =
true);
1075 inline bool is_verified(
void)
const
1076 {
return (
flags & LEGION_VERIFIED_FLAG); }
1077 inline bool is_no_access(
void)
const
1078 {
return (
flags & LEGION_NO_ACCESS_FLAG); }
1079 inline bool is_restricted(
void)
const
1080 {
return (
flags & LEGION_RESTRICTED_FLAG); }
1081 inline bool must_premap(
void)
const
1082 {
return (
flags & LEGION_MUST_PREMAP_FLAG); }
1084 const void* get_projection_args(
size_t *size)
const;
1085 void set_projection_args(
const void *args,
size_t size,
bool own =
false);
1087 #ifdef LEGION_PRIVILEGE_CHECKS
1088 unsigned get_accessor_privilege(
void)
const;
1090 bool has_field_privilege(FieldID fid)
const;
1121 AllocateMode privilege;
1129 bool _verified =
false);
1149 AllocateMode privilege;
1155 bool _verified =
false);
1190 Internal::FutureImpl *impl;
1193 FRIEND_ALL_RUNTIME_CLASSES
1194 explicit Future(Internal::FutureImpl *impl,
1195 bool need_reference =
true);
1197 bool operator==(
const Future &f)
const
1198 {
return impl == f.impl; }
1199 bool operator<(
const Future &f)
const
1200 {
return impl < f.impl; }
1201 Future& operator=(
const Future &f);
1202 Future& operator=(Future &&f);
1212 template<
typename T>
1213 inline T
get_result(
bool silence_warnings =
false,
1214 const char *warning_string = NULL)
const;
1221 const char *warning_string = NULL)
const;
1233 bool is_empty(
bool block =
false,
bool silence_warnings =
false,
1234 const char *warning_string = NULL)
const;
1242 bool is_ready(
bool subscribe =
false)
const;
1257 template<
typename T>
1258 inline const T&
get_reference(
bool silence_warnings =
false,
1259 const char *warning_string = NULL)
const;
1271 const char *warning_string = NULL)
const;
1278 template<
typename T>
1281 inline bool valid(
void)
const;
1283 inline void wait(
void)
const;
1290 template<
typename T>
1301 void* get_untyped_result(
bool silence_warnings,
1302 const char *warning_string,
1303 bool check_size,
size_t future_size = 0)
const;
1326 Internal::FutureMapImpl *impl;
1329 FRIEND_ALL_RUNTIME_CLASSES
1330 explicit FutureMap(Internal::FutureMapImpl *impl,
1331 bool need_reference =
true);
1333 inline bool operator==(
const FutureMap &f)
const
1334 {
return impl == f.impl; }
1335 inline bool operator<(
const FutureMap &f)
const
1336 {
return impl < f.impl; }
1339 FutureMap& operator=(
const FutureMap &f);
1340 FutureMap& operator=(FutureMap &&f);
1350 template<
typename T>
1352 bool silence_warnings =
false,
1353 const char *warning_string = NULL)
const;
1370 bool silence_warnings =
false,
1371 const char *warning_string = NULL)
const;
1380 template<
typename RT,
typename PT,
unsigned DIM>
1381 inline RT
get_result(
const PT point[DIM])
const;
1390 template<
typename PT,
unsigned DIM>
1397 template<
typename PT,
unsigned DIM>
1407 const char *warning_string = NULL)
const;
1427 unsigned previous_req_index,
1428 unsigned current_req_index,
1429 DependenceType dtype,
1430 bool validates =
false,
1431 bool shard_only =
false);
1433 inline void add_field(FieldID fid);
1438 unsigned previous_offset;
1440 unsigned previous_req_index;
1442 unsigned current_req_index;
1444 DependenceType dependence_type;
1451 std::set<FieldID> dependent_fields;
1468 MappingTagID tag = 0,
1470 const char *provenance =
"");
1476 inline void add_field(
unsigned idx, FieldID fid,
bool inst =
true);
1478 inline void add_future(
Future f);
1479 inline void add_grant(
Grant g);
1485 inline void set_predicate_false_future(
Future f);
1488 inline void set_independent_requirements(
bool independent);
1491 std::vector<IndexSpaceRequirement> index_requirements;
1492 std::vector<RegionRequirement> region_requirements;
1493 std::vector<Future> futures;
1494 std::vector<Grant> grants;
1495 std::vector<PhaseBarrier> wait_barriers;
1496 std::vector<PhaseBarrier> arrive_barriers;
1513 Future predicate_false_future;
1517 std::string provenance;
1521 const std::vector<StaticDependence> *static_dependences;
1531 bool enable_inlining;
1541 bool local_function_task;
1547 bool independent_requirements;
1551 bool elide_future_return;
1553 bool silence_warnings;
1574 MappingTagID tag = 0,
1576 const char *provenance =
"");
1584 MappingTagID tag = 0,
1586 const char *provenance =
"");
1592 inline void add_field(
unsigned idx, FieldID fid,
bool inst =
true);
1594 inline void add_future(
Future f);
1595 inline void add_grant(
Grant g);
1601 inline void set_predicate_false_future(
Future f);
1604 inline void set_independent_requirements(
bool independent);
1612 std::vector<IndexSpaceRequirement> index_requirements;
1613 std::vector<RegionRequirement> region_requirements;
1614 std::vector<Future> futures;
1617 std::vector<ArgumentMap> point_futures;
1618 std::vector<Grant> grants;
1619 std::vector<PhaseBarrier> wait_barriers;
1620 std::vector<PhaseBarrier> arrive_barriers;
1624 bool must_parallelism;
1634 Future predicate_false_future;
1638 std::string provenance;
1642 const std::vector<StaticDependence> *static_dependences;
1652 bool enable_inlining;
1658 bool independent_requirements;
1662 bool elide_future_return;
1664 bool silence_warnings;
1680 MappingTagID tag = 0,
1681 LayoutConstraintID layout_id = 0,
1683 const char *provenance =
"");
1685 inline void add_field(FieldID fid,
bool inst =
true);
1687 inline void add_grant(
Grant g);
1694 std::vector<Grant> grants;
1695 std::vector<PhaseBarrier> wait_barriers;
1696 std::vector<PhaseBarrier> arrive_barriers;
1701 LayoutConstraintID layout_constraint_id;
1704 std::string provenance;
1708 const std::vector<StaticDependence> *static_dependences;
1738 MapperID
id = 0, MappingTagID tag = 0,
1740 const char *provenance =
"");
1744 inline void add_src_field(
unsigned idx, FieldID fid,
bool inst =
true);
1745 inline void add_dst_field(
unsigned idx, FieldID fid,
bool inst =
true);
1748 inline void add_src_indirect_field(FieldID src_idx_fid,
1750 bool is_range_indirection =
false,
1752 inline void add_dst_indirect_field(FieldID dst_idx_fid,
1754 bool is_range_indirection =
false,
1758 bool is_range_indirection =
false);
1761 bool is_range_indirection =
false);
1763 inline void add_grant(
Grant g);
1769 std::vector<RegionRequirement> src_requirements;
1770 std::vector<RegionRequirement> dst_requirements;
1771 std::vector<RegionRequirement> src_indirect_requirements;
1772 std::vector<RegionRequirement> dst_indirect_requirements;
1773 std::vector<bool> src_indirect_is_range;
1774 std::vector<bool> dst_indirect_is_range;
1775 std::vector<Grant> grants;
1776 std::vector<PhaseBarrier> wait_barriers;
1777 std::vector<PhaseBarrier> arrive_barriers;
1789 std::string provenance;
1793 const std::vector<StaticDependence> *static_dependences;
1797 bool possible_src_indirect_out_of_range;
1798 bool possible_dst_indirect_out_of_range;
1801 bool possible_dst_indirect_aliasing;
1803 bool silence_warnings;
1820 MapperID
id = 0, MappingTagID tag = 0,
1822 const char *provenance =
"");
1824 MapperID
id = 0, MappingTagID tag = 0,
1826 const char *provenance =
"");
1830 inline void add_src_field(
unsigned idx, FieldID fid,
bool inst =
true);
1831 inline void add_dst_field(
unsigned idx, FieldID fid,
bool inst =
true);
1834 inline void add_src_indirect_field(FieldID src_idx_fid,
1836 bool is_range_indirection =
false,
1838 inline void add_dst_indirect_field(FieldID dst_idx_fid,
1840 bool is_range_indirection =
false,
1844 bool is_range_indirection =
false);
1847 bool is_range_indirection =
false);
1849 inline void add_grant(
Grant g);
1855 std::vector<RegionRequirement> src_requirements;
1856 std::vector<RegionRequirement> dst_requirements;
1857 std::vector<RegionRequirement> src_indirect_requirements;
1858 std::vector<RegionRequirement> dst_indirect_requirements;
1859 std::vector<bool> src_indirect_is_range;
1860 std::vector<bool> dst_indirect_is_range;
1861 std::vector<Grant> grants;
1862 std::vector<PhaseBarrier> wait_barriers;
1863 std::vector<PhaseBarrier> arrive_barriers;
1875 std::string provenance;
1879 const std::vector<StaticDependence> *static_dependences;
1883 bool possible_src_indirect_out_of_range;
1884 bool possible_dst_indirect_out_of_range;
1887 bool possible_dst_indirect_aliasing;
1892 bool collective_src_indirect_points;
1893 bool collective_dst_indirect_points;
1895 bool silence_warnings;
1909 MapperID
id = 0, MappingTagID tag = 0,
1911 const char *provenance =
"");
1914 MapperID
id = 0, MappingTagID tag = 0,
1916 const char *provenance =
"");
1919 inline void set_future(
Future f);
1920 inline void add_field(FieldID fid);
1921 inline void add_grant(
Grant g);
1932 std::set<FieldID> fields;
1933 std::vector<Grant> grants;
1934 std::vector<PhaseBarrier> wait_barriers;
1935 std::vector<PhaseBarrier> arrive_barriers;
1946 std::string provenance;
1950 const std::vector<StaticDependence> *static_dependences;
1952 bool silence_warnings;
1970 ProjectionID projection = 0,
1972 MapperID
id = 0, MappingTagID tag = 0,
1974 const char *provenance =
"");
1977 ProjectionID projection = 0,
1979 MapperID
id = 0, MappingTagID tag = 0,
1981 const char *provenance =
"");
1984 ProjectionID projection = 0,
1986 MapperID
id = 0, MappingTagID tag = 0,
1988 const char *provenance =
"");
1991 ProjectionID projection = 0,
1993 MapperID
id = 0, MappingTagID tag = 0,
1995 const char *provenance =
"");
1999 ProjectionID projection = 0,
2001 MapperID
id = 0, MappingTagID tag = 0,
2003 const char *provenance =
"");
2006 ProjectionID projection = 0,
2008 MapperID
id = 0, MappingTagID tag = 0,
2010 const char *provenance =
"");
2013 ProjectionID projection = 0,
2015 MapperID
id = 0, MappingTagID tag = 0,
2017 const char *provenance =
"");
2020 ProjectionID projection = 0,
2022 MapperID
id = 0, MappingTagID tag = 0,
2024 const char *provenance =
"");
2027 inline void set_future(
Future f);
2028 inline void add_field(FieldID fid);
2029 inline void add_grant(
Grant g);
2043 ProjectionID projection;
2047 std::set<FieldID> fields;
2048 std::vector<Grant> grants;
2049 std::vector<PhaseBarrier> wait_barriers;
2050 std::vector<PhaseBarrier> arrive_barriers;
2056 std::string provenance;
2060 const std::vector<StaticDependence> *static_dependences;
2062 bool silence_warnings;
2079 const bool restricted =
true,
2080 const bool mapped =
true);
2082 inline void attach_file(
const char *file_name,
2083 const std::vector<FieldID> &fields,
2084 LegionFileMode mode);
2085 inline void attach_hdf5(
const char *file_name,
2086 const std::map<FieldID,const char*> &field_map,
2087 LegionFileMode mode);
2090 inline void attach_array_aos(
void *base,
bool column_major,
2091 const std::vector<FieldID> &fields,
2092 Memory memory = Memory::NO_MEMORY,
2093 const std::map<FieldID,size_t> *alignments = NULL);
2094 inline void attach_array_soa(
void *base,
bool column_major,
2095 const std::vector<FieldID> &fields,
2096 Memory memory = Memory::NO_MEMORY,
2097 const std::map<FieldID,size_t> *alignments = NULL);
2099 ExternalResource resource;
2108 std::string provenance;
2111 const char *file_name;
2112 LegionFileMode mode;
2113 std::vector<FieldID> file_fields;
2114 std::map<FieldID,
const char*> field_files;
2117 LayoutConstraintSet constraints;
2118 std::set<FieldID> privilege_fields;
2125 const std::vector<StaticDependence> *static_dependences;
2138 const bool restricted =
true);
2141 const char *file_name,
2142 const std::vector<FieldID> &fields,
2143 LegionFileMode mode);
2145 const char *file_name,
2146 const std::map<FieldID,const char*> &field_map,
2147 LegionFileMode mode);
2151 void *base,
bool column_major,
2152 const std::vector<FieldID> &fields,
2153 Memory memory = Memory::NO_MEMORY,
2154 const std::map<FieldID,size_t> *alignments = NULL);
2156 void *base,
bool column_major,
2157 const std::vector<FieldID> &fields,
2158 Memory memory = Memory::NO_MEMORY,
2159 const std::map<FieldID,size_t> *alignments = NULL);
2161 ExternalResource resource;
2162 std::vector<LogicalRegion> handles;
2169 bool deduplicate_across_shards;
2172 std::string provenance;
2175 LegionFileMode mode;
2176 std::vector<const char*> file_names;
2177 std::vector<FieldID> file_fields;
2179 std::vector<
const char*> > field_files;
2182 LayoutConstraintSet constraints;
2183 std::vector<PointerConstraint> pointers;
2184 std::set<FieldID> privilege_fields;
2187 std::vector<size_t> footprint;
2191 const std::vector<StaticDependence> *static_dependences;
2204 inline void add_predicate(
const Predicate &pred);
2207 std::vector<Predicate> predicates;
2208 std::string provenance;
2220 inline void add_precondition(
const Future &f);
2222 TimingMeasurement measurement;
2223 std::set<Future> preconditions;
2226 std::string provenance;
2237 MapperID mapper = 0,
2238 MappingTagID tag = 0);
2244 std::vector<Future> futures;
2247 std::string provenance;
2268 const char *layout_name = NULL);
2271 add_constraint(
const SpecializedConstraint &constraint);
2273 add_constraint(
const MemoryConstraint &constraint);
2275 add_constraint(
const OrderingConstraint &constraint);
2277 add_constraint(
const SplittingConstraint &constraint);
2279 add_constraint(
const FieldConstraint &constraint);
2281 add_constraint(
const DimensionConstraint &constraint);
2283 add_constraint(
const AlignmentConstraint &constraint);
2285 add_constraint(
const OffsetConstraint &constraint);
2287 add_constraint(
const PointerConstraint &constraint);
2290 LayoutConstraintSet layout_constraints;
2291 const char* layout_name;
2306 const char *variant_name = NULL);
2308 bool global =
true);
2311 add_constraint(
const ISAConstraint &constraint);
2313 add_constraint(
const ProcessorConstraint &constraint);
2315 add_constraint(
const ResourceConstraint &constraint);
2317 add_constraint(
const LaunchConstraint &constraint);
2319 add_constraint(
const ColocationConstraint &constraint);
2322 add_layout_constraint_set(
unsigned index, LayoutConstraintID desc);
2324 inline void set_leaf(
bool is_leaf =
true);
2325 inline void set_inner(
bool is_inner =
true);
2326 inline void set_idempotent(
bool is_idempotent =
true);
2327 inline void set_replicable(
bool is_replicable =
true);
2329 inline void add_generator_task(TaskID tid);
2332 bool global_registration;
2333 const char* task_variant_name;
2335 ExecutionConstraintSet execution_constraints;
2336 TaskLayoutConstraintSet layout_constraints;
2339 std::set<TaskID> generator_tasks;
2343 bool idempotent_variant;
2344 bool replicable_variant;
2366 Internal::PhysicalRegionImpl *impl;
2368 FRIEND_ALL_RUNTIME_CLASSES
2371 PhysicalRegion& operator=(
const PhysicalRegion &rhs);
2372 PhysicalRegion& operator=(PhysicalRegion &&rhs);
2373 inline bool operator==(
const PhysicalRegion ®)
const
2374 {
return (impl == reg.impl); }
2375 inline bool operator<(
const PhysicalRegion ®)
const
2376 {
return (impl < reg.impl); }
2390 const char *warning_string = NULL);
2413 LEGION_DEPRECATED(
"All accessors in the LegionRuntime::Accessor "
2414 "namespace are now deprecated. FieldAccessor "
2415 "from the Legion namespace should be used now.")
2416 LegionRuntime::Accessor::RegionAccessor<
2417 LegionRuntime::Accessor::AccessorType::Generic>
2427 LEGION_DEPRECATED(
"All accessors in the LegionRuntime::Accessor "
2428 "namespace are now deprecated. FieldAccessor "
2429 "from the Legion namespace should be used now.")
2430 LegionRuntime::Accessor::RegionAccessor<
2431 LegionRuntime::Accessor::AccessorType::Generic>
2433 bool silence_warnings =
false)
const;
2438 bool silence_warnings =
false,
2439 const char *warning_string = NULL)
const;
2443 void get_fields(std::vector<FieldID>& fields)
const;
2445 template<
int DIM,
typename COORD_T>
2446 DomainT<DIM,COORD_T> get_bounds(
void)
const;
2449 template<
int DIM,
typename COORD_T>
2450 operator DomainT<DIM,COORD_T>(void)
const;
2453 template<
int DIM,
typename COORD_T>
2454 operator Rect<DIM,COORD_T>(void)
const;
2457 template<PrivilegeMode,
typename,
int,
typename,
typename,
bool>
2459 template<
typename,
bool,
int,
typename,
typename,
bool>
2461 template<
typename,
int,
typename,
typename,
bool,
bool,
int>
2462 friend class MultiRegionAccessor;
2463 template<
typename,
int,
typename,
typename>
2465 template<
typename, PrivilegeMode>
2470 template<PrivilegeMode,
typename,
int,
typename>
2472 template<
typename,
int,
typename>
2473 friend class UnsafeSpanIterator;
2474 Realm::RegionInstance get_instance_info(PrivilegeMode mode,
2475 FieldID fid,
size_t field_size,
2476 void *realm_is, TypeTag type_tag,
2477 const char *warning_string,
2478 bool silence_warnings,
2479 bool generic_accessor,
2480 bool check_field_size,
2481 ReductionOpID redop = 0)
const;
2482 Realm::RegionInstance get_instance_info(PrivilegeMode mode,
2483 const std::vector<PhysicalRegion> &other_regions,
2484 FieldID fid,
size_t field_size,
2485 void *realm_is, TypeTag type_tag,
2486 const char *warning_string,
2487 bool silence_warnings,
2488 bool generic_accessor,
2489 bool check_field_size,
2491 ReductionOpID redop = 0)
const;
2492 void report_incompatible_accessor(
const char *accessor_kind,
2493 Realm::RegionInstance instance, FieldID fid)
const;
2494 void report_incompatible_multi_accessor(
unsigned index, FieldID fid,
2495 Realm::RegionInstance inst1,
2496 Realm::RegionInstance inst2)
const;
2497 void report_colocation_violation(
const char *accessor_kind, FieldID fid,
2498 Realm::RegionInstance inst1,
2499 Realm::RegionInstance inst2,
2500 const PhysicalRegion &other,
2501 bool reduction =
false)
const;
2502 static void empty_colocation_regions(
const char *accessor_kind,
2503 FieldID fid,
bool reduction =
false);
2504 static void fail_bounds_check(
DomainPoint p, FieldID fid,
2505 PrivilegeMode mode,
bool multi =
false);
2506 static void fail_bounds_check(
Domain d, FieldID fid,
2507 PrivilegeMode mode,
bool multi =
false);
2508 static void fail_privilege_check(
DomainPoint p, FieldID fid,
2509 PrivilegeMode mode);
2510 static void fail_privilege_check(
Domain d, FieldID fid,
2511 PrivilegeMode mode);
2513 void get_bounds(
void *realm_is, TypeTag type_tag)
const;
2530 Internal::ExternalResourcesImpl *impl;
2532 FRIEND_ALL_RUNTIME_CLASSES
2535 ExternalResources& operator=(
const ExternalResources &rhs);
2536 ExternalResources& operator=(ExternalResources &&rhs);
2537 inline bool operator==(
const ExternalResources ®)
const
2538 {
return (impl == reg.impl); }
2539 inline bool operator<(
const ExternalResources ®)
const
2540 {
return (impl < reg.impl); }
2542 size_t size(
void)
const;
2583 template<PrivilegeMode MODE,
typename FT,
int N,
typename COORD_T = coord_t,
2584 typename A = Realm::GenericAccessor<FT,N,COORD_T>,
2585 #ifdef LEGION_BOUNDS_CHECKS
2586 bool CHECK_BOUNDS =
true>
2588 bool CHECK_BOUNDS =
false>
2592 static_assert(N > 0,
"N must be positive");
2593 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
2599 size_t actual_field_size =
sizeof(FT),
2601 bool check_field_size =
true,
2603 bool check_field_size =
false,
2605 bool silence_warnings =
false,
2606 const char *warning_string = NULL,
2607 size_t subfield_offset = 0) { }
2613 const Rect<N,COORD_T> bounds,
2616 size_t actual_field_size =
sizeof(FT),
2618 bool check_field_size =
true,
2620 bool check_field_size =
false,
2622 bool silence_warnings =
false,
2623 const char *warning_string = NULL,
2624 size_t subfield_offset = 0) { }
2632 size_t actual_field_size =
sizeof(FT),
2634 bool check_field_size =
true,
2636 bool check_field_size =
false,
2638 bool silence_warnings =
false,
2639 const char *warning_string = NULL,
2640 size_t subfield_offset = 0) { }
2646 const Rect<N,COORD_T> bounds,
2649 size_t actual_field_size =
sizeof(FT),
2651 bool check_field_size =
true,
2653 bool check_field_size =
false,
2655 bool silence_warnings =
false,
2656 const char *warning_string = NULL,
2657 size_t subfield_offset = 0) { }
2662 template<
typename InputIterator>
2664 InputIterator stop_region, FieldID fid,
2667 size_t actual_field_size =
sizeof(FT),
2669 bool check_field_size =
true,
2671 bool check_field_size =
false,
2673 bool silence_warnings =
false,
2674 const char *warning_string = NULL,
2675 size_t subfield_offset = 0) { }
2681 template<
typename InputIterator>
2683 InputIterator stop_region, FieldID fid,
2684 const Rect<N,COORD_T> bounds,
2687 size_t actual_field_size =
sizeof(FT),
2689 bool check_field_size =
true,
2691 bool check_field_size =
false,
2693 bool silence_warnings =
false,
2694 const char *warning_string = NULL,
2695 size_t subfield_offset = 0) { }
2699 template<
typename InputIterator,
int M>
2701 InputIterator stop_region, FieldID fid,
2705 size_t actual_field_size =
sizeof(FT),
2707 bool check_field_size =
true,
2709 bool check_field_size =
false,
2711 bool silence_warnings =
false,
2712 const char *warning_string = NULL,
2713 size_t subfield_offset = 0) { }
2717 template<
typename InputIterator,
int M>
2719 InputIterator stop_region, FieldID fid,
2721 const Rect<N,COORD_T> bounds,
2724 size_t actual_field_size =
sizeof(FT),
2726 bool check_field_size =
true,
2728 bool check_field_size =
false,
2730 bool silence_warnings =
false,
2731 const char *warning_string = NULL,
2732 size_t subfield_offset = 0) { }
2739 size_t actual_field_size =
sizeof(FT),
2741 bool check_field_size =
true,
2743 bool check_field_size =
false,
2745 bool silence_warnings =
false,
2746 const char *warning_string = NULL,
2747 size_t subfield_offset = 0) { }
2752 const Rect<N,COORD_T> &bounds,
2755 size_t actual_field_size =
sizeof(FT),
2757 bool check_field_size =
true,
2759 bool check_field_size =
false,
2761 bool silence_warnings =
false,
2762 const char *warning_string = NULL,
2763 size_t subfield_offset = 0) { }
2770 size_t actual_field_size =
sizeof(FT),
2772 bool check_field_size =
true,
2774 bool check_field_size =
false,
2776 bool silence_warnings =
false,
2777 const char *warning_string = NULL,
2778 size_t subfield_offset = 0) { }
2783 const Rect<N,COORD_T> &bounds,
2786 size_t actual_field_size =
sizeof(FT),
2788 bool check_field_size =
true,
2790 bool check_field_size =
false,
2792 bool silence_warnings =
false,
2793 const char *warning_string = NULL,
2794 size_t subfield_offset = 0) { }
2803 size_t actual_field_size =
sizeof(FT),
2805 bool check_field_size =
true,
2807 bool check_field_size =
false,
2809 bool silence_warnings =
false,
2810 const char *warning_string = NULL,
2811 size_t subfield_offset = 0) { }
2818 const Rect<N,COORD_T> &bounds,
2821 size_t actual_field_size =
sizeof(FT),
2823 bool check_field_size =
true,
2825 bool check_field_size =
false,
2827 bool silence_warnings =
false,
2828 const char *warning_string = NULL,
2829 size_t subfield_offset = 0) { }
2831 typedef FT value_type;
2832 typedef FT& reference;
2833 typedef const FT& const_reference;
2834 static const int dim = N;
2849 template<
typename REDOP,
bool EXCLUSIVE,
int N,
typename COORD_T = coord_t,
2850 typename A = Realm::GenericAccessor<typename REDOP::RHS,N,COORD_T>,
2851 #ifdef LEGION_BOUNDS_CHECKS
2852 bool CHECK_BOUNDS =
true>
2854 bool CHECK_BOUNDS =
false>
2858 static_assert(N > 0,
"N must be positive");
2859 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
2863 ReductionOpID redop,
bool silence_warnings =
false,
2864 const char *warning_string = NULL,
2865 size_t subfield_offset = 0,
2866 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2868 bool check_field_size =
true
2870 bool check_field_size =
false
2878 ReductionOpID redop,
2879 const Rect<N,COORD_T> bounds,
2880 bool silence_warnings =
false,
2881 const char *warning_string = NULL,
2882 size_t subfield_offset = 0,
2883 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2885 bool check_field_size =
true
2887 bool check_field_size =
false
2894 ReductionOpID redop,
2896 bool silence_warnings =
false,
2897 const char *warning_string = NULL,
2898 size_t subfield_offset = 0,
2899 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2901 bool check_field_size =
true
2903 bool check_field_size =
false
2910 ReductionOpID redop,
2912 const Rect<N,COORD_T> bounds,
2913 bool silence_warnings =
false,
2914 const char *warning_string = NULL,
2915 size_t subfield_offset = 0,
2916 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2918 bool check_field_size =
true
2920 bool check_field_size =
false
2927 template<
typename InputIterator>
2929 InputIterator stop_region, FieldID fid,
2930 ReductionOpID redop,
bool silence_warnings =
false,
2931 const char *warning_string = NULL,
2932 size_t subfield_offset = 0,
2933 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2935 bool check_field_size =
true
2937 bool check_field_size =
false
2945 template<
typename InputIterator>
2947 InputIterator stop_region, FieldID fid,
2948 ReductionOpID redop,
2949 const Rect<N,COORD_T> bounds,
2950 bool silence_warnings =
false,
2951 const char *warning_string = NULL,
2952 size_t subfield_offset = 0,
2953 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2955 bool check_field_size =
true
2957 bool check_field_size =
false
2963 template<
typename InputIterator,
int M>
2965 InputIterator stop_region, FieldID fid,
2966 ReductionOpID redop,
2968 bool silence_warnings =
false,
2969 const char *warning_string = NULL,
2970 size_t subfield_offset = 0,
2971 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2973 bool check_field_size =
true
2975 bool check_field_size =
false
2981 template<
typename InputIterator,
int M>
2983 InputIterator stop_region, FieldID fid,
2984 ReductionOpID redop,
2986 const Rect<N,COORD_T> bounds,
2987 bool silence_warnings =
false,
2988 const char *warning_string = NULL,
2989 size_t subfield_offset = 0,
2990 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
2992 bool check_field_size =
true
2994 bool check_field_size =
false
3001 bool silence_warnings =
false,
3002 const char *warning_string = NULL,
3003 size_t subfield_offset = 0,
3004 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
3006 bool check_field_size =
true
3008 bool check_field_size =
false
3015 const Rect<N,COORD_T> &bounds,
3016 bool silence_warnings =
false,
3017 const char *warning_string = NULL,
3018 size_t subfield_offset = 0,
3019 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
3021 bool check_field_size =
true
3023 bool check_field_size =
false
3030 bool silence_warnings =
false,
3031 const char *warning_string = NULL,
3032 size_t subfield_offset = 0,
3033 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
3035 bool check_field_size =
true
3037 bool check_field_size =
false
3044 const Rect<N,COORD_T> &bounds,
3045 bool silence_warnings =
false,
3046 const char *warning_string = NULL,
3047 size_t subfield_offset = 0,
3048 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
3050 bool check_field_size =
true
3052 bool check_field_size =
false
3061 bool silence_warnings =
false,
3062 const char *warning_string = NULL,
3063 size_t subfield_offset = 0,
3064 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
3066 bool check_field_size =
true
3068 bool check_field_size =
false
3077 const Rect<N,COORD_T> &bounds,
3078 bool silence_warnings =
false,
3079 const char *warning_string = NULL,
3080 size_t subfield_offset = 0,
3081 size_t actual_field_size =
sizeof(
typename REDOP::RHS),
3083 bool check_field_size =
true
3085 bool check_field_size =
false
3089 typedef typename REDOP::RHS value_type;
3090 typedef typename REDOP::RHS& reference;
3091 typedef const typename REDOP::RHS& const_reference;
3092 static const int dim = N;
3095 #ifdef LEGION_MULTI_REGION_ACCESSOR
3129 template<
typename FT,
int N,
typename COORD_T = coord_t,
3130 typename A = Realm::GenericAccessor<FT,N,COORD_T>,
3131 #ifdef LEGION_BOUNDS_CHECKS
3132 bool CHECK_BOUNDS =
true,
3134 bool CHECK_BOUNDS =
false,
3136 #ifdef LEGION_PRIVILEGE_CHECKS
3137 bool CHECK_PRIVILEGES =
true,
3139 bool CHECK_PRIVILEGES =
false,
3144 int MAX_REGIONS = 4>
3145 class MultiRegionAccessor {
3147 static_assert(N > 0,
"N must be positive");
3148 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
3150 MultiRegionAccessor(
void) { }
3152 template<
typename InputIterator>
3153 MultiRegionAccessor(InputIterator start, InputIterator stop,
3156 FieldID fid,
size_t actual_field_size =
sizeof(FT),
3158 bool check_field_size =
true,
3160 bool check_field_size =
false,
3162 bool silence_warnings =
false,
3163 const char *warning_string = NULL,
3164 size_t subfield_offset = 0) { }
3166 template<
typename InputIterator>
3167 MultiRegionAccessor(InputIterator start, InputIterator stop,
3168 const Rect<N,COORD_T> bounds, FieldID fid,
3171 size_t actual_field_size =
sizeof(FT),
3173 bool check_field_size =
true,
3175 bool check_field_size =
false,
3177 bool silence_warnings =
false,
3178 const char *warning_string = NULL,
3179 size_t subfield_offset = 0) { }
3181 template<
int M,
typename InputIterator>
3182 MultiRegionAccessor(InputIterator start, InputIterator stop,
3183 const AffineTransform<M,N,COORD_T> transform,
3186 FieldID fid,
size_t actual_field_size =
sizeof(FT),
3188 bool check_field_size =
true,
3190 bool check_field_size =
false,
3192 bool silence_warnings =
false,
3193 const char *warning_string = NULL,
3194 size_t subfield_offset = 0) { }
3196 template<
int M,
typename InputIterator>
3197 MultiRegionAccessor(InputIterator start, InputIterator stop,
3198 const AffineTransform<M,N,COORD_T> transform,
3199 const Rect<N,COORD_T> bounds, FieldID fid,
3202 size_t actual_field_size =
sizeof(FT),
3204 bool check_field_size =
true,
3206 bool check_field_size =
false,
3208 bool silence_warnings =
false,
3209 const char *warning_string = NULL,
3210 size_t subfield_offset = 0) { }
3212 MultiRegionAccessor(
const std::vector<PhysicalRegion> ®ions,
3215 FieldID fid,
size_t actual_field_size =
sizeof(FT),
3217 bool check_field_size =
true,
3219 bool check_field_size =
false,
3221 bool silence_warnings =
false,
3222 const char *warning_string = NULL,
3223 size_t subfield_offset = 0) { }
3225 MultiRegionAccessor(
const std::vector<PhysicalRegion> ®ions,
3226 const Rect<N,COORD_T> bounds, FieldID fid,
3229 size_t actual_field_size =
sizeof(FT),
3231 bool check_field_size =
true,
3233 bool check_field_size =
false,
3235 bool silence_warnings =
false,
3236 const char *warning_string = NULL,
3237 size_t subfield_offset = 0) { }
3240 MultiRegionAccessor(
const std::vector<PhysicalRegion> ®ions,
3241 const AffineTransform<M,N,COORD_T> transform,
3244 FieldID fid,
size_t actual_field_size =
sizeof(FT),
3246 bool check_field_size =
true,
3248 bool check_field_size =
false,
3250 bool silence_warnings =
false,
3251 const char *warning_string = NULL,
3252 size_t subfield_offset = 0) { }
3255 MultiRegionAccessor(
const std::vector<PhysicalRegion> ®ions,
3256 const AffineTransform<M,N,COORD_T> transform,
3257 const Rect<N,COORD_T> bounds, FieldID fid,
3260 size_t actual_field_size =
sizeof(FT),
3262 bool check_field_size =
true,
3264 bool check_field_size =
false,
3266 bool silence_warnings =
false,
3267 const char *warning_string = NULL,
3268 size_t subfield_offset = 0) { }
3270 typedef FT value_type;
3271 typedef FT& reference;
3272 typedef const FT& const_reference;
3273 static const int dim = N;
3275 #endif // LEGION_MULTI_REGION_ACCESSOR
3306 bool privilege_only,
3307 bool silence_warnings =
false,
3308 const char *warning_string = NULL);
3314 inline bool valid(
void)
const;
3317 inline operator bool(
void)
const;
3318 inline bool operator()(
void)
const;
3319 inline const Domain& operator*(
void)
const;
3320 inline const Domain* operator->(
void)
const;
3328 Internal::PieceIteratorImpl *impl;
3339 template<
int DIM,
typename COORD_T = coord_t>
3342 static_assert(DIM > 0,
"DIM must be positive");
3343 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
3349 bool privilege_only,
3350 bool silence_warnings =
false,
3351 const char *warning_string = NULL);
3356 inline bool step(
void);
3357 inline const Rect<DIM,COORD_T>& operator*(
void)
const;
3358 inline const Rect<DIM,COORD_T>* operator->(
void)
const;
3362 Rect<DIM,COORD_T> current_rect;
3374 template<PrivilegeMode PM,
typename FT,
int DIM,
typename COORD_T = coord_t>
3377 static_assert(DIM > 0,
"DIM must be positive");
3378 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
3384 size_t actual_field_size =
sizeof(FT),
3386 bool check_field_size =
true,
3388 bool check_field_size =
false,
3391 bool privileges_only =
true,
3392 bool silence_warnings =
false,
3393 const char *warning_string = NULL);
3395 inline bool valid(
void)
const;
3396 inline bool step(
void);
3398 inline operator bool(
void)
const;
3399 inline bool operator()(
void)
const;
3406 Realm::MultiAffineAccessor<FT,DIM,COORD_T> accessor;
3408 Point<DIM,COORD_T> partial_step_point;
3410 int partial_step_dim;
3427 template<
typename T>
3431 size_t alignment = 16);
3434 inline T read(
void)
const;
3436 inline void write(T value)
const;
3438 inline T* ptr(
void)
const;
3440 inline T& ref(
void)
const;
3442 inline operator T(
void)
const;
3446 inline void finalize(
Runtime *runtime, Context ctx)
const;
3450 Realm::RegionInstance instance;
3451 Realm::AffineAccessor<T,1,coord_t> accessor;
3463 template<
typename REDOP,
bool EXCLUSIVE=false>
3469 inline void reduce(
typename REDOP::RHS val)
const;
3471 inline void operator<<=(
typename REDOP::RHS val)
const;
3482 const void *initial_value = NULL,
3483 size_t alignment = 16);
3485 Memory::Kind memory_kind = Memory::Z_COPY_MEM,
3486 const void *initial_value = NULL,
3487 size_t alignment = 16);
3488 template<
typename T>
3490 template<
typename REDOP,
bool EXCLUSIVE>
3493 template<
typename T>
3495 template<
typename REDOP,
bool EXCLUSIVE>
3498 void finalize(
Runtime *runtime, Context ctx)
const;
3499 Realm::RegionInstance get_instance()
const;
3501 template<PrivilegeMode,
typename,
int,
typename,
typename,
bool>
3503 template<
typename,
bool,
int,
typename,
typename,
bool>
3505 Realm::RegionInstance instance;
3526 template<
typename T,
int DIM,
typename COORD_T = coord_t,
3527 #ifdef LEGION_BOUNDS_CHECKS
3528 bool CHECK_BOUNDS =
true>
3530 bool CHECK_BOUNDS =
false>
3534 static_assert(DIM > 0,
"DIM must be positive");
3535 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
3541 const T *initial_value = NULL,
3542 size_t alignment = 16,
3543 bool fortran_order_dims =
false);
3546 const T *initial_value = NULL,
3547 size_t alignment = 16,
3548 bool fortran_order_dims =
false);
3552 const T *initial_value = NULL,
3553 size_t alignment = 16,
3554 bool fortran_order_dims =
false);
3557 const T *initial_value = NULL,
3558 size_t alignment = 16,
3559 bool fortran_order_dims =
false);
3563 std::array<DimensionKind,DIM> ordering,
3564 const T *initial_value = NULL,
3565 size_t alignment = 16);
3568 std::array<DimensionKind,DIM> ordering,
3569 const T *initial_value = NULL,
3570 size_t alignment = 16);
3573 std::array<DimensionKind,DIM> ordering,
3574 const T *initial_value = NULL,
3575 size_t alignment = 16);
3578 std::array<DimensionKind,DIM> ordering,
3579 const T *initial_value = NULL,
3580 size_t alignment = 16);
3582 Memory get_memory_from_kind(Memory::Kind kind);
3583 void initialize_layout(
size_t alignment,
bool fortran_order_dims);
3584 void initialize(Memory memory,
3585 DomainT<DIM,COORD_T> bounds,
3586 const T *initial_value);
3589 inline T read(
const Point<DIM,COORD_T> &p)
const;
3591 inline void write(
const Point<DIM,COORD_T> &p, T value)
const;
3593 inline T* ptr(
const Point<DIM,COORD_T> &p)
const;
3595 inline T* ptr(
const Rect<DIM,COORD_T> &r)
const;
3597 inline T* ptr(
const Rect<DIM,COORD_T> &r,
size_t strides[DIM])
const;
3599 inline T& operator[](
const Point<DIM,COORD_T> &p)
const;
3602 Realm::RegionInstance instance;
3603 Realm::AffineAccessor<T,DIM,COORD_T> accessor;
3604 std::array<DimensionKind,DIM> ordering;
3606 #ifdef LEGION_BOUNDS_CHECKS
3607 DomainT<DIM,COORD_T> bounds;
3617 template<
typename COORD_T = coord_t>
3620 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
3627 const void *initial_value = NULL,
3628 size_t alignment = 16,
3629 bool fortran_order_dims =
false);
3633 const void *initial_value = NULL,
3634 size_t alignment = 16,
3635 bool fortran_order_dims =
false);
3640 const void *initial_value = NULL,
3641 size_t alignment = 16,
3642 bool fortran_order_dims =
false);
3646 const void *initial_value = NULL,
3647 size_t alignment = 16,
3648 bool fortran_order_dims =
false);
3650 template<
typename T,
int DIM>
3653 template<
typename T,
int DIM,
bool BC>
3656 inline void destroy(
void);
3657 inline Realm::RegionInstance get_instance(
void)
const {
return instance; }
3659 template<PrivilegeMode,
typename,
int,
typename,
typename,
bool>
3661 template<
typename,
bool,
int,
typename,
typename,
bool>
3663 Realm::RegionInstance instance;
3689 MapperID
id = 0, MappingTagID tag = 0,
3691 const char *provenance =
"");
3693 inline void add_field(FieldID f);
3694 inline void add_grant(
Grant g);
3702 std::set<FieldID> fields;
3707 std::vector<Grant> grants;
3708 std::vector<PhaseBarrier> wait_barriers;
3709 std::vector<PhaseBarrier> arrive_barriers;
3716 std::string provenance;
3720 const std::vector<StaticDependence> *static_dependences;
3722 bool silence_warnings;
3737 MapperID
id = 0, MappingTagID tag = 0,
3739 const char *provenance =
"");
3741 inline void add_field(FieldID f);
3742 inline void add_grant(
Grant g);
3750 std::set<FieldID> fields;
3755 std::vector<Grant> grants;
3756 std::vector<PhaseBarrier> wait_barriers;
3757 std::vector<PhaseBarrier> arrive_barriers;
3764 std::string provenance;
3768 const std::vector<StaticDependence> *static_dependences;
3770 bool silence_warnings;
3794 inline void add_single_task(
const DomainPoint &point,
3799 MappingTagID mapping_tag;
3800 std::vector<TaskLauncher> single_tasks;
3801 std::vector<IndexTaskLauncher> index_tasks;
3810 std::string provenance;
3812 bool silence_warnings;
3835 Internal::LegionHandshakeImpl *impl;
3838 FRIEND_ALL_RUNTIME_CLASSES
3841 bool operator==(
const LegionHandshake &h)
const
3842 {
return impl == h.impl; }
3843 bool operator<(
const LegionHandshake &h)
const
3844 {
return impl < h.impl; }
3845 LegionHandshake& operator=(
const LegionHandshake &rhs);
3901 FRIEND_ALL_RUNTIME_CLASSES
3904 bool operator==(
const MPILegionHandshake &h)
const
3905 {
return impl == h.impl; }
3906 bool operator<(
const MPILegionHandshake &h)
const
3907 {
return impl < h.impl; }
3908 MPILegionHandshake& operator=(
const MPILegionHandshake &rhs);
3948 virtual UniqueID get_unique_id(
void)
const = 0;
3952 virtual size_t get_context_index(
void)
const = 0;
3954 virtual int get_depth(
void)
const = 0;
3956 virtual const Task* get_parent_task(
void)
const = 0;
3960 virtual const std::string& get_provenance_string(
3961 bool human =
true)
const = 0;
3963 virtual MappableType get_mappable_type(
void)
const = 0;
3964 virtual const Task* as_task(
void)
const {
return NULL; }
3965 virtual const Copy* as_copy(
void)
const {
return NULL; }
3966 virtual const InlineMapping* as_inline(
void)
const {
return NULL; }
3967 virtual const Acquire* as_acquire(
void)
const {
return NULL; }
3968 virtual const Release* as_release(
void)
const {
return NULL; }
3969 virtual const Close* as_close(
void)
const {
return NULL; }
3970 virtual const Fill* as_fill(
void)
const {
return NULL; }
3971 virtual const Partition* as_partition(
void)
const {
return NULL; }
3972 virtual const MustEpoch* as_must_epoch(
void)
const {
return NULL; }
3980 mutable const Task* parent_task;
3984 size_t mapper_data_size;
3991 typedef Legion::MappableType MappableType;
3993 static const MappableType TASK_MAPPABLE = ::LEGION_TASK_MAPPABLE;
3994 static const MappableType COPY_MAPPABLE = ::LEGION_COPY_MAPPABLE;
3995 static const MappableType INLINE_MAPPABLE = ::LEGION_INLINE_MAPPABLE;
3996 static const MappableType ACQUIRE_MAPPABLE = ::LEGION_ACQUIRE_MAPPABLE;
3997 static const MappableType RELEASE_MAPPABLE = ::LEGION_RELEASE_MAPPABLE;
3998 static const MappableType CLOSE_MAPPABLE = ::LEGION_CLOSE_MAPPABLE;
3999 static const MappableType FILL_MAPPABLE = ::LEGION_FILL_MAPPABLE;
4000 static const MappableType PARTITION_MAPPABLE =
4001 ::LEGION_PARTITION_MAPPABLE;
4002 static const MappableType MUST_EPOCH_MAPPABLE =
4003 ::LEGION_MUST_EPOCH_MAPPABLE;
4019 virtual bool has_parent_task(
void)
const = 0;
4021 virtual const char* get_task_name(
void)
const = 0;
4025 virtual Domain get_slice_domain(
void)
const = 0;
4027 virtual MappableType get_mappable_type(
void)
const
4028 {
return LEGION_TASK_MAPPABLE; }
4029 virtual const Task* as_task(
void)
const {
return this; }
4033 std::vector<IndexSpaceRequirement> indexes;
4034 std::vector<RegionRequirement> regions;
4035 std::vector<Future> futures;
4036 std::vector<Grant> grants;
4037 std::vector<PhaseBarrier> wait_barriers;
4038 std::vector<PhaseBarrier> arrive_barriers;
4043 bool is_index_space;
4044 bool must_epoch_task;
4049 size_t local_arglen;
4052 Processor orig_proc;
4053 Processor current_proc;
4054 Processor target_proc;
4055 unsigned steal_count;
4058 bool local_function;
4070 virtual MappableType get_mappable_type(
void)
const
4071 {
return LEGION_COPY_MAPPABLE; }
4072 virtual const Copy* as_copy(
void)
const {
return this; }
4075 std::vector<RegionRequirement> src_requirements;
4076 std::vector<RegionRequirement> dst_requirements;
4077 std::vector<RegionRequirement> src_indirect_requirements;
4078 std::vector<RegionRequirement> dst_indirect_requirements;
4079 std::vector<Grant> grants;
4080 std::vector<PhaseBarrier> wait_barriers;
4081 std::vector<PhaseBarrier> arrive_barriers;
4084 bool is_index_space;
4098 virtual MappableType get_mappable_type(
void)
const
4099 {
return LEGION_INLINE_MAPPABLE; }
4100 virtual const InlineMapping* as_inline(
void)
const {
return this; }
4104 std::vector<Grant> grants;
4105 std::vector<PhaseBarrier> wait_barriers;
4106 std::vector<PhaseBarrier> arrive_barriers;
4107 LayoutConstraintID layout_constraint_id;
4119 virtual MappableType get_mappable_type(
void)
const
4120 {
return LEGION_ACQUIRE_MAPPABLE; }
4121 virtual const Acquire* as_acquire(
void)
const {
return this; }
4126 std::set<FieldID> fields;
4127 std::vector<Grant> grants;
4128 std::vector<PhaseBarrier> wait_barriers;
4129 std::vector<PhaseBarrier> arrive_barriers;
4141 virtual MappableType get_mappable_type(
void)
const
4142 {
return LEGION_RELEASE_MAPPABLE; }
4143 virtual const Release* as_release(
void)
const {
return this; }
4148 std::set<FieldID> fields;
4149 std::vector<Grant> grants;
4150 std::vector<PhaseBarrier> wait_barriers;
4151 std::vector<PhaseBarrier> arrive_barriers;
4167 virtual MappableType get_mappable_type(
void)
const
4168 {
return LEGION_CLOSE_MAPPABLE; }
4169 virtual const Close* as_close(
void)
const {
return this; }
4185 virtual MappableType get_mappable_type(
void)
const
4186 {
return LEGION_FILL_MAPPABLE; }
4187 virtual const Fill* as_fill(
void)
const {
return this; }
4191 std::vector<Grant> grants;
4192 std::vector<PhaseBarrier> wait_barriers;
4193 std::vector<PhaseBarrier> arrive_barriers;
4196 bool is_index_space;
4212 virtual MappableType get_mappable_type(
void)
const
4213 {
return LEGION_PARTITION_MAPPABLE; }
4214 virtual const Partition* as_partition(
void)
const {
return this; }
4216 enum PartitionKind {
4224 virtual PartitionKind get_partition_kind(
void)
const = 0;
4230 bool is_index_space;
4245 virtual MappableType get_mappable_type(
void)
const
4246 {
return LEGION_MUST_EPOCH_MAPPABLE; }
4247 virtual const MustEpoch* as_must_epoch(
void)
const {
return this; }
4249 std::vector<const Task*> individual_tasks;
4250 std::vector<const Task*> index_space_tasks;
4266 template<
typename T>
4270 std::set<std::pair<T,T> > ranges;
4291 std::set<Processor> local_procs;
4311 bool idempotent =
false);
4384 const Domain &launch_domain);
4398 const Domain &launch_domain);
4411 LEGION_DEPRECATED(
"The interface for projection functors has been "
4412 "updated. Please use the new 'project' methods.")
4428 LEGION_DEPRECATED(
"The interface for projection functors has been "
4429 "updated. Please use the new 'project' methods.")
4444 const Domain &launch_domain,
4445 std::vector<DomainPoint> &ordered_points);
4447 const Domain &launch_domain,
4448 std::vector<DomainPoint> &ordered_points);
4465 virtual bool is_functional(
void)
const {
return false; }
4485 virtual unsigned get_depth(
void)
const = 0;
4487 friend class Internal::Runtime;
4490 inline void set_runtime(
Runtime *rt) { runtime = rt; }
4514 const Domain &full_space,
4515 const size_t total_shards) = 0;
4517 virtual bool is_invertible(
void)
const {
return false; }
4518 virtual void invert(ShardID shard,
4519 const Domain &shard_domain,
4520 const Domain &full_domain,
4521 const size_t total_shards,
4522 std::vector<DomainPoint> &points) { }
4544 virtual size_t callback_get_future_size(
void) = 0;
4545 virtual void callback_pack_future(
void *buffer,
size_t size) = 0;
4546 virtual void callback_release_future(
void) = 0;
4576 friend class Internal::Runtime;
4578 Runtime(Internal::Runtime *rt);
4596 TypeTag type_tag = 0,
4597 const char *provenance = NULL);
4599 template<
int DIM,
typename COORD_T>
4601 const Rect<DIM,COORD_T> &bounds,
4602 const char *provenance = NULL);
4603 template<
int DIM,
typename COORD_T>
4605 const DomainT<DIM,COORD_T> &bounds,
4606 const char *provenance = NULL);
4623 const Future &f, TypeTag type_tag = 0,
4624 const char *provenance = NULL);
4625 template<
int DIM,
typename COORD_T>
4627 const char *provenance = NULL);
4639 const std::vector<DomainPoint> &points,
4640 const char *provenance = NULL);
4642 template<
int DIM,
typename COORD_T>
4644 const std::vector<Point<DIM,COORD_T> > &points,
4645 const char *provenance = NULL);
4657 const std::vector<Domain> &rects,
4658 const char *provenance = NULL);
4660 template<
int DIM,
typename COORD_T>
4662 const std::vector<Rect<DIM,COORD_T> > &rects,
4663 const char *provenance = NULL);
4676 const std::vector<IndexSpace> &spaces,
4677 const char *provenance = NULL);
4679 template<
int DIM,
typename COORD_T>
4682 const char *provenance = NULL);
4695 const std::vector<IndexSpace> &spaces,
4696 const char *provenance = NULL);
4698 template<
int DIM,
typename COORD_T>
4701 const char *provenance = NULL);
4712 const char *provenance = NULL);
4714 template<
int DIM,
typename COORD_T>
4717 const char *provenance = NULL);
4726 LEGION_DEPRECATED(
"Use the new index space creation routines with a "
4727 "single domain or rectangle.")
4736 LEGION_DEPRECATED(
"Use the new index space creation routines with a "
4737 "single domain or rectangle.")
4739 const std::set<Domain> &domains);
4762 const bool unordered =
false,
4763 const bool recurse =
true,
4764 const char *provenance = NULL);
4782 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4784 const Domain &color_space,
4785 const PointColoring &coloring,
4786 PartitionKind part_kind = LEGION_COMPUTE_KIND,
4787 Color color = LEGION_AUTO_GENERATE_ID,
4788 bool allocable =
false);
4800 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4802 const Coloring &coloring,
bool disjoint,
4803 Color color = LEGION_AUTO_GENERATE_ID);
4816 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4818 const Domain &color_space,
4819 const DomainPointColoring &coloring,
4820 PartitionKind part_kind = LEGION_COMPUTE_KIND,
4821 Color color = LEGION_AUTO_GENERATE_ID);
4834 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4837 const DomainColoring &coloring,
4840 LEGION_AUTO_GENERATE_ID);
4853 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4855 const Domain &color_space,
4856 const MultiDomainPointColoring &coloring,
4857 PartitionKind part_kind = LEGION_COMPUTE_KIND,
4858 Color color = LEGION_AUTO_GENERATE_ID);
4873 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4876 const MultiDomainColoring &coloring,
4879 LEGION_AUTO_GENERATE_ID);
4889 template <
typename T>
4890 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4894 LEGION_AUTO_GENERATE_ID);
4914 LEGION_DEPRECATED(
"Use the new dependent partitioning API calls instead.")
4916 LegionRuntime::Accessor::RegionAccessor<
4917 LegionRuntime::Accessor::AccessorType::Generic> field_accessor,
4918 Color color = LEGION_AUTO_GENERATE_ID);
4941 const bool unordered =
false,
4942 const bool recurse =
true,
4943 const char *provenance = NULL);
4971 size_t granularity = 1,
4973 LEGION_AUTO_GENERATE_ID,
4974 const char *provenance = NULL);
4975 template<
int DIM,
typename COORD_T,
4976 int COLOR_DIM,
typename COLOR_COORD_T>
4980 size_t granularity = 1,
4981 Color color = LEGION_AUTO_GENERATE_ID,
4982 const char *provenance = NULL);
5003 const std::map<DomainPoint,int> &weights,
5005 size_t granularity = 1,
5006 Color color = LEGION_AUTO_GENERATE_ID,
5007 const char *provenance = NULL);
5008 template<
int DIM,
typename COORD_T,
int COLOR_DIM,
typename COLOR_COORD_T>
5011 const std::map<Point<COLOR_DIM,COLOR_COORD_T>,
int> &weights,
5013 size_t granularity = 1,
5014 Color color = LEGION_AUTO_GENERATE_ID,
5015 const char *provenance = NULL);
5018 const std::map<DomainPoint,size_t> &weights,
5020 size_t granularity = 1,
5021 Color color = LEGION_AUTO_GENERATE_ID,
5022 const char *provenance = NULL);
5023 template<
int DIM,
typename COORD_T,
int COLOR_DIM,
typename COLOR_COORD_T>
5026 const std::map<Point<COLOR_DIM,COLOR_COORD_T>,
size_t> &weights,
5028 size_t granularity = 1, Color color = LEGION_AUTO_GENERATE_ID,
5029 const char *provenance = NULL);
5036 size_t granularity = 1,
5038 LEGION_AUTO_GENERATE_ID,
5039 const char *provenance = NULL);
5040 template<
int DIM,
typename COORD_T,
int COLOR_DIM,
typename COLOR_COORD_T>
5045 size_t granularity = 1,
5046 Color color = LEGION_AUTO_GENERATE_ID,
5047 const char *provenance = NULL);
5079 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5080 Color color = LEGION_AUTO_GENERATE_ID,
5081 const char *provenance = NULL);
5082 template<
int DIM,
typename COORD_T,
5083 int COLOR_DIM,
typename COLOR_COORD_T>
5089 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5090 Color color = LEGION_AUTO_GENERATE_ID,
5091 const char *provenance = NULL);
5124 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5125 Color color = LEGION_AUTO_GENERATE_ID,
5126 const char *provenance = NULL);
5127 template<
int DIM,
typename COORD_T,
5128 int COLOR_DIM,
typename COLOR_COORD_T>
5135 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5136 Color color = LEGION_AUTO_GENERATE_ID,
5137 const char *provenance = NULL);
5163 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5164 Color color = LEGION_AUTO_GENERATE_ID,
5165 bool dominates =
false,
5166 const char *provenance = NULL);
5167 template<
int DIM,
typename COORD_T>
5171 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5172 Color color = LEGION_AUTO_GENERATE_ID,
5173 bool dominates =
false,
5174 const char *provenance = NULL);
5207 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5208 Color color = LEGION_AUTO_GENERATE_ID,
5209 const char *provenance = NULL);
5210 template<
int DIM,
typename COORD_T,
5211 int COLOR_DIM,
typename COLOR_COORD_T>
5217 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5218 Color color = LEGION_AUTO_GENERATE_ID,
5219 const char *provenance = NULL);
5250 std::map<IndexSpace,IndexPartition> &handles,
5251 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5252 Color color = LEGION_AUTO_GENERATE_ID,
5253 const char *provenance = NULL);
5254 template<
int DIM,
typename COORD_T,
5255 int COLOR_DIM,
typename COLOR_COORD_T>
5262 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5263 Color color = LEGION_AUTO_GENERATE_ID,
5264 const char *provenance = NULL);
5297 MappingTagID tag = 0,
5299 const char *provenance = NULL);
5300 void create_bidirectional_association(Context ctx,
5308 MappingTagID tag = 0,
5311 const char *provenance = NULL);
5313 template<
int DIM1,
typename COORD_T1,
int DIM2,
typename COORD_T2>
5320 MappingTagID tag = 0,
5322 const char *provenance = NULL);
5323 template<
int DIM1,
typename COORD_T1,
int DIM2,
typename COORD_T2>
5324 void create_bidirectional_association(Context ctx,
5332 MappingTagID tag = 0,
5334 const char *provenance = NULL);
5367 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5368 Color color = LEGION_AUTO_GENERATE_ID,
5369 const char *provenance = NULL);
5371 template<
int DIM,
int COLOR_DIM,
typename COORD_T>
5375 Transform<DIM,COLOR_DIM,COORD_T> transform,
5376 Rect<DIM,COORD_T> extent,
5377 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5378 Color color = LEGION_AUTO_GENERATE_ID,
5379 const char *provenance = NULL);
5400 Color color = LEGION_AUTO_GENERATE_ID,
5401 const char *provenance = NULL);
5403 template<
int DIM,
typename COORD_T>
5406 Point<DIM,COORD_T> blocking_factor,
5407 Color color = LEGION_AUTO_GENERATE_ID,
5408 const char *provenance = NULL);
5425 Color color = LEGION_AUTO_GENERATE_ID,
5426 const char *provenance = NULL);
5428 template<
int DIM,
typename COORD_T>
5431 Point<DIM,COORD_T> blocking_factor,
5432 Point<DIM,COORD_T> origin,
5433 Color color = LEGION_AUTO_GENERATE_ID,
5434 const char *provenance = NULL);
5459 const std::map<DomainPoint,Domain> &domains,
5461 bool perform_intersections =
true,
5462 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5463 Color color = LEGION_AUTO_GENERATE_ID,
5464 const char *provenance = NULL);
5465 template<
int DIM,
typename COORD_T,
int COLOR_DIM,
typename COLOR_COORD_T>
5469 Point<COLOR_DIM,COLOR_COORD_T>,
5470 DomainT<DIM,COORD_T> > &domains,
5472 COLOR_COORD_T> color_space,
5473 bool perform_intersections =
true,
5474 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5475 Color color = LEGION_AUTO_GENERATE_ID,
5476 const char *provenance = NULL);
5498 bool perform_intersections =
true,
5499 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5500 Color color = LEGION_AUTO_GENERATE_ID,
5501 const char *provenance = NULL);
5502 template<
int DIM,
typename COORD_T,
int COLOR_DIM,
typename COLOR_COORD_T>
5507 COLOR_COORD_T> color_space,
5508 bool perform_intersections =
true,
5509 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5510 Color color = LEGION_AUTO_GENERATE_ID,
5511 const char *provenance = NULL);
5548 LEGION_AUTO_GENERATE_ID,
5550 MappingTagID tag = 0,
5551 PartitionKind part_kind =
5552 LEGION_DISJOINT_KIND,
5555 const char *provenance = NULL);
5556 template<
int DIM,
typename COORD_T,
5557 int COLOR_DIM,
typename COLOR_COORD_T>
5563 Color color = LEGION_AUTO_GENERATE_ID,
5564 MapperID
id = 0, MappingTagID tag = 0,
5565 PartitionKind part_kind = LEGION_DISJOINT_KIND,
5567 const char *provenance = NULL);
5609 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5610 Color color = LEGION_AUTO_GENERATE_ID,
5611 MapperID
id = 0, MappingTagID tag = 0,
5613 const char *provenance = NULL);
5614 template<
int DIM1,
typename COORD_T1,
5615 int DIM2,
typename COORD_T2,
5616 int COLOR_DIM,
typename COLOR_COORD_T>
5623 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5624 Color color = LEGION_AUTO_GENERATE_ID,
5625 MapperID
id = 0, MappingTagID tag = 0,
5627 const char *provenance = NULL);
5635 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5636 Color color = LEGION_AUTO_GENERATE_ID,
5637 MapperID
id = 0, MappingTagID tag = 0,
5639 const char *provenance = NULL);
5640 template<
int DIM1,
typename COORD_T1,
5641 int DIM2,
typename COORD_T2,
5642 int COLOR_DIM,
typename COLOR_COORD_T>
5650 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5651 Color color = LEGION_AUTO_GENERATE_ID,
5652 MapperID
id = 0, MappingTagID tag = 0,
5654 const char *provenance = NULL);
5693 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5694 Color color = LEGION_AUTO_GENERATE_ID,
5695 MapperID
id = 0, MappingTagID tag = 0,
5697 const char *provenance = NULL);
5698 template<
int DIM1,
typename COORD_T1,
5699 int DIM2,
typename COORD_T2,
5700 int COLOR_DIM,
typename COLOR_COORD_T>
5707 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5708 Color color = LEGION_AUTO_GENERATE_ID,
5709 MapperID
id = 0, MappingTagID tag = 0,
5711 const char *provenance = NULL);
5719 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5720 Color color = LEGION_AUTO_GENERATE_ID,
5721 MapperID
id = 0, MappingTagID tag = 0,
5723 const char *provenance = NULL);
5724 template<
int DIM1,
typename COORD_T1,
5725 int DIM2,
typename COORD_T2,
5726 int COLOR_DIM,
typename COLOR_COORD_T>
5734 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5735 Color color = LEGION_AUTO_GENERATE_ID,
5736 MapperID
id = 0, MappingTagID tag = 0,
5738 const char *provenance = NULL);
5774 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5775 Color color = LEGION_AUTO_GENERATE_ID,
5776 const char *provenance = NULL);
5777 template<
int DIM,
typename COORD_T,
5778 int COLOR_DIM,
typename COLOR_COORD_T>
5782 PartitionKind part_kind = LEGION_COMPUTE_KIND,
5783 Color color = LEGION_AUTO_GENERATE_ID,
5784 const char *provenance = NULL);
5805 const std::vector<IndexSpace> &handles,
5806 const char *provenance = NULL);
5807 template<
int DIM,
typename COORD_T,
5808 int COLOR_DIM,
typename COLOR_COORD_T>
5811 Point<COLOR_DIM,COLOR_COORD_T> color,
5812 const typename std::vector<
5814 const char *provenance = NULL);
5833 const char *provenance = NULL);
5834 template<
int DIM,
typename COORD_T,
5835 int COLOR_DIM,
typename COLOR_COORD_T>
5838 Point<COLOR_DIM,COLOR_COORD_T> color,
5840 const char *provenance = NULL);
5862 const std::vector<IndexSpace> &handles,
5863 const char *provenance = NULL);
5864 template<
int DIM,
typename COORD_T,
5865 int COLOR_DIM,
typename COLOR_COORD_T>
5868 Point<COLOR_DIM,COLOR_COORD_T> color,
5869 const typename std::vector<
5871 const char *provenance = NULL);
5891 const char *provenannce=NULL);
5892 template<
int DIM,
typename COORD_T,
5893 int COLOR_DIM,
typename COLOR_COORD_T>
5896 Point<COLOR_DIM,COLOR_COORD_T> color,
5898 const char *provenance = NULL);
5926 const std::vector<IndexSpace> &handles,
5927 const char *provenancne = NULL);
5928 template<
int DIM,
typename COORD_T,
5929 int COLOR_DIM,
typename COLOR_COORD_T>
5932 Point<COLOR_DIM,COLOR_COORD_T> color,
5934 const typename std::vector<
5936 const char *provenance = NULL);
5960 template<
int DIM,
typename COORD_T>
5983 template<
int DIM,
typename COORD_T>
6005 template<
int DIM,
typename COORD_T,
6006 int COLOR_DIM,
typename COLOR_COORD_T>
6009 Point<COLOR_DIM,COLOR_COORD_T> color);
6027 template<
int DIM,
typename COORD_T,
6028 int COLOR_DIM,
typename COLOR_COORD_T>
6030 Point<COLOR_DIM,COLOR_COORD_T> color);
6044 LEGION_DEPRECATED(
"Multiple domains are no longer supported.")
6047 LEGION_DEPRECATED(
"Multiple domains are no longer supported.")
6063 template<
int DIM,
typename COORD_T>
6079 LEGION_DEPRECATED(
"Multiple domains are no longer supported.")
6081 std::vector<Domain> &domains);
6083 LEGION_DEPRECATED(
"Multiple domains are no longer supported.")
6085 std::vector<Domain> &domains);
6100 template<
int DIM,
typename COORD_T,
6101 int COLOR_DIM,
typename COLOR_COORD_T>
6102 DomainT<COLOR_DIM,COLOR_COORD_T>
6118 template<
int DIM,
typename COORD_T,
6119 int COLOR_DIM,
typename COLOR_COORD_T>
6135 std::set<Color> &colors);
6137 std::set<DomainPoint> &colors);
6140 std::set<Color> &colors);
6142 std::set<DomainPoint> &colors);
6177 template <
unsigned DIM>
6178 LEGION_DEPRECATED(
"Use the new templated methods for geting a subspace.")
6180 LegionRuntime::Arrays::Point<DIM> color_point);
6197 template<
int DIM,
typename COORD_T,
6198 int COLOR_DIM,
typename COLOR_COORD_T>
6199 Point<COLOR_DIM,COLOR_COORD_T>
6212 DomainPoint get_index_partition_color_point(Context ctx,
6230 template<
int DIM,
typename COORD_T>
6259 template<
int DIM,
typename COORD_T>
6321 template<
int DIM,
typename COORD_T>
6323 Point<DIM,COORD_T> point,
6349 const std::vector<size_t> &field_sizes,
6350 std::vector<FieldID> &resulting_fields,
6351 CustomSerdezID serdez_id = 0,
6352 const char *provenance = NULL);
6365 const std::vector<Future> &field_sizes,
6366 std::vector<FieldID> &resulting_fields,
6367 CustomSerdezID serdez_id = 0,
6368 const char *provenance = NULL);
6390 const bool unordered =
false,
6391 const char *provenance = NULL);
6414 std::vector<FieldID> &fields);
6417 std::vector<FieldID> &fields);
6428 std::set<FieldID> &fields);
6431 std::set<FieldID> &fields);
6452 bool task_local =
false,
6453 const char *provenance = NULL);
6455 template<
int DIM,
typename COORD_T>
6459 bool task_local =
false,
6460 const char *provenance = NULL);
6482 const bool unordered =
false,
6483 const char *provenance = NULL);
6492 LEGION_DEPRECATED(
"Destruction of logical partitions are no-ops now."
6493 "Logical partitions are automatically destroyed when their root "
6494 "logical region or their index spartition are destroyed.")
6496 const bool unordered =
false);
6517 template<
int DIM,
typename COORD_T>
6544 template<
int DIM,
typename COORD_T>
6586 template<
int DIM,
typename COORD_T>
6608 template<
int DIM,
typename COORD_T>
6635 template<
int DIM,
typename COORD_T,
6636 int COLOR_DIM,
typename COLOR_COORD_T>
6639 Point<COLOR_DIM,COLOR_COORD_T> color);
6658 template<
int DIM,
typename COORD_T,
6659 int COLOR_DIM,
typename COLOR_COORD_T>
6661 Point<COLOR_DIM,COLOR_COORD_T> color);
6683 template<
int DIM,
typename COORD_T>
6699 DomainPoint get_logical_region_color_point(Context ctx,
6705 template<
int DIM,
typename COORD_T,
6706 int COLOR_DIM,
typename COLOR_COORD_T>
6707 Point<COLOR_DIM,COLOR_COORD_T>
6720 DomainPoint get_logical_partition_color_point(Context ctx,
6739 template<
int DIM,
typename COORD_T>
6768 template<
int DIM,
typename COORD_T>
6777 #pragma GCC diagnostic push
6778 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
6781 #pragma clang diagnostic push
6782 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
6795 LEGION_DEPRECATED(
"Dynamic index allocation is no longer supported.")
6798 #pragma GCC diagnostic pop
6801 #pragma clang diagnostic pop
6820 LEGION_DEPRECATED(
"ArgumentMap can be constructed directly.")
6864 ReductionOpID redop,
bool deterministic =
false);
6882 ReductionOpID redop,
bool deterministic =
false,
6883 const char *provenance = NULL);
6911 const std::map<DomainPoint,UntypedBuffer> &data,
6912 bool collective =
false, ShardingID sid = 0,
6913 bool implicit_sharding =
false);
6914 LEGION_DEPRECATED(
"Use the version that takes an IndexSpace instead")
6916 const std::map<DomainPoint,UntypedBuffer> &data,
6917 bool collective =
false, ShardingID sid = 0,
6918 bool implicit_sharding =
false);
6944 const std::map<DomainPoint,Future> &futures,
6945 bool collective =
false, ShardingID sid = 0,
6946 bool implicit_sharding =
false,
6947 const char *provenance = NULL);
6948 LEGION_DEPRECATED(
"Use the version that takes an IndexSpace instead")
6950 const std::map<DomainPoint,Future> &futures,
6951 bool collective =
false, ShardingID sid = 0,
6952 bool implicit_sharding =
false);
6969 LEGION_DEPRECATED(
"Launching tasks should be done with the new task "
6970 "launcher interface.")
6972 const std::vector<IndexSpaceRequirement> &indexes,
6973 const std::vector<FieldSpaceRequirement> &fields,
6974 const std::vector<RegionRequirement> ®ions,
6976 const Predicate &predicate = Predicate::TRUE_PRED,
6978 MappingTagID tag = 0);
6998 LEGION_DEPRECATED(
"Launching tasks should be done with the new task "
6999 "launcher interface.")
7002 const std::vector<IndexSpaceRequirement> &indexes,
7003 const std::vector<FieldSpaceRequirement> &fields,
7004 const std::vector<RegionRequirement> ®ions,
7007 const Predicate &predicate = Predicate::TRUE_PRED,
7008 bool must_paralleism =
false,
7010 MappingTagID tag = 0);
7033 LEGION_DEPRECATED(
"Launching tasks should be done with the new task "
7034 "launcher interface.")
7037 const std::vector<IndexSpaceRequirement> &indexes,
7038 const std::vector<FieldSpaceRequirement> &fields,
7039 const std::vector<RegionRequirement> ®ions,
7042 ReductionOpID reduction,
7044 const Predicate &predicate = Predicate::TRUE_PRED,
7045 bool must_parallelism =
false,
7047 MappingTagID tag = 0);
7077 MapperID
id = 0, MappingTagID tag = 0,
7078 const char *provenance = NULL);
7092 MapperID
id = 0, MappingTagID tag = 0,
7093 const char *provenance = NULL);
7105 const char *provenance = NULL);
7142 template<
typename T>
7144 FieldID fid,
const T &value,
7161 FieldID fid,
const void *value,
size_t value_size,
7190 template<
typename T>
7192 const std::set<FieldID> &fields,
const T &value,
7208 const std::set<FieldID> &fields,
7209 const void *value,
size_t value_size,
7223 const std::set<FieldID> &fields,
7267 const bool flush =
true,
7268 const bool unordered =
false,
7269 const char *provenance = NULL);
7304 const bool flush =
true,
7305 const bool unordered =
false,
7306 const char *provenance = NULL);
7346 LEGION_DEPRECATED(
"Attaching specific HDF5 file type is deprecated "
7347 "in favor of generic attach launcher interface.")
7350 const std::map<FieldID,const char*> &field_map,
7351 LegionFileMode mode);
7369 LEGION_DEPRECATED(
"Detaching specific HDF5 file type is deprecated "
7370 "in favor of generic detach interface.")
7379 LEGION_DEPRECATED(
"Attaching generic file type is deprecated "
7380 "in favor of generic attach launcher interface.")
7383 const std::vector<FieldID> &field_vec,
7384 LegionFileMode mode);
7391 LEGION_DEPRECATED(
"Detaching generic file type is deprecated "
7392 "in favor of generic detach interface.")
7429 const char *provenance = NULL);
7441 const char *provenance = NULL);
7455 const char *provenance = NULL);
7469 const char *provenance = NULL);
7522 const std::vector<LockRequest> &requests);
7597 ReductionOpID redop,
7598 const void *init_value,
7621 size_t size,
unsigned count = 1);
7635 unsigned count = 1);
7648 const char *provenance = NULL);
7736 void begin_trace(Context ctx, TraceID tid,
bool logical_only =
false,
7737 bool static_trace =
false,
const std::set<RegionTreeID> *managed = NULL,
7738 const char *provenance = NULL);
7742 void end_trace(Context ctx, TraceID tid,
const char *provenance = NULL);
7757 LEGION_DEPRECATED(
"Use begin_trace with static_trace=true")
7759 const std::set<RegionTreeID> *managed = NULL);
7764 LEGION_DEPRECATED(
"Use end_trace")
7843 MapperID mapper = 0, MappingTagID tag = 0,
7844 const void *args = NULL,
size_t argsize = 0);
7853 LEGION_DEPRECATED(
"Tunable values should now be obtained via the "
7854 "generic interface that returns a future result.")
7856 MapperID mapper = 0, MappingTagID tag = 0);
7876 template<
typename T>
7877 T* get_local_task_variable(Context ctx, LocalVariableID
id);
7890 const void *value,
void (*destructor)(
void*) = NULL);
7891 template<
typename T>
7892 void set_local_task_variable(Context ctx, LocalVariableID
id,
7893 const T* value,
void (*destructor)(
void*) = NULL);
7964 Mapping::Mapper*
get_mapper(Context ctx, MapperID
id,
7965 Processor target = Processor::NO_PROC);
7981 Processor target = Processor::NO_PROC);
8035 void yield(Context ctx);
8113 const void *buffer,
size_t size,
8114 bool is_mutable =
false,
bool local_only =
false);
8125 const void *buffer,
size_t size,
bool is_mutable =
false);
8136 const void *buffer,
size_t size,
bool is_mutable =
false);
8147 const void *buffer,
size_t size,
bool is_mutable =
false);
8159 SemanticTag tag,
const void *buffer,
8160 size_t size,
bool is_mutable =
false);
8171 const void *buffer,
size_t size,
bool is_mutable =
false);
8182 SemanticTag tag,
const void *buffer,
8183 size_t size,
bool is_mutable =
false);
8192 void attach_name(TaskID task_id,
const char *name,
8193 bool is_mutable =
false,
8194 bool local_only =
false);
8203 bool is_mutable =
false);
8212 bool is_mutable =
false);
8221 bool is_mutable =
false);
8231 const char *name,
bool is_mutable =
false);
8240 bool is_mutable =
false);
8249 bool is_mutable =
false);
8262 const void *&result,
size_t &size,
8263 bool can_fail =
false,
8264 bool wait_until_ready =
false);
8277 const void *&result,
size_t &size,
8278 bool can_fail =
false,
8279 bool wait_until_ready =
false);
8292 const void *&result,
size_t &size,
8293 bool can_fail =
false,
8294 bool wait_until_ready =
false);
8307 const void *&result,
size_t &size,
8308 bool can_fail =
false,
8309 bool wait_until_ready =
false);
8324 const void *&result,
size_t &size,
8325 bool can_fail =
false,
8326 bool wait_until_ready =
false);
8339 const void *&result,
size_t &size,
8340 bool can_fail =
false,
8341 bool wait_until_ready =
false);
8355 const void *&result,
size_t &size,
8356 bool can_fail =
false,
8357 bool wait_until_ready =
false);
8422 void print_once(Context ctx, FILE *f,
const char *message);
8430 void log_once(Context ctx, Realm::LoggerMessage &message);
8483 void add_mapper(MapperID map_id, Mapping::Mapper *mapper,
8484 Processor proc = Processor::NO_PROC);
8498 Processor proc = Processor::NO_PROC);
8544 bool silence_warnings =
false,
8545 const char *warning_string = NULL);
8601 bool silence_warnings =
false,
8602 const char *warning_string = NULL);
8655 template<
typename REDOP>
8657 bool permit_duplicates =
false);
8681 SerdezInitFnptr init_fnptr = NULL,
8682 SerdezFoldFnptr fold_fnptr = NULL,
8683 bool permit_duplicates =
false);
8692 #ifdef LEGION_GPU_REDUCTIONS
8693 template<
typename REDOP>
8694 LEGION_DEPRECATED(
"Use register_reduction_op instead")
8695 static void preregister_gpu_reduction_op(ReductionOpID redop_id);
8739 template<
typename SERDEZ>
8741 bool permit_duplicates =
false);
8756 SerdezOp *serdez_op,
8757 bool permit_duplicates =
false);
8764 static const SerdezOp*
get_serdez_op(CustomSerdezID serdez_id);
8941 static int start(
int argc,
char **argv,
bool background =
false,
8942 bool supply_default_mapper =
true);
8957 static void initialize(
int *argc,
char ***argv,
bool filter =
false);
9020 Processor::Kind proc_kind,
9021 const char *task_name = NULL,
9022 bool control_replicable =
false,
9023 unsigned shard_per_address_space = 1,
9084 int ext_participants = 1,
9085 int legion_participants = 1);
9099 int mpi_participants = 1,
9100 int legion_participants = 1);
9114 LEGION_DEPRECATED(
"Projection functions should now be specified "
9115 "using projection functor objects")
9129 LEGION_DEPRECATED(
"Projection functions should now be specified "
9130 "using projection functor objects")
9150 bool dedup =
true,
size_t dedup_tag = 0);
9152 RegistrationWithArgsCallbackFnptr callback,
const UntypedBuffer &buffer,
9153 bool dedup =
true,
size_t dedup_tag = 0);
9180 RegistrationCallbackFnptr callback,
bool global,
9181 bool deduplicate =
true,
size_t dedup_tag = 0);
9183 RegistrationWithArgsCallbackFnptr callback,
9185 bool deduplicate =
true ,
size_t dedup_tag = 0);
9198 LEGION_DEPRECATED(
"Legion now supports multiple registration callbacks "
9199 "added via the add_registration_callback method.")
9256 LayoutConstraintID layout_id =
9257 LEGION_AUTO_GENERATE_ID);
9265 LayoutConstraintID layout_id);
9273 LayoutConstraintSet &layout_constraints);
9320 template<
typename T,
9321 T (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9324 VariantID vid = LEGION_AUTO_GENERATE_ID);
9334 template<
typename T,
typename UDT,
9335 T (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9336 Context,
Runtime*,
const UDT&)>
9338 const UDT &user_data,
9339 VariantID vid = LEGION_AUTO_GENERATE_ID);
9349 void (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9352 VariantID vid = LEGION_AUTO_GENERATE_ID);
9362 template<
typename UDT,
9363 void (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9364 Context,
Runtime*,
const UDT&)>
9366 const UDT &user_data,
9367 VariantID vid = LEGION_AUTO_GENERATE_ID);
9383 const CodeDescriptor &codedesc,
9384 const void *user_data = NULL,
9385 size_t user_len = 0,
9386 size_t return_type_size =
9387 LEGION_MAX_RETURN_SIZE,
9388 VariantID vid = LEGION_AUTO_GENERATE_ID);
9400 template<
typename T,
9401 T (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9405 const char *task_name = NULL,
9406 VariantID vid = LEGION_AUTO_GENERATE_ID);
9419 template<
typename T,
typename UDT,
9420 T (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9421 Context,
Runtime*,
const UDT&)>
9424 const UDT &user_data,
9425 const char *task_name = NULL,
9426 VariantID vid = LEGION_AUTO_GENERATE_ID);
9439 void (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9443 const char *task_name = NULL,
9444 VariantID vid = LEGION_AUTO_GENERATE_ID);
9457 template<
typename UDT,
9458 void (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9459 Context,
Runtime*,
const UDT&)>
9462 const char *task_name = NULL,
9463 VariantID vid = LEGION_AUTO_GENERATE_ID);
9482 const CodeDescriptor &codedesc,
9483 const void *user_data = NULL,
9484 size_t user_len = 0,
9485 const char *task_name = NULL,
9486 VariantID vid = LEGION_AUTO_GENERATE_ID,
9487 size_t return_type_size = LEGION_MAX_RETURN_SIZE,
9488 bool check_task_id =
true);
9504 Processor p,
const Task *& task,
9505 const std::vector<PhysicalRegion> *& reg,
9506 Context& ctx,
Runtime *& runtime);
9522 const void *retvalptr = NULL,
9523 size_t retvalsize = 0,
9525 Realm::RegionInstance inst =
9526 Realm::RegionInstance::NO_INST);
9540 bool owned =
false);
9556 template<
typename T,
9557 T (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9559 LEGION_DEPRECATED(
"Task registration should be done with "
9560 "a TaskVariantRegistrar")
9562 bool single,
bool index,
9563 VariantID vid =LEGION_AUTO_GENERATE_ID,
9565 const char *task_name = NULL);
9580 void (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9582 LEGION_DEPRECATED(
"Task registration should be done with "
9583 "a TaskVariantRegistrar")
9585 bool single,
bool index,
9586 VariantID vid =LEGION_AUTO_GENERATE_ID,
9588 const char *task_name = NULL);
9604 template<
typename T,
typename UDT,
9605 T (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9606 Context,
Runtime*,
const UDT&)>
9607 LEGION_DEPRECATED(
"Task registration should be done with "
9608 "a TaskVariantRegistrar")
9610 bool single,
bool index,
9611 const UDT &user_data,
9612 VariantID vid =LEGION_AUTO_GENERATE_ID,
9614 const char *task_name = NULL);
9630 template<
typename UDT,
9631 void (*TASK_PTR)(
const Task*,
const std::vector<PhysicalRegion>&,
9632 Context,
Runtime*,
const UDT&)>
9633 LEGION_DEPRECATED(
"Task registration should be done with "
9634 "a TaskVariantRegistrar")
9636 bool single,
bool index,
9637 const UDT &user_data,
9638 VariantID vid =LEGION_AUTO_GENERATE_ID,
9640 const char *task_name = NULL);
9685 const void *transform,
9686 size_t transform_size,
9689 PartitionKind part_kind, Color color,
9690 const char *provenance);
9691 IndexSpace create_index_space_union_internal(Context ctx,
9693 const void *realm_color, TypeTag type_tag,
9694 const std::vector<IndexSpace> &handles,
9695 const char *provenance);
9696 IndexSpace create_index_space_union_internal(Context ctx,
9698 const void *realm_color, TypeTag type_tag,
9700 const char *provenance);
9701 IndexSpace create_index_space_intersection_internal(Context ctx,
9703 const void *realm_color, TypeTag type_tag,
9704 const std::vector<IndexSpace> &handles,
9705 const char *provenance);
9706 IndexSpace create_index_space_intersection_internal(Context ctx,
9708 const void *realm_color, TypeTag type_tag,
9710 const char *provenance);
9711 IndexSpace create_index_space_difference_internal(Context ctx,
9713 const void *realm_color, TypeTag type_tag,
9715 const std::vector<IndexSpace> &handles,
9716 const char *provenance);
9718 const void *realm_color,TypeTag type_tag);
9720 const void *realm_color,TypeTag type_tag);
9721 void get_index_partition_color_space_internal(
IndexPartition handle,
9722 void *realm_is, TypeTag type_tag);
9723 void get_index_space_domain_internal(
IndexSpace handle,
9724 void *realm_is, TypeTag type_tag);
9725 void get_index_space_color_internal(
IndexSpace handle,
9726 void *realm_color, TypeTag type_tag);
9728 const void *realm_point,TypeTag type_tag);
9731 const void *realm_color,TypeTag type_tag);
9732 bool has_logical_subregion_by_color_internal(
9734 const void *realm_color,TypeTag type_tag);
9737 friend class LegionTaskWrapper;
9738 friend class LegionSerialization;
9739 Future from_value(
const void *value,
size_t value_size,
bool owned);
9741 template<
typename T>
9743 template<
typename T,
int DIM,
typename COORD_T,
bool CHECK_BOUNDS>
9748 Realm::RegionInstance create_task_local_instance(Memory memory,
9749 Realm::InstanceLayoutGeneric *layout);
9755 ShardID get_shard_id(Context ctx,
bool I_know_what_I_am_doing =
false);
9758 size_t get_num_shards(Context ctx,
bool I_know_what_I_am_doing =
false);
9760 friend class Mapper;
9761 Internal::Runtime *runtime;
9778 size_t legion_buffer_size(
void)
const;
9779 size_t legion_serialize(
void *buffer)
const;
9780 size_t legion_deserialize(
const void *buffer);
9782 inline Coloring& ref(
void) {
return coloring; }
9797 size_t legion_buffer_size(
void)
const;
9798 size_t legion_serialize(
void *buffer)
const;
9799 size_t legion_deserialize(
const void *buffer);
9801 inline DomainColoring& ref(
void) {
return coloring; }
9803 DomainColoring coloring;
9808 #include "legion/legion.inl"
9812 #include "legion/legion_mapping.h"
9814 #endif // __LEGION_RUNTIME_H__
9815 #endif // defined LEGION_ENABLE_CXX_BINDINGS
void create_association(Context ctx, LogicalRegion domain, LogicalRegion domain_parent, FieldID domain_fid, IndexSpace range, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
void detach_hdf5(Context ctx, PhysicalRegion region)
Color get_logical_region_color(Context ctx, LogicalRegion handle)
void allocate_local_fields(const std::vector< size_t > &field_sizes, std::vector< FieldID > &resulting_fields, CustomSerdezID serdez_id=0, const char *provenance=NULL)
Future get_current_time_in_nanoseconds(Context ctx, Future precondition=Future())
size_t total_shards(Context ctx)
static void legion_task_preamble(const void *data, size_t datalen, Processor p, const Task *&task, const std::vector< PhysicalRegion > *®, Context &ctx, Runtime *&runtime)
Definition: legion_types.h:167
IndexPartition get_parent_index_partition(Context ctx, IndexSpace handle)
LogicalRegion get_logical_region(void) const
Definition: legion.h:3894
void legion_handoff_to_mpi(void) const
Definition: legion.h:3925
FutureMap execute_index_space(Context ctx, const IndexTaskLauncher &launcher)
FieldID allocate_local_field(size_t field_size, FieldID desired_fieldid=LEGION_AUTO_GENERATE_ID, CustomSerdezID serdez_id=0, const char *provenance=NULL)
ReductionOpID generate_library_reduction_ids(const char *name, size_t count)
static ProjectionFunctor * get_projection_functor(ProjectionID pid)
IndexPartition create_partition_by_intersection(Context ctx, IndexSpace parent, IndexPartition handle1, IndexPartition handle2, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
void free_fields(const std::set< FieldID > &to_free, const bool unordered=false, const char *provenance=NULL)
RegionRequirement & add_field(FieldID fid, bool instance=true)
static ReductionOpID generate_static_reduction_id(void)
bool is_mapped(void) const
Definition: legion.h:1816
void replace_default_mapper(Mapping::Mapper *mapper, Processor proc=Processor::NO_PROC)
LogicalPartition get_parent_logical_partition(Context ctx, LogicalRegion handle)
static const LogicalPartition NO_PART
Definition: legion.h:305
bool has_index_subspace(Context ctx, IndexPartition p, const DomainPoint &color)
TraceID generate_dynamic_trace_id(void)
Definition: legion.h:2590
IndexPartition create_partition_by_domain(Context ctx, IndexSpace parent, const std::map< DomainPoint, Domain > &domains, IndexSpace color_space, bool perform_intersections=true, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
IndexPartition create_partition_by_image(Context ctx, IndexSpace handle, LogicalPartition projection, LogicalRegion parent, FieldID fid, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
IndexPartition create_partition_by_preimage(Context ctx, IndexPartition projection, LogicalRegion handle, LogicalRegion parent, FieldID fid, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
LogicalRegion parent
Definition: legion.h:1099
Future detach_external_resource(Context ctx, PhysicalRegion region, const bool flush=true, const bool unordered=false, const char *provenance=NULL)
void ext_handoff_to_legion(void) const
Color get_index_space_color(Context ctx, IndexSpace handle)
void progress_unordered_operations(Context ctx)
T get_result(bool silence_warnings=false, const char *warning_string=NULL) const
static void enable_profiling(void)
Definition: legion.h:3790
static void configure_MPI_interoperability(int rank)
void mpi_wait_on_legion(void) const
Definition: legion.h:3919
void set_point_arg(const PT point[DIM], const UntypedBuffer &arg, bool replace=false)
void get_layout_constraints(LayoutConstraintID layout_id, LayoutConstraintSet &layout_constraints)
Definition: legion.h:3375
LegionRuntime::Accessor::RegionAccessor< LegionRuntime::Accessor::AccessorType::Generic > get_accessor(bool silence_warnings=false) const
void fill_field(Context ctx, LogicalRegion handle, LogicalRegion parent, FieldID fid, const T &value, Predicate pred=Predicate::TRUE_PRED)
static void set_registration_callback(RegistrationCallbackFnptr callback)
const Task * get_local_task(Context ctx)
PhysicalRegion attach_hdf5(Context ctx, const char *file_name, LogicalRegion handle, LogicalRegion parent, const std::map< FieldID, const char * > &field_map, LegionFileMode mode)
PhysicalRegion attach_external_resource(Context ctx, const AttachLauncher &launcher)
Future select_tunable_value(Context ctx, TunableID tid, MapperID mapper=0, MappingTagID tag=0, const void *args=NULL, size_t argsize=0)
void release_layout(LayoutConstraintID layout_id)
Future issue_execution_fence(Context ctx, const char *provenance=NULL)
void print_once(Context ctx, FILE *f, const char *message)
Definition: legion.h:2359
void attach_semantic_information(TaskID task_id, SemanticTag tag, const void *buffer, size_t size, bool is_mutable=false, bool local_only=false)
Processor get_executing_processor(Context ctx)
IndexSpace get_index_partition_color_space_name(Context ctx, IndexPartition p)
LogicalPartition get_logical_partition_by_tree(Context ctx, IndexPartition handle, FieldSpace fspace, RegionTreeID tid)
Future detach_external_resources(Context ctx, ExternalResources external, const bool flush=true, const bool unordered=false, const char *provenance=NULL)
MapperID generate_dynamic_mapper_id(void)
void unmap_all_regions(Context ctx)
std::set< FieldID > privilege_fields
Definition: legion.h:1095
Definition: legion_domain.h:629
void destroy_logical_region(Context ctx, LogicalRegion handle, const bool unordered=false, const char *provenance=NULL)
Definition: legion.h:3464
static void register_reduction_op(ReductionOpID redop_id, bool permit_duplicates=false)
void register_sharding_functor(ShardingID sid, ShardingFunctor *functor, bool silence_warnings=false, const char *warning_string=NULL)
Definition: legion_domain.h:260
Future execute_task(Context ctx, const TaskLauncher &launcher)
FutureMap execute_must_epoch(Context ctx, const MustEpochLauncher &launcher)
ptr_t safe_cast(Context ctx, ptr_t pointer, LogicalRegion region)
void destroy_logical_partition(Context ctx, LogicalPartition handle, const bool unordered=false)
Color get_logical_partition_color(Context ctx, LogicalPartition handle)
TaskID generate_library_task_ids(const char *name, size_t count)
static void preregister_sharding_functor(ShardingID sid, ShardingFunctor *functor)
void get_memories(std::set< Memory > &memories, bool silence_warnings=false, const char *warning_string=NULL) const
Definition: legion.h:9792
Predicate create_predicate(Context ctx, const Future &f, const char *provenance=NULL)
IndexSpace create_index_space_difference(Context ctx, IndexPartition parent, const DomainPoint &color, IndexSpace initial, const std::vector< IndexSpace > &handles, const char *provenancne=NULL)
static MPILegionHandshake create_handshake(bool init_in_MPI=true, int mpi_participants=1, int legion_participants=1)
Definition: legion.h:1319
void end_mapper_call(Mapping::MapperContext ctx)
const std::map< AddressSpace, int > & find_reverse_MPI_mapping(void)
static bool has_runtime(void)
IndexPartition create_index_partition(Context ctx, IndexSpace parent, const Domain &color_space, const PointColoring &coloring, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, bool allocable=false)
const T & get_reference(bool silence_warnings=false, const char *warning_string=NULL) const
static const char * get_legion_version(void)
void legion_wait_on_mpi(void) const
Definition: legion.h:3930
ProjectionType handle_type
Definition: legion.h:1104
size_t get_untyped_size(void) const
static TraceID generate_static_trace_id(void)
Definition: legion.h:3428
void log_once(Context ctx, Realm::LoggerMessage &message)
TraceID generate_library_trace_ids(const char *name, size_t count)
PhaseBarrier get_legion_wait_phase_barrier(void) const
void allocate_fields(const std::vector< size_t > &field_sizes, std::vector< FieldID > &resulting_fields, CustomSerdezID serdez_id=0, bool local_fields=false, const char *provenance=NULL)
FieldSpace get_field_space(void) const
Definition: legion.h:1904
LogicalRegion get_logical_subregion_by_tree(Context ctx, IndexSpace handle, FieldSpace fspace, RegionTreeID tid)
static Future from_untyped_pointer(Runtime *rt, const void *buffer, size_t bytes)
Lock create_lock(Context ctx)
void end_static_trace(Context ctx)
void get_field_space_fields(Context ctx, FieldSpace handle, std::vector< FieldID > &fields)
void issue_acquire(Context ctx, const AcquireLauncher &launcher)
Definition: legion.h:4572
Future get_current_time(Context ctx, Future precondition=Future())
int get_tunable_value(Context ctx, TunableID tid, MapperID mapper=0, MappingTagID tag=0)
void create_shared_ownership(Context ctx, IndexSpace handle)
void get_fields(std::vector< FieldID > &fields) const
Definition: legion.h:3478
void defer_dynamic_collective_arrival(Context ctx, DynamicCollective dc, const Future &f, unsigned count=1)
void attach_name(TaskID task_id, const char *name, bool is_mutable=false, bool local_only=false)
void set_local_task_variable_untyped(Context ctx, LocalVariableID id, const void *value, void(*destructor)(void *)=NULL)
IndexSpace intersect_index_spaces(Context ctx, const std::vector< IndexSpace > &spaces, const char *provenance=NULL)
void destroy_index_partition(Context ctx, IndexPartition handle, const bool unordered=false, const bool recurse=true, const char *provenance=NULL)
const Task * get_current_task(Context ctx)
FieldID allocate_field(size_t field_size, FieldID desired_fieldid=LEGION_AUTO_GENERATE_ID, CustomSerdezID serdez_id=0, bool local_field=false, const char *provenance=NULL)
static ProjectionID register_partition_function(ProjectionID handle)
bool has_multiple_domains(Context ctx, IndexSpace handle)
virtual void invert(LogicalRegion region, LogicalRegion upper_bound, const Domain &launch_domain, std::vector< DomainPoint > &ordered_points)
static void add_registration_callback(RegistrationCallbackFnptr callback, bool dedup=true, size_t dedup_tag=0)
FieldSpace get_layout_constraint_field_space(LayoutConstraintID layout_id)
static LegionHandshake create_external_handshake(bool init_in_ext=true, int ext_participants=1, int legion_participants=1)
void wait_until_valid(bool silence_warnings=false, const char *warning_string=NULL)
bool is_MPI_interop_configured(void)
void destroy_field_space(Context ctx, FieldSpace handle, const bool unordered=false, const char *provenance=NULL)
FutureMap construct_future_map(Context ctx, IndexSpace domain, const std::map< DomainPoint, UntypedBuffer > &data, bool collective=false, ShardingID sid=0, bool implicit_sharding=false)
Definition: legion.h:2234
bool retrieve_semantic_information(TaskID task_id, SemanticTag tag, const void *&result, size_t &size, bool can_fail=false, bool wait_until_ready=false)
void bind_implicit_task_to_external_thread(Context ctx)
Definition: legion.h:4267
Definition: legion_domain.h:753
Definition: legion.h:1423
void wait_all_results(bool silence_warnings=false, const char *warning_string=NULL) const
Definition: legion.h:3300
Definition: legion.h:4094
static const FieldSpace NO_SPACE
Definition: legion.h:203
IndexSpace union_index_spaces(Context ctx, const std::vector< IndexSpace > &spaces, const char *provenance=NULL)
static const LogicalRegion NO_REGION
Definition: legion.h:238
ShardingID generate_library_sharding_ids(const char *name, size_t count)
static bool has_context(void)
static TaskID generate_static_task_id(void)
virtual unsigned get_depth(void) const =0
void detach_file(Context ctx, PhysicalRegion region)
void mpi_handoff_to_legion(void) const
Definition: legion.h:3914
Definition: legion.h:3340
void destroy_phase_barrier(Context ctx, PhaseBarrier pb)
PhaseBarrier create_phase_barrier(Context ctx, unsigned arrivals)
void destroy_dynamic_collective(Context ctx, DynamicCollective dc)
void end_trace(Context ctx, TraceID tid, const char *provenance=NULL)
LogicalRegion create_logical_region(Context ctx, IndexSpace index, FieldSpace fields, bool task_local=false, const char *provenance=NULL)
static Context get_context(void)
Definition: legion.h:2200
IndexPartition create_pending_partition(Context ctx, IndexSpace parent, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
Definition: legion.h:1146
static long long get_zero_time(void)
void destroy_index_space(Context ctx, IndexSpace handle, const bool unordered=false, const bool recurse=true, const char *provenance=NULL)
static const SerdezOp * get_serdez_op(CustomSerdezID serdez_id)
Definition: legion.h:4137
Definition: legion.h:3829
static MapperID generate_static_mapper_id(void)
Future launch_top_level_task(const TaskLauncher &launcher)
Definition: legion.h:1564
static ProjectionID register_region_function(ProjectionID handle)
Definition: legion.h:1118
Definition: legion.h:2264
IndexSpace subtract_index_spaces(Context ctx, IndexSpace left, IndexSpace right, const char *provenance=NULL)
void issue_release(Context ctx, const ReleaseLauncher &launcher)
static TaskID register_legion_task(TaskID id, Processor::Kind proc_kind, bool single, bool index, VariantID vid=LEGION_AUTO_GENERATE_ID, TaskConfigOptions options=TaskConfigOptions(), const char *task_name=NULL)
IndexSpace create_index_space_intersection(Context ctx, IndexPartition parent, const DomainPoint &color, const std::vector< IndexSpace > &handles, const char *provenance=NULL)
const void * get_untyped_pointer(bool silence_warnings=false, const char *warning_string=NULL) const
IndexSpace create_index_space_union(Context ctx, IndexPartition parent, const DomainPoint &color, const std::vector< IndexSpace > &handles, const char *provenance=NULL)
Definition: legion.h:1461
Predicate predicate_or(Context ctx, const Predicate &p1, const Predicate &p2, const char *provenance=NULL)
Predicate predicate_and(Context ctx, const Predicate &p1, const Predicate &p2, const char *provenance=NULL)
static size_t get_maximum_dimension(void)
ArgumentMap create_argument_map(Context ctx)
Definition: legion_types.h:168
Definition: legion.h:2523
bool is_ready(bool subscribe=false) const
Definition: legion.h:4208
LogicalRegion get_logical_subregion(Context ctx, LogicalPartition parent, IndexSpace handle)
PhysicalRegion map_region(Context ctx, const InlineLauncher &launcher)
int find_local_MPI_rank(void)
Definition: legion.h:2856
Mapping::MapperRuntime * get_mapper_runtime(void)
Definition: legion.h:4163
void remap_region(Context ctx, PhysicalRegion region, const char *provenance=NULL)
Definition: legion_types.h:2541
static const Task * get_context_task(Context ctx)
static const IndexSpace NO_SPACE
Definition: legion.h:90
LogicalRegion get_parent_logical_region(Context ctx, LogicalPartition handle)
Definition: legion.h:4181
static void set_top_level_task_mapper_id(MapperID mapper_id)
bool has_parent_logical_partition(Context ctx, LogicalRegion handle)
void get_index_space_domains(Context ctx, IndexSpace handle, std::vector< Domain > &domains)
Definition: legion_domain.h:132
void register_projection_functor(ProjectionID pid, ProjectionFunctor *functor, bool silence_warnings=false, const char *warning_string=NULL)
IndexSpace get_index_subspace(Context ctx, IndexPartition p, Color color)
void add_mapper(MapperID map_id, Mapping::Mapper *mapper, Processor proc=Processor::NO_PROC)
void raise_region_exception(Context ctx, PhysicalRegion region, bool nuclear)
bool has_logical_partition_by_color(Context ctx, LogicalRegion parent, const DomainPoint &c)
void begin_trace(Context ctx, TraceID tid, bool logical_only=false, bool static_trace=false, const std::set< RegionTreeID > *managed=NULL, const char *provenance=NULL)
IndexSpace get_index_space(void) const
Definition: legion.h:462
static void perform_registration_callback(RegistrationCallbackFnptr callback, bool global, bool deduplicate=true, size_t dedup_tag=0)
CustomSerdezID generate_library_serdez_ids(const char *name, size_t count)
Future get_dynamic_collective_result(Context ctx, DynamicCollective dc, const char *provenance=NULL)
bool has_parent_index_partition(Context ctx, IndexSpace handle)
Definition: legion.h:1183
Definition: legion.h:1675
T get_result(const DomainPoint &point, bool silence_warnings=false, const char *warning_string=NULL) const
static void dump_profiling(void)
void ext_wait_on_legion(void) const
Future issue_timing_measurement(Context ctx, const TimingLauncher &launcher)
IndexPartition create_equal_partition(Context ctx, IndexSpace parent, IndexSpace color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
static void set_return_code(int return_code)
static Future from_value(Runtime *rt, const T &value)
const char * get_layout_constraints_name(LayoutConstraintID layout_id)
std::vector< FieldID > instance_fields
Definition: legion.h:1096
RegionFlags flags
Definition: legion.h:1102
ExternalResources attach_external_resources(Context ctx, const IndexAttachLauncher &launcher)
LegionRuntime::Accessor::RegionAccessor< LegionRuntime::Accessor::AccessorType::Generic > get_field_accessor(FieldID field, bool silence_warnings=false) const
IndexPartition create_partition_by_difference(Context ctx, IndexSpace parent, IndexPartition handle1, IndexPartition handle2, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
static const ReductionOp * get_reduction_op(ReductionOpID redop_id)
void retrieve_name(TaskID task_id, const char *&result)
virtual LogicalRegion project(const Mappable *mappable, unsigned index, LogicalRegion upper_bound, const DomainPoint &point)
IndexSpace get_parent_index_space(Context ctx, IndexPartition handle)
bool has_index_partition(Context ctx, IndexSpace parent, Color color)
IndexAllocator create_index_allocator(Context ctx, IndexSpace handle)
IndexPartition create_partition_by_weights(Context ctx, IndexSpace parent, const std::map< DomainPoint, int > &weights, IndexSpace color_space, size_t granularity=1, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
void unbind_implicit_task_from_external_thread(Context ctx)
IndexPartition create_partition_by_union(Context ctx, IndexSpace parent, IndexPartition handle1, IndexPartition handle2, IndexSpace color_space, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
LayoutConstraintID register_layout(const LayoutConstraintRegistrar ®istrar)
LogicalPartition get_logical_partition_by_color(Context ctx, LogicalRegion parent, Color c)
Definition: legion.h:4241
Domain get_index_partition_color_space(Context ctx, IndexPartition p)
bool is_index_partition_disjoint(Context ctx, IndexPartition p)
static ProjectionID generate_static_projection_id(void)
Definition: legion.h:3618
size_t projection_args_size
Definition: legion.h:1108
ReductionOpID generate_dynamic_reduction_id(void)
PrivilegeMode get_privilege(void) const
void finish_implicit_task(Context ctx)
void destroy_lock(Context ctx, Lock l)
bool is_index_partition_complete(Context ctx, IndexPartition p)
void complete_frame(Context ctx, const char *provenance=NULL)
static void preregister_projection_functor(ProjectionID pid, ProjectionFunctor *functor)
CoherenceProperty prop
Definition: legion.h:1098
Future get_current_time_in_microseconds(Context ctx, Future precondition=Future())
Definition: legion.h:1735
void set_point(const DomainPoint &point, const UntypedBuffer &arg, bool replace=true)
Definition: legion.h:4540
void get_void_result(bool silence_warnings=false, const char *warning_string=NULL) const
VariantID register_task_variant(const TaskVariantRegistrar ®istrar, VariantID vid=LEGION_AUTO_GENERATE_ID)
ShardID local_shard(Context ctx)
void get_index_space_partition_colors(Context ctx, IndexSpace sp, std::set< Color > &colors)
MappingTagID tag
Definition: legion.h:1101
unsigned get_index_partition_depth(Context ctx, IndexPartition handle)
LogicalRegion region
Definition: legion.h:1093
Grant acquire_grant(Context ctx, const std::vector< LockRequest > &requests)
Mapping::MapperContext begin_mapper_call(Context ctx, MapperID id, Processor target=Processor::NO_PROC)
IndexPartition create_partition_by_restriction(Context ctx, IndexSpace parent, IndexSpace color_space, DomainTransform transform, Domain extent, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
const std::map< int, AddressSpace > & find_forward_MPI_mapping(void)
Definition: legion_types.h:2167
static int wait_for_shutdown(void)
Domain get_index_space_domain(Context ctx, IndexSpace handle)
PhaseBarrier get_legion_arrive_phase_barrier(void) const
Definition: legion.h:3683
PhaseBarrier advance_phase_barrier(Context ctx, PhaseBarrier pb)
bool has_point(const DomainPoint &point)
void begin_static_trace(Context ctx, const std::set< RegionTreeID > *managed=NULL)
virtual bool is_exclusive(void) const
Definition: legion.h:4457
void get_void_result(const DomainPoint &point, bool silence_warnings=false, const char *warning_string=NULL) const
Future get_future(const DomainPoint &point) const
PrivilegeMode privilege
Definition: legion.h:1097
TaskID generate_dynamic_task_id(void)
DynamicCollective create_dynamic_collective(Context ctx, unsigned arrivals, ReductionOpID redop, const void *init_value, size_t init_size)
void legion_wait_on_ext(void) const
Definition: legion.h:3731
IndexPartition create_partition_by_field(Context ctx, LogicalRegion handle, LogicalRegion parent, FieldID fid, IndexSpace color_space, Color color=LEGION_AUTO_GENERATE_ID, MapperID id=0, MappingTagID tag=0, PartitionKind part_kind=LEGION_DISJOINT_KIND, UntypedBuffer map_arg=UntypedBuffer(), const char *provenance=NULL)
Definition: legion.h:2134
Definition: legion.h:4508
Definition: legion.h:4014
Mapping::Mapper * get_mapper(Context ctx, MapperID id, Processor target=Processor::NO_PROC)
Definition: legion.h:4307
Color get_index_partition_color(Context ctx, IndexPartition handle)
static void register_custom_serdez_op(CustomSerdezID serdez_id, bool permit_duplicates=false)
bool is_empty(bool block=false, bool silence_warnings=false, const char *warning_string=NULL) const
bool has_logical_subregion_by_color(Context ctx, LogicalPartition parent, const DomainPoint &c)
Predicate predicate_not(Context ctx, const Predicate &p, const char *provenance=NULL)
PhysicalRegion attach_file(Context ctx, const char *file_name, LogicalRegion handle, LogicalRegion parent, const std::vector< FieldID > &field_vec, LegionFileMode mode)
void advance_legion_handshake(void) const
void * get_local_task_variable_untyped(Context ctx, LocalVariableID id)
void free_field(FieldID fid, const bool unordered=false, const char *provenance=NULL)
Definition: legion.h:2075
static void initialize(int *argc, char ***argv, bool filter=false)
void arrive_dynamic_collective(Context ctx, DynamicCollective dc, const void *buffer, size_t size, unsigned count=1)
UntypedBuffer get_point(const DomainPoint &point) const
Future issue_mapping_fence(Context ctx, const char *provenance=NULL)
Definition: legion.h:4335
FieldAllocator create_field_allocator(Context ctx, FieldSpace handle)
static void disable_profiling(void)
LogicalPartition partition
Definition: legion.h:1094
Definition: legion.h:9773
ReductionOpID redop
Definition: legion.h:1100
void legion_handoff_to_ext(void) const
MapperID generate_library_mapper_ids(const char *name, size_t count)
size_t get_field_size(Context ctx, FieldSpace handle, FieldID fid)
IndexPartition get_index_partition(Context ctx, IndexSpace parent, Color color)
IndexPartition create_partition_by_blockify(Context ctx, IndexSpace parent, DomainPoint blocking_factor, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
Definition: legion.h:2216
virtual bool is_invertible(void) const
Definition: legion.h:4472
ProjectionID projection
Definition: legion.h:1105
static LayoutConstraintID preregister_layout(const LayoutConstraintRegistrar ®istrar, LayoutConstraintID layout_id=LEGION_AUTO_GENERATE_ID)
static int start(int argc, char **argv, bool background=false, bool supply_default_mapper=true)
static const InputArgs & get_input_args(void)
Context begin_implicit_task(TaskID top_task_id, MapperID mapper_id, Processor::Kind proc_kind, const char *task_name=NULL, bool control_replicable=false, unsigned shard_per_address_space=1, int shard_id=-1)
ProjectionID generate_library_projection_ids(const char *name, size_t count)
Definition: legion.h:1964
bool remove_point(const DomainPoint &point)
static Runtime * get_runtime(Processor p=Processor::NO_PROC)
DynamicCollective advance_dynamic_collective(Context ctx, DynamicCollective dc)
Future get_predicate_future(Context ctx, const Predicate &p)
unsigned get_index_space_depth(Context ctx, IndexSpace handle)
static VariantID preregister_task_variant(const TaskVariantRegistrar ®istrar, const char *task_name=NULL, VariantID vid=LEGION_AUTO_GENERATE_ID)
Definition: legion.h:3943
ShardingID generate_dynamic_sharding_id(void)
LogicalRegion get_logical_subregion_by_color(Context ctx, LogicalPartition parent, Color c)
CustomSerdezID generate_dynamic_serdez_id(void)
void issue_copy_operation(Context ctx, const CopyLauncher &launcher)
void release_grant(Context ctx, Grant grant)
IndexSpace create_index_space(Context ctx, const Domain &bounds, TypeTag type_tag=0, const char *provenance=NULL)
FieldSpace create_field_space(Context ctx, const char *provenance=NULL)
Color create_cross_product_partitions(Context ctx, IndexPartition handle1, IndexPartition handle2, std::map< IndexSpace, IndexPartition > &handles, PartitionKind part_kind=LEGION_COMPUTE_KIND, Color color=LEGION_AUTO_GENERATE_ID, const char *provenance=NULL)
Definition: legion_types.h:165
bool is_valid(void) const
LogicalPartition get_logical_partition(Context ctx, LogicalRegion parent, IndexPartition handle)
void fill_fields(Context ctx, LogicalRegion handle, LogicalRegion parent, const std::set< FieldID > &fields, const T &value, Predicate pred=Predicate::TRUE_PRED)
void * projection_args
Definition: legion.h:1107
static void set_top_level_task_id(TaskID top_id)
Definition: legion.h:4115
static void legion_task_postamble(Runtime *runtime, Context ctx, const void *retvalptr=NULL, size_t retvalsize=0, bool owned=false, Realm::RegionInstance inst=Realm::RegionInstance::NO_INST)
void unmap_region(Context ctx, PhysicalRegion region)
static ShardingID generate_static_sharding_id(void)
ProjectionID generate_dynamic_projection_id(void)
Future reduce_future_map(Context ctx, const FutureMap &future_map, ReductionOpID redop, bool deterministic=false, const char *provenance=NULL)
Definition: legion.h:4066
static CustomSerdezID generate_static_serdez_id(void)
Definition: legion.h:4288
Definition: legion.h:3532
Definition: legion.h:2302