33#ifndef LEGION_USE_PYTHON_CFFI
49#define NEW_OPAQUE_TYPE(T) \
53 NEW_OPAQUE_TYPE(legion_runtime_t);
54 NEW_OPAQUE_TYPE(legion_context_t);
55 NEW_OPAQUE_TYPE(legion_domain_point_iterator_t);
56#define NEW_ITERATOR_TYPE(DIM) \
57 NEW_OPAQUE_TYPE(legion_rect_in_domain_iterator_##DIM##d_t);
58 LEGION_FOREACH_N(NEW_ITERATOR_TYPE);
59#undef NEW_ITERATOR_TYPE
60 NEW_OPAQUE_TYPE(legion_coloring_t);
61 NEW_OPAQUE_TYPE(legion_domain_coloring_t);
62 NEW_OPAQUE_TYPE(legion_point_coloring_t);
63 NEW_OPAQUE_TYPE(legion_domain_point_coloring_t);
64 NEW_OPAQUE_TYPE(legion_multi_domain_point_coloring_t);
65 NEW_OPAQUE_TYPE(legion_index_space_allocator_t);
66 NEW_OPAQUE_TYPE(legion_field_allocator_t);
67 NEW_OPAQUE_TYPE(legion_argument_map_t);
68 NEW_OPAQUE_TYPE(legion_predicate_t);
69 NEW_OPAQUE_TYPE(legion_future_t);
70 NEW_OPAQUE_TYPE(legion_future_map_t);
71#define NEW_DEFERRED_BUFFER_TYPE(DIM) \
72 NEW_OPAQUE_TYPE(legion_deferred_buffer_char_##DIM##d_t);
73 LEGION_FOREACH_N(NEW_DEFERRED_BUFFER_TYPE)
74#undef NEW_DEFERRED_BUFFER_TYPE
75 NEW_OPAQUE_TYPE(legion_task_launcher_t);
76 NEW_OPAQUE_TYPE(legion_index_launcher_t);
77 NEW_OPAQUE_TYPE(legion_inline_launcher_t);
78 NEW_OPAQUE_TYPE(legion_copy_launcher_t);
79 NEW_OPAQUE_TYPE(legion_index_copy_launcher_t);
80 NEW_OPAQUE_TYPE(legion_fill_launcher_t);
81 NEW_OPAQUE_TYPE(legion_index_fill_launcher_t);
82 NEW_OPAQUE_TYPE(legion_discard_launcher_t);
83 NEW_OPAQUE_TYPE(legion_acquire_launcher_t);
84 NEW_OPAQUE_TYPE(legion_release_launcher_t);
85 NEW_OPAQUE_TYPE(legion_attach_launcher_t);
86 NEW_OPAQUE_TYPE(legion_index_attach_launcher_t);
87 NEW_OPAQUE_TYPE(legion_must_epoch_launcher_t);
88 NEW_OPAQUE_TYPE(legion_physical_region_t);
89 NEW_OPAQUE_TYPE(legion_external_resources_t);
90#define NEW_ACCESSOR_ARRAY_TYPE(DIM) \
91 NEW_OPAQUE_TYPE(legion_accessor_array_##DIM##d_t);
92 LEGION_FOREACH_N(NEW_ACCESSOR_ARRAY_TYPE)
93#undef NEW_ACCESSOR_ARRAY_TYPE
94 NEW_OPAQUE_TYPE(legion_task_t);
95 NEW_OPAQUE_TYPE(legion_task_mut_t);
96 NEW_OPAQUE_TYPE(legion_copy_t);
97 NEW_OPAQUE_TYPE(legion_fill_t);
98 NEW_OPAQUE_TYPE(legion_inline_t);
99 NEW_OPAQUE_TYPE(legion_mappable_t);
100 NEW_OPAQUE_TYPE(legion_region_requirement_t);
101 NEW_OPAQUE_TYPE(legion_output_requirement_t);
102 NEW_OPAQUE_TYPE(legion_machine_t);
103 NEW_OPAQUE_TYPE(legion_logger_t);
104 NEW_OPAQUE_TYPE(legion_mapper_t);
105 NEW_OPAQUE_TYPE(legion_default_mapper_t);
106 NEW_OPAQUE_TYPE(legion_processor_query_t);
107 NEW_OPAQUE_TYPE(legion_memory_query_t);
108 NEW_OPAQUE_TYPE(legion_machine_query_interface_t);
109 NEW_OPAQUE_TYPE(legion_execution_constraint_set_t);
110 NEW_OPAQUE_TYPE(legion_layout_constraint_set_t);
111 NEW_OPAQUE_TYPE(legion_task_layout_constraint_set_t);
112 NEW_OPAQUE_TYPE(legion_slice_task_output_t);
113 NEW_OPAQUE_TYPE(legion_map_task_input_t);
114 NEW_OPAQUE_TYPE(legion_map_task_output_t);
115 NEW_OPAQUE_TYPE(legion_physical_instance_t);
116 NEW_OPAQUE_TYPE(legion_mapper_runtime_t);
117 NEW_OPAQUE_TYPE(legion_mapper_context_t);
118 NEW_OPAQUE_TYPE(legion_field_map_t);
119 NEW_OPAQUE_TYPE(legion_point_transform_functor_t);
120 NEW_OPAQUE_TYPE(legion_task_variant_registrar_t);
121#undef NEW_OPAQUE_TYPE
130 typedef legion_coord_t coord_t;
132#define NEW_POINT_TYPE(DIM) \
133 typedef struct legion_point_##DIM##d_t { \
135 } legion_point_##DIM##d_t;
136 LEGION_FOREACH_N(NEW_POINT_TYPE)
139#define NEW_RECT_TYPE(DIM) \
140 typedef struct legion_rect_##DIM##d_t { \
141 legion_point_##DIM##d_t lo, hi; \
142 } legion_rect_##DIM##d_t;
143 LEGION_FOREACH_N(NEW_RECT_TYPE)
146#define NEW_BLOCKIFY_TYPE(DIM) \
147 typedef struct legion_blockify_##DIM##d_t { \
148 legion_point_##DIM##d_t block_size; \
149 legion_point_##DIM##d_t offset; \
150 } legion_blockify_##DIM##d_t;
151 LEGION_FOREACH_N(NEW_BLOCKIFY_TYPE)
152#undef NEW_BLOCKIFY_TYPE
154#define NEW_TRANSFORM_TYPE(D1, D2) \
155 typedef struct legion_transform_##D1##x##D2##_t { \
156 coord_t trans[D1][D2]; \
157 } legion_transform_##D1##x##D2##_t;
158 LEGION_FOREACH_NN(NEW_TRANSFORM_TYPE)
159#undef NEW_TRANSFORM_TYPE
161#define NEW_AFFINE_TRANSFORM_TYPE(D1, D2) \
162 typedef struct legion_affine_transform_##D1##x##D2##_t { \
163 legion_transform_##D1##x##D2##_t transform; \
164 legion_point_##D1##d_t offset; \
165 } legion_affine_transform_##D1##x##D2##_t;
166 LEGION_FOREACH_NN(NEW_AFFINE_TRANSFORM_TYPE)
167#undef NEW_AFFINE_TRANSFORM_TYPE
174 legion_type_tag_t is_type;
180#if LEGION_MAX_DIM == 1
181#define MAX_DOMAIN_DIM 2
182#elif LEGION_MAX_DIM == 2
183#define MAX_DOMAIN_DIM 4
184#elif LEGION_MAX_DIM == 3
185#define MAX_DOMAIN_DIM 6
186#elif LEGION_MAX_DIM == 4
187#define MAX_DOMAIN_DIM 8
188#elif LEGION_MAX_DIM == 5
189#define MAX_DOMAIN_DIM 10
190#elif LEGION_MAX_DIM == 6
191#define MAX_DOMAIN_DIM 12
192#elif LEGION_MAX_DIM == 7
193#define MAX_DOMAIN_DIM 14
194#elif LEGION_MAX_DIM == 8
195#define MAX_DOMAIN_DIM 16
196#elif LEGION_MAX_DIM == 9
197#define MAX_DOMAIN_DIM 18
199#error "Illegal value of LEGION_MAX_DIM"
201#if MAX_DOMAIN_DIM != 2 * LEGION_MAX_RECT_DIM
202#error Mismatch in MAX_DOMAIN_DIM
204 coord_t rect_data[MAX_DOMAIN_DIM];
213 coord_t point_data[LEGION_MAX_DIM];
225#if LEGION_MAX_DIM == 1
226#define MAX_MATRIX_DIM 1
227#elif LEGION_MAX_DIM == 2
228#define MAX_MATRIX_DIM 4
229#elif LEGION_MAX_DIM == 3
230#define MAX_MATRIX_DIM 9
231#elif LEGION_MAX_DIM == 4
232#define MAX_MATRIX_DIM 16
233#elif LEGION_MAX_DIM == 5
234#define MAX_MATRIX_DIM 25
235#elif LEGION_MAX_DIM == 6
236#define MAX_MATRIX_DIM 36
237#elif LEGION_MAX_DIM == 7
238#define MAX_MATRIX_DIM 49
239#elif LEGION_MAX_DIM == 8
240#define MAX_MATRIX_DIM 64
241#elif LEGION_MAX_DIM == 9
242#define MAX_MATRIX_DIM 81
244#error "Illegal value of LEGION_MAX_DIM"
246#if MAX_MATRIX_DIM != \
247 LEGION_MAX_POINT_DIM * LEGION_MAX_POINT_DIM
248#error Mismatch in MAX_MATRIX_DIM
250 coord_t matrix[MAX_MATRIX_DIM];
266 legion_distributed_id_t id;
267 legion_index_tree_id_t tid;
268 legion_type_tag_t type_tag;
275 legion_distributed_id_t id;
276 legion_index_tree_id_t tid;
277 legion_type_tag_t type_tag;
284 legion_distributed_id_t id;
291 legion_distributed_id_t tree_id;
300 legion_distributed_id_t tree_id;
369 realm_barrier_timestamp_t timestamp;
380 realm_barrier_timestamp_t timestamp;
382 legion_reduction_op_id_t redop;
393 bool valid_instances;
396 legion_task_priority_t parent_priority;
406 typedef void (*legion_registration_callback_pointer_t)(
407 legion_machine_t , legion_runtime_t ,
415 typedef realm_task_pointer_t legion_task_pointer_wrapped_t;
430 *legion_projection_functor_logical_partition_t)(
440 *legion_projection_functor_logical_region_args_t)(
443 const void* ,
size_t );
450 *legion_projection_functor_logical_partition_args_t)(
454 const void* ,
size_t );
461 *legion_projection_functor_logical_region_mappable_t)(
462 legion_runtime_t , legion_mappable_t ,
471 *legion_projection_functor_logical_partition_mappable_t)(
472 legion_runtime_t , legion_mappable_t ,
495 legion_runtime_t runtime, legion_context_t ctx,
legion_ptr_t pointer,
510#define FROM_RECT(DIM) \
511 legion_domain_t legion_domain_from_rect_##DIM##d(legion_rect_##DIM##d_t r);
512 LEGION_FOREACH_N(FROM_RECT)
524#define GET_RECT(DIM) \
525 legion_rect_##DIM##d_t legion_domain_get_rect_##DIM##d(legion_domain_t d);
526 LEGION_FOREACH_N(GET_RECT)
534#define GET_BOUNDS(DIM) \
535 legion_rect_##DIM##d_t legion_domain_get_bounds_##DIM##d(legion_domain_t d);
536 LEGION_FOREACH_N(GET_BOUNDS)
554 unsigned m,
unsigned n);
556#define FROM_TRANSFORM(D1, D2) \
557 legion_domain_transform_t legion_domain_transform_from_##D1##x##D2( \
558 legion_transform_##D1##x##D2##_t t);
559 LEGION_FOREACH_NN(FROM_TRANSFORM)
563 unsigned m,
unsigned n);
565#define FROM_AFFINE(D1, D2) \
566 legion_domain_affine_transform_t \
567 legion_domain_affine_transform_from_##D1##x##D2( \
568 legion_affine_transform_##D1##x##D2##_t t);
569 LEGION_FOREACH_NN(FROM_AFFINE)
579#define FROM_POINT(DIM) \
580 legion_domain_point_t legion_domain_point_from_point_##DIM##d( \
581 legion_point_##DIM##d_t p);
582 LEGION_FOREACH_N(FROM_POINT)
588#define GET_POINT(DIM) \
589 legion_point_##DIM##d_t legion_domain_point_get_point_##DIM##d( \
590 legion_domain_point_t p);
591 LEGION_FOREACH_N(GET_POINT)
611 legion_runtime_t runtime, legion_context_t ctx,
623 legion_domain_point_iterator_t legion_domain_point_iterator_create(
631 void legion_domain_point_iterator_destroy(
632 legion_domain_point_iterator_t handle);
637 bool legion_domain_point_iterator_has_next(
638 legion_domain_point_iterator_t handle);
644 legion_domain_point_iterator_t handle);
655#define ITERATOR_CREATE(DIM) \
656 legion_rect_in_domain_iterator_##DIM##d_t \
657 legion_rect_in_domain_iterator_create_##DIM##d(legion_domain_t handle);
658 LEGION_FOREACH_N(ITERATOR_CREATE)
659#undef ITERATOR_CREATE
666#define ITERATOR_DESTROY(DIM) \
667 void legion_rect_in_domain_iterator_destroy_##DIM##d( \
668 legion_rect_in_domain_iterator_##DIM##d_t handle);
669 LEGION_FOREACH_N(ITERATOR_DESTROY)
670#undef ITERATOR_DESTROY
675#define ITERATOR_VALID(DIM) \
676 bool legion_rect_in_domain_iterator_valid_##DIM##d( \
677 legion_rect_in_domain_iterator_##DIM##d_t handle);
678 LEGION_FOREACH_N(ITERATOR_VALID)
684#define ITERATOR_STEP(DIM) \
685 bool legion_rect_in_domain_iterator_step_##DIM##d( \
686 legion_rect_in_domain_iterator_##DIM##d_t handle);
687 LEGION_FOREACH_N(ITERATOR_STEP)
693#define ITERATOR_OP(DIM) \
694 legion_rect_##DIM##d_t legion_rect_in_domain_iterator_get_rect_##DIM##d( \
695 legion_rect_in_domain_iterator_##DIM##d_t handle);
696 LEGION_FOREACH_N(ITERATOR_OP)
708 legion_coloring_t legion_coloring_create(
void);
715 void legion_coloring_destroy(legion_coloring_t handle);
720 void legion_coloring_ensure_color(
721 legion_coloring_t handle, legion_color_t color);
726 void legion_coloring_add_point(
727 legion_coloring_t handle, legion_color_t color,
legion_ptr_t point);
732 void legion_coloring_delete_point(
733 legion_coloring_t handle, legion_color_t color,
legion_ptr_t point);
738 bool legion_coloring_has_point(
739 legion_coloring_t handle, legion_color_t color,
legion_ptr_t point);
744 void legion_coloring_add_range(
745 legion_coloring_t handle, legion_color_t color,
legion_ptr_t start,
757 legion_domain_coloring_t legion_domain_coloring_create(
void);
764 void legion_domain_coloring_destroy(legion_domain_coloring_t handle);
769 void legion_domain_coloring_color_domain(
770 legion_domain_coloring_t handle, legion_color_t color,
777 legion_domain_coloring_t handle);
788 legion_point_coloring_t legion_point_coloring_create(
void);
795 void legion_point_coloring_destroy(legion_point_coloring_t handle);
800 void legion_point_coloring_add_point(
807 void legion_point_coloring_add_range(
820 legion_domain_point_coloring_t legion_domain_point_coloring_create(
void);
827 void legion_domain_point_coloring_destroy(
828 legion_domain_point_coloring_t handle);
833 void legion_domain_point_coloring_color_domain(
846 legion_multi_domain_point_coloring_t
847 legion_multi_domain_point_coloring_create(
void);
854 void legion_multi_domain_point_coloring_destroy(
855 legion_multi_domain_point_coloring_t handle);
860 void legion_multi_domain_point_coloring_color_domain(
874 legion_runtime_t runtime, legion_context_t ctx,
size_t max_num_elmts);
882 legion_runtime_t runtime, legion_context_t ctx,
legion_domain_t domain);
890 legion_runtime_t runtime, legion_context_t ctx,
size_t dimensions,
891 legion_future_t future, legion_type_tag_t type_tag );
899 legion_runtime_t runtime, legion_context_t ctx,
908 legion_runtime_t runtime, legion_context_t ctx,
923 bool legion_index_space_has_multiple_domains(
939 bool legion_index_space_has_parent_index_partition(
954 void legion_index_space_create_shared_ownership(
955 legion_runtime_t runtime, legion_context_t ctx,
963 void legion_index_space_destroy(
964 legion_runtime_t runtime, legion_context_t ctx,
972 void legion_index_space_destroy_unordered(
973 legion_runtime_t runtime, legion_context_t ctx,
979 void legion_index_space_attach_semantic_information(
981 legion_semantic_tag_t tag,
const void* buffer,
size_t size,
987 bool legion_index_space_retrieve_semantic_information(
989 legion_semantic_tag_t tag,
const void** result,
size_t* size,
990 bool can_fail ,
bool wait_until_ready );
995 void legion_index_space_attach_name(
1002 void legion_index_space_retrieve_name(
1004 const char** result);
1024 legion_runtime_t runtime, legion_context_t ctx,
1026 legion_color_t part_color );
1035 legion_runtime_t runtime, legion_context_t ctx,
1037 legion_domain_coloring_t coloring,
bool disjoint,
1038 legion_color_t part_color );
1047 legion_runtime_t runtime, legion_context_t ctx,
1049 legion_point_coloring_t coloring,
1050 legion_partition_kind_t part_kind ,
1051 legion_color_t color );
1061 legion_runtime_t runtime, legion_context_t ctx,
1063 legion_domain_point_coloring_t coloring,
1064 legion_partition_kind_t part_kind ,
1065 legion_color_t color );
1075 legion_index_partition_create_multi_domain_point_coloring(
1076 legion_runtime_t runtime, legion_context_t ctx,
1078 legion_multi_domain_point_coloring_t coloring,
1079 legion_partition_kind_t part_kind ,
1080 legion_color_t color );
1088#define CREATE_BLOCKIFY(DIM) \
1089 legion_index_partition_t legion_index_partition_create_blockify_##DIM##d( \
1090 legion_runtime_t runtime, legion_context_t ctx, \
1091 legion_index_space_t parent, legion_blockify_##DIM##d_t blockify, \
1092 legion_color_t part_color );
1093 LEGION_FOREACH_N(CREATE_BLOCKIFY)
1094#undef CREATE_BLOCKIFY
1102 legion_runtime_t runtime, legion_context_t ctx,
1104 size_t granularity, legion_color_t color );
1112 legion_runtime_t runtime, legion_context_t ctx,
1115 size_t granularity ,
1116 legion_color_t color );
1124 legion_runtime_t runtime, legion_context_t ctx,
1127 legion_color_t color );
1135 legion_runtime_t runtime, legion_context_t ctx,
1138 legion_partition_kind_t part_kind ,
1139 legion_color_t color );
1147 legion_runtime_t runtime, legion_context_t ctx,
1150 legion_partition_kind_t part_kind ,
1151 legion_color_t color );
1159 legion_runtime_t runtime, legion_context_t ctx,
1161 legion_partition_kind_t part_kind ,
1162 legion_color_t color ,
1171 legion_runtime_t runtime, legion_context_t ctx,
1174 legion_partition_kind_t part_kind ,
1175 legion_color_t color );
1183 legion_runtime_t runtime, legion_context_t ctx,
1187 legion_partition_kind_t part_kind ,
1188 legion_color_t color );
1196 legion_runtime_t runtime, legion_context_t ctx,
1199 legion_partition_kind_t part_kind ,
1200 legion_color_t color );
1208 legion_runtime_t runtime, legion_context_t ctx,
1211 legion_color_t color ,
1212 legion_mapper_id_t
id , legion_mapping_tag_id_t tag ,
1213 legion_partition_kind_t part_kind ,
1222 legion_runtime_t runtime, legion_context_t ctx,
1226 legion_partition_kind_t part_kind ,
1227 legion_color_t color ,
1228 legion_mapper_id_t
id , legion_mapping_tag_id_t tag ,
1237 legion_runtime_t runtime, legion_context_t ctx,
1241 legion_partition_kind_t part_kind ,
1242 legion_color_t color ,
1243 legion_mapper_id_t
id , legion_mapping_tag_id_t tag ,
1252 legion_runtime_t runtime, legion_context_t ctx,
1256 legion_partition_kind_t part_kind ,
1257 legion_color_t color ,
1258 legion_mapper_id_t
id , legion_mapping_tag_id_t tag ,
1267 legion_runtime_t runtime, legion_context_t ctx,
1271 legion_partition_kind_t part_kind ,
1272 legion_color_t color ,
1273 legion_mapper_id_t
id , legion_mapping_tag_id_t tag ,
1282 legion_runtime_t runtime, legion_context_t ctx,
1285 legion_partition_kind_t part_kind ,
1286 legion_color_t color );
1294 legion_runtime_t runtime, legion_context_t ctx,
1296 legion_partition_kind_t part_kind ,
1297 legion_color_t color );
1303 legion_runtime_t runtime, legion_context_t ctx,
1311 legion_index_partition_create_index_space_union_partition(
1312 legion_runtime_t runtime, legion_context_t ctx,
1320 legion_index_partition_create_index_space_intersection_spaces(
1321 legion_runtime_t runtime, legion_context_t ctx,
1329 legion_index_partition_create_index_space_intersection_partition(
1330 legion_runtime_t runtime, legion_context_t ctx,
1338 legion_runtime_t runtime, legion_context_t ctx,
1346 bool legion_index_partition_is_disjoint(
1352 bool legion_index_partition_is_complete(
1362 legion_color_t color);
1376 bool legion_index_partition_has_index_subspace_domain_point(
1389 legion_color_t legion_index_partition_get_color(
1405 void legion_index_partition_create_shared_ownership(
1406 legion_runtime_t runtime, legion_context_t ctx,
1414 void legion_index_partition_destroy(
1415 legion_runtime_t runtime, legion_context_t ctx,
1423 void legion_index_partition_destroy_unordered(
1424 legion_runtime_t runtime, legion_context_t ctx,
1431 void legion_index_partition_attach_semantic_information(
1433 legion_semantic_tag_t tag,
const void* buffer,
size_t size,
1439 bool legion_index_partition_retrieve_semantic_information(
1441 legion_semantic_tag_t tag,
const void** result,
size_t* size,
1442 bool can_fail ,
bool wait_until_ready );
1447 void legion_index_partition_attach_name(
1449 const char* name,
bool is_mutable );
1454 void legion_index_partition_retrieve_name(
1456 const char** result);
1468 legion_runtime_t runtime, legion_context_t ctx);
1476 legion_runtime_t runtime, legion_context_t ctx,
size_t* field_sizes,
1477 legion_field_id_t* field_ids,
size_t num_fields,
1478 legion_custom_serdez_id_t serdez);
1486 legion_runtime_t runtime, legion_context_t ctx,
1487 legion_future_t* field_sizes, legion_field_id_t* field_ids,
1488 size_t num_fields, legion_custom_serdez_id_t serdez);
1500 void legion_field_space_create_shared_ownership(
1501 legion_runtime_t runtime, legion_context_t ctx,
1509 void legion_field_space_destroy(
1510 legion_runtime_t runtime, legion_context_t ctx,
1518 void legion_field_space_destroy_unordered(
1519 legion_runtime_t runtime, legion_context_t ctx,
1525 void legion_field_space_attach_semantic_information(
1527 legion_semantic_tag_t tag,
const void* buffer,
size_t size,
1533 bool legion_field_space_retrieve_semantic_information(
1535 legion_semantic_tag_t tag,
const void** result,
size_t* size,
1536 bool can_fail ,
bool wait_until_ready );
1543 legion_field_id_t* legion_field_space_get_fields(
1544 legion_runtime_t runtime, legion_context_t ctx,
1552 bool legion_field_space_has_fields(
1553 legion_runtime_t runtime, legion_context_t ctx,
1555 size_t fields_size);
1560 void legion_field_id_attach_semantic_information(
1562 legion_field_id_t
id, legion_semantic_tag_t tag,
const void* buffer,
1563 size_t size,
bool is_mutable );
1568 bool legion_field_id_retrieve_semantic_information(
1570 legion_field_id_t
id, legion_semantic_tag_t tag,
const void** result,
1571 size_t* size,
bool can_fail ,
1572 bool wait_until_ready );
1577 void legion_field_space_attach_name(
1584 void legion_field_space_retrieve_name(
1586 const char** result);
1591 void legion_field_id_attach_name(
1593 legion_field_id_t
id,
const char* name,
bool is_mutable );
1598 void legion_field_id_retrieve_name(
1600 legion_field_id_t
id,
const char** result);
1605 size_t legion_field_id_get_size(
1606 legion_runtime_t runtime, legion_context_t ctx,
1619 legion_runtime_t runtime, legion_context_t ctx,
1627 void legion_logical_region_create_shared_ownership(
1628 legion_runtime_t runtime, legion_context_t ctx,
1636 void legion_logical_region_destroy(
1637 legion_runtime_t runtime, legion_context_t ctx,
1645 void legion_logical_region_destroy_unordered(
1646 legion_runtime_t runtime, legion_context_t ctx,
1652 legion_color_t legion_logical_region_get_color(
1664 bool legion_logical_region_has_parent_logical_partition(
1676 void legion_logical_region_attach_semantic_information(
1678 legion_semantic_tag_t tag,
const void* buffer,
size_t size,
1684 bool legion_logical_region_retrieve_semantic_information(
1686 legion_semantic_tag_t tag,
const void** result,
size_t* size,
1687 bool can_fail ,
bool wait_until_ready );
1692 void legion_logical_region_attach_name(
1694 const char* name,
bool is_mutable );
1699 void legion_logical_region_retrieve_name(
1701 const char** result);
1728 legion_runtime_t runtime, legion_context_t ctx,
1730 legion_region_tree_id_t tid);
1737 void legion_logical_partition_destroy(
1738 legion_runtime_t runtime, legion_context_t ctx,
1746 void legion_logical_partition_destroy_unordered(
1747 legion_runtime_t runtime, legion_context_t ctx,
1765 legion_logical_partition_get_logical_subregion_by_color(
1775 legion_logical_partition_get_logical_subregion_by_color_domain_point(
1782 bool legion_logical_partition_has_logical_subregion_by_color_domain_point(
1792 legion_logical_partition_get_logical_subregion_by_tree(
1805 void legion_logical_partition_attach_semantic_information(
1807 legion_semantic_tag_t tag,
const void* buffer,
size_t size,
1813 bool legion_logical_partition_retrieve_semantic_information(
1815 legion_semantic_tag_t tag,
const void** result,
size_t* size,
1816 bool can_fail ,
bool wait_until_ready );
1821 void legion_logical_partition_attach_name(
1823 const char* name,
bool is_mutable );
1828 void legion_logical_partition_retrieve_name(
1830 const char** result);
1838 void legion_reset_equivalence_sets(
1839 legion_runtime_t runtime, legion_context_t ctx,
1841 int num_fields, legion_field_id_t* fields);
1850 legion_region_requirement_t legion_region_requirement_create_logical_region(
1853 legion_mapping_tag_id_t tag ,
bool verified );
1858 legion_region_requirement_t
1859 legion_region_requirement_create_logical_region_projection(
1861 legion_privilege_mode_t priv, legion_coherence_property_t prop,
1868 legion_region_requirement_t
1869 legion_region_requirement_create_logical_partition(
1871 legion_projection_id_t proj , legion_privilege_mode_t priv,
1873 legion_mapping_tag_id_t tag ,
bool verified );
1878 void legion_region_requirement_destroy(legion_region_requirement_t handle);
1883 void legion_region_requirement_add_field(
1884 legion_region_requirement_t handle, legion_field_id_t field,
1885 bool instance_field);
1890 void legion_region_requirement_add_flags(
1891 legion_region_requirement_t handle, legion_region_flags_t flags);
1897 legion_region_requirement_t handle);
1903 legion_region_requirement_t handle);
1909 legion_region_requirement_t handle);
1914 unsigned legion_region_requirement_get_privilege_fields_size(
1915 legion_region_requirement_t handle);
1928 void legion_region_requirement_get_privilege_fields(
1929 legion_region_requirement_t handle, legion_field_id_t* fields,
1930 unsigned fields_size);
1939 legion_field_id_t legion_region_requirement_get_privilege_field(
1940 legion_region_requirement_t handle,
unsigned idx);
1945 unsigned legion_region_requirement_get_instance_fields_size(
1946 legion_region_requirement_t handle);
1959 void legion_region_requirement_get_instance_fields(
1960 legion_region_requirement_t handle, legion_field_id_t* fields,
1961 unsigned fields_size);
1968 legion_field_id_t legion_region_requirement_get_instance_field(
1969 legion_region_requirement_t handle,
unsigned idx);
1974 legion_privilege_mode_t legion_region_requirement_get_privilege(
1975 legion_region_requirement_t handle);
1980 legion_coherence_property_t legion_region_requirement_get_prop(
1981 legion_region_requirement_t handle);
1986 legion_reduction_op_id_t legion_region_requirement_get_redop(
1987 legion_region_requirement_t handle);
1992 legion_mapping_tag_id_t legion_region_requirement_get_tag(
1993 legion_region_requirement_t handle);
1998 legion_handle_type_t legion_region_requirement_get_handle_type(
1999 legion_region_requirement_t handle);
2004 legion_projection_id_t legion_region_requirement_get_projection(
2005 legion_region_requirement_t handle);
2014 legion_output_requirement_t legion_output_requirement_create(
2016 size_t fields_size,
int dim,
bool global_indexing);
2021 legion_output_requirement_t
2022 legion_output_requirement_create_region_requirement(
2023 legion_region_requirement_t handle);
2028 void legion_output_requirement_destroy(legion_output_requirement_t handle);
2033 void legion_output_requirement_add_field(
2034 legion_output_requirement_t handle, legion_field_id_t field,
2041 legion_output_requirement_t handle);
2047 legion_output_requirement_t handle);
2053 legion_output_requirement_t handle);
2064 legion_field_allocator_t legion_field_allocator_create(
2065 legion_runtime_t runtime, legion_context_t ctx,
2073 void legion_field_allocator_destroy(legion_field_allocator_t handle);
2078 legion_field_id_t legion_auto_generate_id(
void);
2083 legion_field_id_t legion_field_allocator_allocate_field(
2084 legion_field_allocator_t allocator,
size_t field_size,
2085 legion_field_id_t desired_fieldid );
2090 legion_field_id_t legion_field_allocator_allocate_field_future(
2091 legion_field_allocator_t allocator, legion_future_t field_size,
2092 legion_field_id_t desired_fieldid );
2097 void legion_field_allocator_free_field(
2098 legion_field_allocator_t allocator, legion_field_id_t fid);
2103 void legion_field_allocator_free_field_unordered(
2104 legion_field_allocator_t allocator, legion_field_id_t fid,
2110 legion_field_id_t legion_field_allocator_allocate_local_field(
2111 legion_field_allocator_t allocator,
size_t field_size,
2112 legion_field_id_t desired_fieldid );
2119 legion_argument_map_t legion_argument_map_create(
void);
2126 legion_argument_map_t legion_argument_map_from_future_map(
2127 legion_future_map_t map);
2132 void legion_argument_map_set_point(
2139 void legion_argument_map_set_future(
2141 legion_future_t future,
bool replace );
2148 void legion_argument_map_destroy(legion_argument_map_t handle);
2159 legion_predicate_t legion_predicate_create(
2160 legion_runtime_t runtime, legion_context_t ctx, legion_future_t f);
2167 void legion_predicate_destroy(legion_predicate_t handle);
2174 const legion_predicate_t legion_predicate_true(
void);
2181 const legion_predicate_t legion_predicate_false(
void);
2193 legion_runtime_t runtime, legion_context_t ctx,
unsigned arrivals);
2200 void legion_phase_barrier_destroy(
2201 legion_runtime_t runtime, legion_context_t ctx,
2208 legion_runtime_t runtime, legion_context_t ctx,
2214 void legion_phase_barrier_arrive(
2215 legion_runtime_t runtime, legion_context_t ctx,
2221 void legion_phase_barrier_wait(
2222 legion_runtime_t runtime, legion_context_t ctx,
2231 legion_runtime_t runtime, legion_context_t ctx,
2244 legion_runtime_t runtime, legion_context_t ctx,
unsigned arrivals,
2245 legion_reduction_op_id_t redop,
const void* init_value,
size_t init_size);
2252 void legion_dynamic_collective_destroy(
2253 legion_runtime_t runtime, legion_context_t ctx,
2260 legion_runtime_t runtime, legion_context_t ctx,
2266 void legion_dynamic_collective_arrive(
2267 legion_runtime_t runtime, legion_context_t ctx,
2274 void legion_dynamic_collective_defer_arrival(
2275 legion_runtime_t runtime, legion_context_t ctx,
2284 legion_future_t legion_dynamic_collective_get_result(
2285 legion_runtime_t runtime, legion_context_t ctx,
2294 legion_runtime_t runtime, legion_context_t ctx,
2306 legion_future_t legion_future_from_untyped_pointer(
2307 legion_runtime_t runtime,
const void* buffer,
size_t size);
2314 legion_future_t legion_future_from_untyped_pointer_detailed(
2315 legion_runtime_t runtime,
const void* buffer,
size_t size,
2316 bool take_ownership,
const char* provenance,
bool shard_local);
2323 legion_future_t legion_future_copy(legion_future_t handle);
2330 void legion_future_destroy(legion_future_t handle);
2335 void legion_future_get_void_result(legion_future_t handle);
2340 void legion_future_wait(
2341 legion_future_t handle,
bool silence_warnings ,
2342 const char* warning_string );
2347 bool legion_future_is_empty(legion_future_t handle,
bool block );
2352 bool legion_future_is_ready(legion_future_t handle);
2357 bool legion_future_is_ready_subscribe(legion_future_t handle,
bool subscribe);
2362 const void* legion_future_get_untyped_pointer(legion_future_t handle);
2367 size_t legion_future_get_untyped_size(legion_future_t handle);
2372 const void* legion_future_get_metadata(
2373 legion_future_t handle,
size_t* size );
2384 legion_future_map_t legion_future_map_copy(legion_future_map_t handle);
2391 void legion_future_map_destroy(legion_future_map_t handle);
2396 void legion_future_map_wait_all_results(legion_future_map_t handle);
2403 legion_future_t legion_future_map_get_future(
2409 legion_domain_t legion_future_map_get_domain(legion_future_map_t handle);
2416 legion_future_t legion_future_map_reduce(
2417 legion_runtime_t runtime, legion_context_t ctx,
2418 legion_future_map_t handle, legion_reduction_op_id_t redop,
2419 bool deterministic, legion_mapper_id_t map_id,
2420 legion_mapping_tag_id_t tag);
2427 legion_future_t legion_future_map_reduce_with_initial_value(
2428 legion_runtime_t runtime, legion_context_t ctx,
2429 legion_future_map_t handle, legion_reduction_op_id_t redop,
2430 bool deterministic, legion_mapper_id_t map_id,
2431 legion_mapping_tag_id_t tag,
const char* provenance,
2432 legion_future_t initial_value);
2439 legion_future_map_t legion_future_map_construct_from_buffers(
2440 legion_runtime_t runtime, legion_context_t ctx,
legion_domain_t domain,
2442 size_t num_points,
bool collective, legion_sharding_id_t sid,
2443 bool implicit_sharding);
2450 legion_future_map_t legion_future_map_construct_from_futures(
2451 legion_runtime_t runtime, legion_context_t ctx,
legion_domain_t domain,
2453 size_t num_futures,
bool collective, legion_sharding_id_t sid,
2454 bool implicit_sharding);
2461 legion_future_map_t legion_future_map_transform(
2462 legion_runtime_t runtime, legion_context_t ctx, legion_future_map_t fm,
2464 bool take_ownership);
2475#define BUFFER_CREATE(DIM) \
2476 legion_deferred_buffer_char_##DIM##d_t \
2477 legion_deferred_buffer_char_##DIM##d_create( \
2478 legion_rect_##DIM##d_t bounds, legion_memory_kind_t kind, \
2479 char* initial_value);
2480 LEGION_FOREACH_N(BUFFER_CREATE)
2486#define BUFFER_PTR(DIM) \
2487 char* legion_deferred_buffer_char_##DIM##d_ptr( \
2488 legion_deferred_buffer_char_##DIM##d_t buffer, \
2489 legion_point_##DIM##d_t p);
2490 LEGION_FOREACH_N(BUFFER_PTR)
2496#define BUFFER_DESTROY(DIM) \
2497 void legion_deferred_buffer_char_##DIM##d_destroy( \
2498 legion_deferred_buffer_char_##DIM##d_t buffer);
2499 LEGION_FOREACH_N(BUFFER_DESTROY)
2500#undef BUFFER_DESTROY
2511 legion_task_launcher_t legion_task_launcher_create(
2513 legion_predicate_t pred ,
2514 legion_mapper_id_t
id , legion_mapping_tag_id_t tag );
2521 legion_task_launcher_t legion_task_launcher_create_from_buffer(
2522 legion_task_id_t tid,
const void* buffer,
size_t buffer_size,
2523 legion_predicate_t pred ,
2524 legion_mapper_id_t
id , legion_mapping_tag_id_t tag );
2531 void legion_task_launcher_destroy(legion_task_launcher_t handle);
2538 legion_future_t legion_task_launcher_execute(
2539 legion_runtime_t runtime, legion_context_t ctx,
2540 legion_task_launcher_t launcher);
2547 legion_future_t legion_task_launcher_execute_outputs(
2548 legion_runtime_t runtime, legion_context_t ctx,
2549 legion_task_launcher_t launcher, legion_output_requirement_t* reqs,
2555 unsigned legion_task_launcher_add_region_requirement_logical_region(
2557 legion_privilege_mode_t priv, legion_coherence_property_t prop,
2564 unsigned legion_task_launcher_add_region_requirement_logical_region_reduction(
2566 legion_reduction_op_id_t redop, legion_coherence_property_t prop,
2573 void legion_task_launcher_set_region_requirement_logical_region(
2574 legion_task_launcher_t launcher,
unsigned idx,
2577 legion_mapping_tag_id_t tag ,
bool verified );
2582 void legion_task_launcher_set_region_requirement_logical_region_reduction(
2583 legion_task_launcher_t launcher,
unsigned idx,
2586 legion_mapping_tag_id_t tag ,
bool verified );
2591 void legion_task_launcher_add_field(
2592 legion_task_launcher_t launcher,
unsigned idx, legion_field_id_t fid,
2598 const void* legion_index_launcher_get_projection_args(
2599 legion_region_requirement_t requirement,
size_t* size);
2604 void legion_index_launcher_set_projection_args(
2605 legion_index_launcher_t launcher_,
unsigned idx,
const void* args,
2606 size_t size,
bool own);
2611 void legion_task_launcher_add_flags(
2612 legion_task_launcher_t launcher,
unsigned idx,
2613 enum legion_region_flags_t flags);
2618 void legion_task_launcher_intersect_flags(
2619 legion_task_launcher_t launcher,
unsigned idx,
2620 enum legion_region_flags_t flags);
2625 unsigned legion_task_launcher_add_index_requirement(
2633 void legion_task_launcher_add_future(
2634 legion_task_launcher_t launcher, legion_future_t future);
2639 void legion_task_launcher_add_wait_barrier(
2645 void legion_task_launcher_add_arrival_barrier(
2651 void legion_task_launcher_set_argument(
2657 void legion_task_launcher_set_point(
2663 void legion_task_launcher_set_sharding_space(
2669 void legion_task_launcher_set_predicate_false_future(
2670 legion_task_launcher_t launcher, legion_future_t f);
2675 void legion_task_launcher_set_predicate_false_result(
2681 void legion_task_launcher_set_mapper(
2682 legion_task_launcher_t launcher, legion_mapper_id_t mapper_id);
2687 void legion_task_launcher_set_mapping_tag(
2688 legion_task_launcher_t launcher, legion_mapping_tag_id_t tag);
2693 void legion_task_launcher_set_mapper_arg(
2699 void legion_task_launcher_set_enable_inlining(
2700 legion_task_launcher_t launcher,
bool enable_inlining);
2705 void legion_task_launcher_set_local_function_task(
2706 legion_task_launcher_t launcher,
bool local_function_task);
2711 void legion_task_launcher_set_elide_future_return(
2712 legion_task_launcher_t launcher,
bool elide_future_return);
2717 void legion_task_launcher_set_provenance(
2718 legion_task_launcher_t launcher,
const char* provenance);
2725 legion_index_launcher_t legion_index_launcher_create(
2728 legion_predicate_t pred ,
2729 bool must , legion_mapper_id_t
id ,
2730 legion_mapping_tag_id_t tag );
2737 legion_index_launcher_t legion_index_launcher_create_from_buffer(
2739 size_t buffer_size, legion_argument_map_t map,
2740 legion_predicate_t pred ,
2741 bool must , legion_mapper_id_t
id ,
2742 legion_mapping_tag_id_t tag );
2749 void legion_index_launcher_destroy(legion_index_launcher_t handle);
2757 legion_future_map_t legion_index_launcher_execute(
2758 legion_runtime_t runtime, legion_context_t ctx,
2759 legion_index_launcher_t launcher);
2767 legion_future_t legion_index_launcher_execute_reduction(
2768 legion_runtime_t runtime, legion_context_t ctx,
2769 legion_index_launcher_t launcher, legion_reduction_op_id_t redop);
2777 legion_future_map_t legion_index_launcher_execute_outputs(
2778 legion_runtime_t runtime, legion_context_t ctx,
2779 legion_index_launcher_t launcher, legion_output_requirement_t* reqs,
2788 legion_future_t legion_index_launcher_execute_deterministic_reduction(
2789 legion_runtime_t runtime, legion_context_t ctx,
2790 legion_index_launcher_t launcher, legion_reduction_op_id_t redop,
2791 bool deterministic);
2799 legion_future_t legion_index_launcher_execute_reduction_and_outputs(
2800 legion_runtime_t runtime, legion_context_t ctx,
2801 legion_index_launcher_t launcher, legion_reduction_op_id_t redop,
2802 bool deterministic, legion_output_requirement_t* reqs,
size_t reqs_size);
2807 unsigned legion_index_launcher_add_region_requirement_logical_region(
2809 legion_projection_id_t proj , legion_privilege_mode_t priv,
2811 legion_mapping_tag_id_t tag ,
bool verified );
2816 unsigned legion_index_launcher_add_region_requirement_logical_partition(
2818 legion_projection_id_t proj , legion_privilege_mode_t priv,
2820 legion_mapping_tag_id_t tag ,
bool verified );
2826 legion_index_launcher_add_region_requirement_logical_region_reduction(
2828 legion_projection_id_t proj , legion_reduction_op_id_t redop,
2830 legion_mapping_tag_id_t tag ,
bool verified );
2836 legion_index_launcher_add_region_requirement_logical_partition_reduction(
2838 legion_projection_id_t proj , legion_reduction_op_id_t redop,
2840 legion_mapping_tag_id_t tag ,
bool verified );
2845 void legion_index_launcher_set_region_requirement_logical_region(
2846 legion_index_launcher_t launcher,
unsigned idx,
2848 legion_privilege_mode_t priv, legion_coherence_property_t prop,
2855 void legion_index_launcher_set_region_requirement_logical_partition(
2856 legion_index_launcher_t launcher,
unsigned idx,
2858 legion_privilege_mode_t priv, legion_coherence_property_t prop,
2865 void legion_index_launcher_set_region_requirement_logical_region_reduction(
2866 legion_index_launcher_t launcher,
unsigned idx,
2868 legion_reduction_op_id_t redop, legion_coherence_property_t prop,
2875 void legion_index_launcher_set_region_requirement_logical_partition_reduction(
2876 legion_index_launcher_t launcher,
unsigned idx,
2878 legion_reduction_op_id_t redop, legion_coherence_property_t prop,
2885 void legion_index_launcher_add_field(
2886 legion_index_launcher_t launcher,
unsigned idx, legion_field_id_t fid,
2892 void legion_index_launcher_add_flags(
2893 legion_index_launcher_t launcher,
unsigned idx,
2894 enum legion_region_flags_t flags);
2899 void legion_index_launcher_intersect_flags(
2900 legion_index_launcher_t launcher,
unsigned idx,
2901 enum legion_region_flags_t flags);
2906 unsigned legion_index_launcher_add_index_requirement(
2914 void legion_index_launcher_add_future(
2915 legion_index_launcher_t launcher, legion_future_t future);
2920 void legion_index_launcher_add_wait_barrier(
2926 void legion_index_launcher_add_arrival_barrier(
2932 void legion_index_launcher_add_point_future(
2933 legion_index_launcher_t launcher, legion_argument_map_t map);
2938 void legion_index_launcher_set_global_arg(
2944 void legion_index_launcher_set_sharding_space(
2950 void legion_index_launcher_set_mapper(
2951 legion_index_launcher_t launcher, legion_mapper_id_t mapper_id);
2956 void legion_index_launcher_set_mapping_tag(
2957 legion_index_launcher_t launcher, legion_mapping_tag_id_t tag);
2962 void legion_index_launcher_set_mapper_arg(
2968 void legion_index_launcher_set_elide_future_return(
2969 legion_index_launcher_t launcher,
bool elide_future_return);
2974 void legion_index_launcher_set_provenance(
2975 legion_index_launcher_t launcher,
const char* provenance);
2980 void legion_index_launcher_set_concurrent(
2981 legion_index_launcher_t launcher,
bool concurrent);
2986 void legion_index_launcher_set_initial_value(
2987 legion_index_launcher_t launcher, legion_future_t initial_value);
2998 legion_inline_launcher_t legion_inline_launcher_create_logical_region(
3001 legion_mapping_tag_id_t region_tag ,
bool verified ,
3002 legion_mapper_id_t
id ,
3003 legion_mapping_tag_id_t launcher_tag );
3010 void legion_inline_launcher_destroy(legion_inline_launcher_t handle);
3017 legion_physical_region_t legion_inline_launcher_execute(
3018 legion_runtime_t runtime, legion_context_t ctx,
3019 legion_inline_launcher_t launcher);
3024 void legion_inline_launcher_add_field(
3025 legion_inline_launcher_t launcher, legion_field_id_t fid,
3031 void legion_inline_launcher_set_mapper_arg(
3037 void legion_inline_launcher_set_provenance(
3038 legion_inline_launcher_t launcher,
const char* provenance);
3043 void legion_runtime_remap_region(
3044 legion_runtime_t runtime, legion_context_t ctx,
3045 legion_physical_region_t region);
3050 void legion_runtime_unmap_region(
3051 legion_runtime_t runtime, legion_context_t ctx,
3052 legion_physical_region_t region);
3057 void legion_runtime_unmap_all_regions(
3058 legion_runtime_t runtime, legion_context_t ctx);
3067 void legion_runtime_fill_field(
3068 legion_runtime_t runtime, legion_context_t ctx,
3070 legion_field_id_t fid,
const void* value,
size_t value_size,
3071 legion_predicate_t pred );
3076 void legion_runtime_fill_field_future(
3077 legion_runtime_t runtime, legion_context_t ctx,
3079 legion_field_id_t fid, legion_future_t f,
3080 legion_predicate_t pred );
3087 legion_fill_launcher_t legion_fill_launcher_create(
3089 legion_field_id_t fid,
const void* value,
size_t value_size,
3090 legion_predicate_t pred ,
3091 legion_mapper_id_t
id , legion_mapping_tag_id_t tag );
3098 legion_fill_launcher_t legion_fill_launcher_create_from_future(
3100 legion_field_id_t fid, legion_future_t f,
3101 legion_predicate_t pred ,
3102 legion_mapper_id_t
id , legion_mapping_tag_id_t tag );
3109 void legion_fill_launcher_destroy(legion_fill_launcher_t handle);
3114 void legion_fill_launcher_add_field(
3115 legion_fill_launcher_t handle, legion_field_id_t fid);
3120 void legion_fill_launcher_execute(
3121 legion_runtime_t runtime, legion_context_t ctx,
3122 legion_fill_launcher_t launcher);
3127 void legion_fill_launcher_set_point(
3133 void legion_fill_launcher_set_sharding_space(
3139 void legion_fill_launcher_set_mapper_arg(
3145 void legion_fill_launcher_set_provenance(
3146 legion_fill_launcher_t launcher,
const char* provenance);
3156 void legion_runtime_index_fill_field(
3157 legion_runtime_t runtime, legion_context_t ctx,
3159 legion_field_id_t fid,
const void* value,
size_t value_size,
3160 legion_projection_id_t proj ,
3161 legion_predicate_t pred ,
3162 legion_mapper_id_t
id ,
3163 legion_mapping_tag_id_t launcher_tag );
3169 void legion_runtime_index_fill_field_with_space(
3170 legion_runtime_t runtime, legion_context_t ctx,
3173 size_t value_size, legion_projection_id_t proj ,
3174 legion_predicate_t pred ,
3175 legion_mapper_id_t
id ,
3176 legion_mapping_tag_id_t launcher_tag );
3182 void legion_runtime_index_fill_field_with_domain(
3183 legion_runtime_t runtime, legion_context_t ctx,
legion_domain_t domain,
3185 legion_field_id_t fid,
const void* value,
size_t value_size,
3186 legion_projection_id_t proj ,
3187 legion_predicate_t pred ,
3188 legion_mapper_id_t
id ,
3189 legion_mapping_tag_id_t launcher_tag );
3195 void legion_runtime_index_fill_field_future(
3196 legion_runtime_t runtime, legion_context_t ctx,
3198 legion_field_id_t fid, legion_future_t f,
3199 legion_projection_id_t proj ,
3200 legion_predicate_t pred ,
3201 legion_mapper_id_t
id ,
3202 legion_mapping_tag_id_t launcher_tag );
3208 void legion_runtime_index_fill_field_future_with_space(
3209 legion_runtime_t runtime, legion_context_t ctx,
3212 legion_projection_id_t proj ,
3213 legion_predicate_t pred ,
3214 legion_mapper_id_t
id ,
3215 legion_mapping_tag_id_t launcher_tag );
3221 void legion_runtime_index_fill_field_future_with_domain(
3222 legion_runtime_t runtime, legion_context_t ctx,
legion_domain_t domain,
3224 legion_field_id_t fid, legion_future_t f,
3225 legion_projection_id_t proj ,
3226 legion_predicate_t pred ,
3227 legion_mapper_id_t
id ,
3228 legion_mapping_tag_id_t launcher_tag );
3235 legion_index_fill_launcher_t legion_index_fill_launcher_create_with_space(
3238 size_t value_size, legion_projection_id_t proj ,
3239 legion_predicate_t pred ,
3240 legion_mapper_id_t
id ,
3241 legion_mapping_tag_id_t launcher_tag );
3248 legion_index_fill_launcher_t legion_index_fill_launcher_create_with_domain(
3251 size_t value_size, legion_projection_id_t proj ,
3252 legion_predicate_t pred ,
3253 legion_mapper_id_t
id ,
3254 legion_mapping_tag_id_t launcher_tag );
3261 legion_index_fill_launcher_t
3262 legion_index_fill_launcher_create_from_future_with_space(
3265 legion_future_t future, legion_projection_id_t proj ,
3266 legion_predicate_t pred ,
3267 legion_mapper_id_t
id ,
3268 legion_mapping_tag_id_t launcher_tag );
3275 legion_index_fill_launcher_t
3276 legion_index_fill_launcher_create_from_future_with_domain(
3279 legion_future_t future, legion_projection_id_t proj ,
3280 legion_predicate_t pred ,
3281 legion_mapper_id_t
id ,
3282 legion_mapping_tag_id_t launcher_tag );
3289 void legion_index_fill_launcher_destroy(legion_index_fill_launcher_t handle);
3294 void legion_index_fill_launcher_add_field(
3295 legion_fill_launcher_t handle, legion_field_id_t fid);
3300 void legion_index_fill_launcher_execute(
3301 legion_runtime_t runtime, legion_context_t ctx,
3302 legion_index_fill_launcher_t launcher);
3307 void legion_index_fill_launcher_set_sharding_space(
3313 void legion_index_fill_launcher_set_mapper_arg(
3319 void legion_index_fill_launcher_set_provenance(
3320 legion_index_fill_launcher_t launcher,
const char* provenance);
3327 legion_region_requirement_t legion_fill_get_requirement(legion_fill_t fill);
3338 legion_discard_launcher_t legion_discard_launcher_create(
3346 void legion_discard_launcher_destroy(legion_discard_launcher_t handle);
3351 void legion_discard_launcher_add_field(
3352 legion_discard_launcher_t handle, legion_field_id_t fid);
3357 void legion_discard_launcher_execute(
3358 legion_runtime_t runtime, legion_context_t ctx,
3359 legion_discard_launcher_t launcher);
3364 void legion_discard_launcher_set_provenance(
3365 legion_discard_launcher_t launcher,
const char* provenance);
3374 legion_field_map_t legion_field_map_create(
void);
3379 void legion_field_map_destroy(legion_field_map_t handle);
3381 void legion_field_map_insert(
3382 legion_field_map_t handle, legion_field_id_t key,
const char* value);
3389 legion_physical_region_t legion_runtime_attach_hdf5(
3390 legion_runtime_t runtime, legion_context_t ctx,
const char* filename,
3392 legion_field_map_t field_map, legion_file_mode_t mode);
3397 void legion_runtime_detach_hdf5(
3398 legion_runtime_t runtime, legion_context_t ctx,
3399 legion_physical_region_t region);
3410 legion_copy_launcher_t legion_copy_launcher_create(
3411 legion_predicate_t pred ,
3412 legion_mapper_id_t
id ,
3413 legion_mapping_tag_id_t launcher_tag );
3420 void legion_copy_launcher_destroy(legion_copy_launcher_t handle);
3427 void legion_copy_launcher_execute(
3428 legion_runtime_t runtime, legion_context_t ctx,
3429 legion_copy_launcher_t launcher);
3434 unsigned legion_copy_launcher_add_src_region_requirement_logical_region(
3436 legion_privilege_mode_t priv, legion_coherence_property_t prop,
3443 unsigned legion_copy_launcher_add_dst_region_requirement_logical_region(
3445 legion_privilege_mode_t priv, legion_coherence_property_t prop,
3453 legion_copy_launcher_add_dst_region_requirement_logical_region_reduction(
3455 legion_reduction_op_id_t redop, legion_coherence_property_t prop,
3463 legion_copy_launcher_add_src_indirect_region_requirement_logical_region(
3465 legion_field_id_t fid, legion_coherence_property_t prop,
3467 bool is_range_indirection ,
bool verified );
3473 legion_copy_launcher_add_dst_indirect_region_requirement_logical_region(
3475 legion_field_id_t fid, legion_coherence_property_t prop,
3477 bool is_range_indirection ,
bool verified );
3482 void legion_copy_launcher_add_src_field(
3483 legion_copy_launcher_t launcher,
unsigned idx, legion_field_id_t fid,
3489 void legion_copy_launcher_add_dst_field(
3490 legion_copy_launcher_t launcher,
unsigned idx, legion_field_id_t fid,
3496 void legion_copy_launcher_add_wait_barrier(
3502 void legion_copy_launcher_add_arrival_barrier(
3508 void legion_copy_launcher_set_possible_src_indirect_out_of_range(
3509 legion_copy_launcher_t launcher,
bool flag);
3514 void legion_copy_launcher_set_possible_dst_indirect_out_of_range(
3515 legion_copy_launcher_t launcher,
bool flag);
3520 void legion_copy_launcher_set_point(
3526 void legion_copy_launcher_set_sharding_space(
3532 void legion_copy_launcher_set_mapper_arg(
3538 void legion_copy_launcher_set_provenance(
3539 legion_copy_launcher_t launcher,
const char* provenance);
3549 legion_region_requirement_t legion_copy_get_requirement(
3550 legion_copy_t copy,
unsigned idx);
3561 legion_index_copy_launcher_t legion_index_copy_launcher_create(
3563 legion_predicate_t pred ,
3564 legion_mapper_id_t
id ,
3565 legion_mapping_tag_id_t launcher_tag );
3572 void legion_index_copy_launcher_destroy(legion_index_copy_launcher_t handle);
3579 void legion_index_copy_launcher_execute(
3580 legion_runtime_t runtime, legion_context_t ctx,
3581 legion_index_copy_launcher_t launcher);
3586 unsigned legion_index_copy_launcher_add_src_region_requirement_logical_region(
3588 legion_projection_id_t proj , legion_privilege_mode_t priv,
3590 legion_mapping_tag_id_t tag ,
bool verified );
3595 unsigned legion_index_copy_launcher_add_dst_region_requirement_logical_region(
3597 legion_projection_id_t proj , legion_privilege_mode_t priv,
3599 legion_mapping_tag_id_t tag ,
bool verified );
3605 legion_index_copy_launcher_add_src_region_requirement_logical_partition(
3606 legion_index_copy_launcher_t launcher,
3608 legion_projection_id_t proj , legion_privilege_mode_t priv,
3610 legion_mapping_tag_id_t tag ,
bool verified );
3616 legion_index_copy_launcher_add_dst_region_requirement_logical_partition(
3617 legion_index_copy_launcher_t launcher,
3619 legion_projection_id_t proj , legion_privilege_mode_t priv,
3621 legion_mapping_tag_id_t tag ,
bool verified );
3627 legion_index_copy_launcher_add_dst_region_requirement_logical_region_reduction(
3629 legion_projection_id_t proj , legion_reduction_op_id_t redop,
3631 legion_mapping_tag_id_t tag ,
bool verified );
3637 legion_index_copy_launcher_add_dst_region_requirement_logical_partition_reduction(
3638 legion_index_copy_launcher_t launcher,
3640 legion_projection_id_t proj , legion_reduction_op_id_t redop,
3642 legion_mapping_tag_id_t tag ,
bool verified );
3648 legion_index_copy_launcher_add_src_indirect_region_requirement_logical_region(
3650 legion_projection_id_t proj , legion_field_id_t fid,
3652 legion_mapping_tag_id_t tag ,
3653 bool is_range_indirection ,
bool verified );
3659 legion_index_copy_launcher_add_dst_indirect_region_requirement_logical_region(
3661 legion_projection_id_t proj , legion_field_id_t fid,
3663 legion_mapping_tag_id_t tag ,
3664 bool is_range_indirection ,
bool verified );
3670 legion_index_copy_launcher_add_src_indirect_region_requirement_logical_partition(
3671 legion_index_copy_launcher_t launcher,
3673 legion_projection_id_t proj , legion_field_id_t fid,
3675 legion_mapping_tag_id_t tag ,
3676 bool is_range_indirection ,
bool verified );
3682 legion_index_copy_launcher_add_dst_indirect_region_requirement_logical_partition(
3683 legion_index_copy_launcher_t launcher,
3685 legion_projection_id_t proj , legion_field_id_t fid,
3687 legion_mapping_tag_id_t tag ,
3688 bool is_range_indirection ,
bool verified );
3693 void legion_index_copy_launcher_add_src_field(
3694 legion_index_copy_launcher_t launcher,
unsigned idx,
3695 legion_field_id_t fid,
bool inst );
3700 void legion_index_copy_launcher_add_dst_field(
3701 legion_index_copy_launcher_t launcher,
unsigned idx,
3702 legion_field_id_t fid,
bool inst );
3707 void legion_index_copy_launcher_add_wait_barrier(
3713 void legion_index_copy_launcher_add_arrival_barrier(
3719 void legion_index_copy_launcher_set_possible_src_indirect_out_of_range(
3720 legion_index_copy_launcher_t launcher,
bool flag);
3725 void legion_index_copy_launcher_set_possible_dst_indirect_out_of_range(
3726 legion_index_copy_launcher_t launcher,
bool flag);
3731 void legion_index_copy_launcher_set_sharding_space(
3737 void legion_index_copy_launcher_set_mapper_arg(
3743 void legion_index_copy_launcher_set_provenance(
3744 legion_index_copy_launcher_t launcher,
const char* provenance);
3755 legion_acquire_launcher_t legion_acquire_launcher_create(
3758 legion_predicate_t pred ,
3759 legion_mapper_id_t
id , legion_mapping_tag_id_t tag );
3766 void legion_acquire_launcher_destroy(legion_acquire_launcher_t handle);
3773 void legion_acquire_launcher_execute(
3774 legion_runtime_t runtime, legion_context_t ctx,
3775 legion_acquire_launcher_t launcher);
3780 void legion_acquire_launcher_add_field(
3781 legion_acquire_launcher_t launcher, legion_field_id_t fid);
3786 void legion_acquire_launcher_add_wait_barrier(
3792 void legion_acquire_launcher_add_arrival_barrier(
3798 void legion_acquire_launcher_set_sharding_space(
3804 void legion_acquire_launcher_set_mapper_arg(
3810 void legion_acquire_launcher_set_provenance(
3811 legion_acquire_launcher_t launcher,
const char* provenance);
3822 legion_release_launcher_t legion_release_launcher_create(
3825 legion_predicate_t pred ,
3826 legion_mapper_id_t
id , legion_mapping_tag_id_t tag );
3833 void legion_release_launcher_destroy(legion_release_launcher_t handle);
3840 void legion_release_launcher_execute(
3841 legion_runtime_t runtime, legion_context_t ctx,
3842 legion_release_launcher_t launcher);
3847 void legion_release_launcher_add_field(
3848 legion_release_launcher_t launcher, legion_field_id_t fid);
3853 void legion_release_launcher_add_wait_barrier(
3859 void legion_release_launcher_add_arrival_barrier(
3865 void legion_release_launcher_set_sharding_space(
3871 void legion_release_launcher_set_mapper_arg(
3877 void legion_release_launcher_set_provenance(
3878 legion_release_launcher_t launcher,
const char* provenance);
3889 legion_attach_launcher_t legion_attach_launcher_create(
3892 legion_external_resource_t resource);
3897 void legion_attach_launcher_attach_hdf5(
3898 legion_attach_launcher_t handle,
const char* filename,
3899 legion_field_map_t field_map, legion_file_mode_t mode);
3904 void legion_attach_launcher_set_restricted(
3905 legion_attach_launcher_t handle,
bool restricted);
3910 void legion_attach_launcher_set_mapped(
3911 legion_attach_launcher_t handle,
bool mapped);
3916 void legion_attach_launcher_set_provenance(
3917 legion_attach_launcher_t handle,
const char* provenance);
3924 void legion_attach_launcher_destroy(legion_attach_launcher_t handle);
3931 legion_physical_region_t legion_attach_launcher_execute(
3932 legion_runtime_t runtime, legion_context_t ctx,
3933 legion_attach_launcher_t launcher);
3938 void legion_attach_launcher_add_cpu_soa_field(
3939 legion_attach_launcher_t launcher, legion_field_id_t fid,
void* base_ptr,
3945 void legion_attach_launcher_set_footprint(
3946 legion_attach_launcher_t launcher,
size_t footprint);
3953 legion_future_t legion_detach_external_resource(
3954 legion_runtime_t runtime, legion_context_t ctx,
3955 legion_physical_region_t handle);
3962 legion_future_t legion_flush_detach_external_resource(
3963 legion_runtime_t runtime, legion_context_t ctx,
3964 legion_physical_region_t handle,
bool flush);
3971 legion_future_t legion_unordered_detach_external_resource(
3972 legion_runtime_t runtime, legion_context_t ctx,
3973 legion_physical_region_t handle,
bool flush,
bool unordered);
3978 void legion_context_progress_unordered_operations(
3979 legion_runtime_t runtime, legion_context_t ctx);
3990 legion_index_attach_launcher_t legion_index_attach_launcher_create(
3992 legion_external_resource_t resource,
bool restricted );
3997 void legion_index_attach_launcher_set_restricted(
3998 legion_index_attach_launcher_t handle,
bool restricted);
4003 void legion_index_attach_launcher_set_provenance(
4004 legion_index_attach_launcher_t handle,
const char* provenance);
4009 void legion_index_attach_launcher_set_deduplicate_across_shards(
4010 legion_index_attach_launcher_t handle,
bool deduplicate);
4015 void legion_index_attach_launcher_attach_file(
4017 const char* filename,
const legion_field_id_t* fields,
size_t num_fields,
4018 legion_file_mode_t mode);
4023 void legion_index_attach_launcher_attach_hdf5(
4025 const char* filename, legion_field_map_t field_map,
4026 legion_file_mode_t mode);
4031 void legion_index_attach_launcher_attach_array_soa(
4033 void* base_ptr,
bool column_major,
const legion_field_id_t* fields,
4039 void legion_index_attach_launcher_attach_array_aos(
4041 void* base_ptr,
bool column_major,
const legion_field_id_t* fields,
4049 void legion_index_attach_launcher_destroy(
4050 legion_index_attach_launcher_t handle);
4057 legion_external_resources_t legion_attach_external_resources(
4058 legion_runtime_t runtime, legion_context_t ctx,
4059 legion_index_attach_launcher_t launcher);
4066 legion_future_t legion_detach_external_resources(
4067 legion_runtime_t runtime, legion_context_t ctx,
4068 legion_external_resources_t,
bool flush,
bool unordered);
4079 legion_must_epoch_launcher_t legion_must_epoch_launcher_create(
4080 legion_mapper_id_t
id ,
4081 legion_mapping_tag_id_t launcher_tag );
4088 void legion_must_epoch_launcher_destroy(legion_must_epoch_launcher_t handle);
4095 legion_future_map_t legion_must_epoch_launcher_execute(
4096 legion_runtime_t runtime, legion_context_t ctx,
4097 legion_must_epoch_launcher_t launcher);
4104 void legion_must_epoch_launcher_add_single_task(
4106 legion_task_launcher_t handle);
4113 void legion_must_epoch_launcher_add_index_task(
4114 legion_must_epoch_launcher_t launcher, legion_index_launcher_t handle);
4119 void legion_must_epoch_launcher_set_launch_domain(
4125 void legion_must_epoch_launcher_set_launch_space(
4131 void legion_must_epoch_launcher_set_provenance(
4132 legion_must_epoch_launcher_t launcher,
const char* provenance);
4141 legion_future_t legion_runtime_issue_mapping_fence(
4142 legion_runtime_t runtime, legion_context_t ctx);
4147 legion_future_t legion_runtime_issue_execution_fence(
4148 legion_runtime_t runtime, legion_context_t ctx);
4157 void legion_runtime_begin_trace(
4158 legion_runtime_t runtime, legion_context_t ctx, legion_trace_id_t tid,
4164 void legion_runtime_end_trace(
4165 legion_runtime_t runtime, legion_context_t ctx, legion_trace_id_t tid);
4171 void legion_runtime_complete_frame(
4172 legion_runtime_t runtime, legion_context_t ctx);
4183 legion_future_t legion_runtime_select_tunable_value(
4184 legion_runtime_t runtime, legion_context_t ctx, legion_tunable_id_t tid,
4185 legion_mapper_id_t mapper ,
4186 legion_mapping_tag_id_t tag );
4195 bool legion_runtime_has_runtime(
void);
4200 legion_runtime_t legion_runtime_get_runtime(
void);
4205 bool legion_runtime_has_context(
void);
4212 legion_context_t legion_runtime_get_context(
void);
4220 void legion_context_destroy(legion_context_t);
4226 legion_runtime_t runtime, legion_context_t ctx);
4231 void legion_runtime_yield(legion_runtime_t runtime, legion_context_t ctx);
4236 legion_shard_id_t legion_runtime_local_shard(
4237 legion_runtime_t runtime, legion_context_t ctx);
4239 legion_shard_id_t legion_runtime_local_shard_without_context(
void);
4244 size_t legion_runtime_total_shards(
4245 legion_runtime_t runtime, legion_context_t ctx);
4252 legion_shard_id_t legion_sharding_functor_shard(
4270 void legion_sharding_functor_invert(
4271 legion_sharding_id_t sid, legion_shard_id_t shard,
4275 void legion_runtime_enable_scheduler_lock(
void);
4277 void legion_runtime_disable_scheduler_lock(
void);
4282 void legion_runtime_print_once(
4283 legion_runtime_t runtime, legion_context_t ctx, FILE* f,
4284 const char* message);
4288 void legion_runtime_print_once_fd(
4289 legion_runtime_t runtime, legion_context_t ctx,
int fd,
const char* mode,
4290 const char* message);
4301 void legion_physical_region_destroy(legion_physical_region_t handle);
4308 legion_physical_region_t legion_physical_region_copy(
4309 legion_physical_region_t handle);
4314 bool legion_physical_region_is_mapped(legion_physical_region_t handle);
4319 void legion_physical_region_wait_until_valid(legion_physical_region_t handle);
4324 bool legion_physical_region_is_valid(legion_physical_region_t handle);
4330 legion_physical_region_t handle);
4335 size_t legion_physical_region_get_field_count(
4336 legion_physical_region_t handle);
4337 legion_field_id_t legion_physical_region_get_field_id(
4338 legion_physical_region_t handle,
size_t index);
4343 size_t legion_physical_region_get_memory_count(
4344 legion_physical_region_t handle);
4346 legion_physical_region_t handle,
size_t index);
4353#define ACCESSOR_ARRAY(DIM) \
4354 legion_accessor_array_##DIM##d_t \
4355 legion_physical_region_get_field_accessor_array_##DIM##d( \
4356 legion_physical_region_t handle, legion_field_id_t fid);
4357 LEGION_FOREACH_N(ACCESSOR_ARRAY)
4358#undef ACCESSOR_ARRAY
4360#define ACCESSOR_ARRAY(DIM) \
4361 legion_accessor_array_##DIM##d_t \
4362 legion_physical_region_get_field_accessor_array_##DIM##d_with_transform( \
4363 legion_physical_region_t handle, legion_field_id_t fid, \
4364 legion_domain_affine_transform_t transform);
4365 LEGION_FOREACH_N(ACCESSOR_ARRAY)
4366#undef ACCESSOR_ARRAY
4368#define RAW_PTR(DIM) \
4369 void* legion_accessor_array_##DIM##d_raw_rect_ptr( \
4370 legion_accessor_array_##DIM##d_t handle, legion_rect_##DIM##d_t rect, \
4371 legion_rect_##DIM##d_t* subrect, legion_byte_offset_t* offsets);
4372 LEGION_FOREACH_N(RAW_PTR)
4376 void legion_accessor_array_1d_read(
4377 legion_accessor_array_1d_t handle,
legion_ptr_t ptr,
void* dst,
4380#define READ_ARRAY(DIM) \
4381 void legion_accessor_array_##DIM##d_read_point( \
4382 legion_accessor_array_##DIM##d_t handle, legion_point_##DIM##d_t point, \
4383 void* dst, size_t bytes);
4384 LEGION_FOREACH_N(READ_ARRAY)
4388 void legion_accessor_array_1d_write(
4389 legion_accessor_array_1d_t handle,
legion_ptr_t ptr,
const void* src,
4392#define WRITE_ARRAY(DIM) \
4393 void legion_accessor_array_##DIM##d_write_point( \
4394 legion_accessor_array_##DIM##d_t handle, legion_point_##DIM##d_t point, \
4395 const void* src, size_t bytes);
4396 LEGION_FOREACH_N(WRITE_ARRAY)
4400 void* legion_accessor_array_1d_ref(
4403#define REF_ARRAY(DIM) \
4404 void* legion_accessor_array_##DIM##d_ref_point( \
4405 legion_accessor_array_##DIM##d_t handle, legion_point_##DIM##d_t point);
4406 LEGION_FOREACH_N(REF_ARRAY)
4412#define DESTROY_ARRAY(DIM) \
4413 void legion_accessor_array_##DIM##d_destroy( \
4414 legion_accessor_array_##DIM##d_t handle);
4415 LEGION_FOREACH_N(DESTROY_ARRAY)
4425 void legion_external_resources_destroy(legion_external_resources_t handle);
4430 size_t legion_external_resources_size(legion_external_resources_t handle);
4437 legion_physical_region_t legion_external_resources_get_region(
4438 legion_external_resources_t handle,
unsigned index);
4447 enum legion_mappable_type_id_t legion_mappable_get_type(
4448 legion_mappable_t mappable);
4453 legion_task_t legion_mappable_as_task(legion_mappable_t mappable);
4458 legion_copy_t legion_mappable_as_copy(legion_mappable_t mappable);
4463 legion_fill_t legion_mappable_as_fill(legion_mappable_t mappable);
4468 legion_inline_t legion_mappable_as_inline_mapping(legion_mappable_t mappable);
4477 legion_unique_id_t legion_context_get_unique_id(legion_context_t ctx);
4489 legion_task_mut_t legion_task_create_empty();
4496 void legion_task_destroy(legion_task_mut_t handle);
4503 legion_task_t legion_task_mut_as_task(legion_task_mut_t task);
4508 legion_unique_id_t legion_task_get_unique_id(legion_task_t task);
4513 int legion_task_get_depth(legion_task_t task);
4518 legion_mapper_id_t legion_task_get_mapper(legion_task_t task);
4523 legion_mapping_tag_id_t legion_task_get_tag(legion_task_t task);
4528 void legion_task_id_attach_semantic_information(
4529 legion_runtime_t runtime, legion_task_id_t task_id,
4530 legion_semantic_tag_t tag,
const void* buffer,
size_t size,
4536 bool legion_task_id_retrieve_semantic_information(
4537 legion_runtime_t runtime, legion_task_id_t task_id,
4538 legion_semantic_tag_t tag,
const void** result,
size_t* size,
4539 bool can_fail ,
bool wait_until_ready );
4544 void legion_task_id_attach_name(
4545 legion_runtime_t runtime, legion_task_id_t task_id,
const char* name,
4551 void legion_task_id_retrieve_name(
4552 legion_runtime_t runtime, legion_task_id_t task_id,
const char** result);
4557 const void* legion_task_get_args(legion_task_t task);
4562 void legion_task_set_args(legion_task_mut_t task,
void* args);
4567 size_t legion_task_get_arglen(legion_task_t task);
4572 void legion_task_set_arglen(legion_task_mut_t task,
size_t arglen);
4587 bool legion_task_get_is_index_space(legion_task_t task);
4592 const void* legion_task_get_local_args(legion_task_t task);
4597 size_t legion_task_get_local_arglen(legion_task_t task);
4602 unsigned legion_task_get_regions_size(legion_task_t task);
4609 legion_region_requirement_t legion_task_get_requirement(
4610 legion_task_t task,
unsigned idx);
4615 unsigned legion_task_get_futures_size(legion_task_t task);
4620 legion_future_t legion_task_get_future(legion_task_t task,
unsigned idx);
4625 void legion_task_add_future(legion_task_mut_t task, legion_future_t future);
4630 legion_task_id_t legion_task_get_task_id(legion_task_t task);
4640 const char* legion_task_get_name(legion_task_t task);
4651 legion_region_requirement_t legion_inline_get_requirement(
4652 legion_inline_t inline_operation);
4663 legion_execution_constraint_set_t legion_execution_constraint_set_create(
4671 void legion_execution_constraint_set_destroy(
4672 legion_execution_constraint_set_t handle);
4677 void legion_execution_constraint_set_add_isa_constraint(
4678 legion_execution_constraint_set_t handle, uint64_t prop);
4684 void legion_execution_constraint_set_add_processor_constraint(
4685 legion_execution_constraint_set_t handle,
4686 legion_processor_kind_t proc_kind);
4692 void legion_execution_constraint_set_add_resource_constraint(
4693 legion_execution_constraint_set_t handle,
4694 legion_resource_constraint_t resource, legion_equality_kind_t eq,
4701 void legion_execution_constraint_set_add_launch_constraint(
4702 legion_execution_constraint_set_t handle, legion_launch_constraint_t kind,
4709 void legion_execution_constraint_set_add_launch_constraint_multi_dim(
4710 legion_execution_constraint_set_t handle, legion_launch_constraint_t kind,
4711 const size_t* values,
int dims);
4717 void legion_execution_constraint_set_add_colocation_constraint(
4718 legion_execution_constraint_set_t handle,
const unsigned* indexes,
4719 size_t num_indexes,
const legion_field_id_t* fields,
size_t num_fields);
4730 legion_layout_constraint_set_t legion_layout_constraint_set_create(
void);
4737 void legion_layout_constraint_set_destroy(
4738 legion_layout_constraint_set_t handle);
4745 legion_layout_constraint_id_t legion_layout_constraint_set_register(
4747 legion_layout_constraint_set_t handle,
4748 const char* layout_name );
4755 legion_layout_constraint_id_t legion_layout_constraint_set_preregister(
4756 legion_layout_constraint_set_t handle,
4757 const char* layout_name );
4764 void legion_layout_constraint_set_release(
4765 legion_runtime_t runtime, legion_layout_constraint_id_t handle);
4771 void legion_layout_constraint_set_add_specialized_constraint(
4772 legion_layout_constraint_set_t handle,
4773 legion_specialized_constraint_t specialized,
4774 legion_reduction_op_id_t redop);
4780 void legion_layout_constraint_set_add_memory_constraint(
4781 legion_layout_constraint_set_t handle, legion_memory_kind_t kind);
4787 void legion_layout_constraint_set_add_field_constraint(
4788 legion_layout_constraint_set_t handle,
const legion_field_id_t* fields,
4789 size_t num_fields,
bool contiguous,
bool inorder);
4795 void legion_layout_constraint_set_add_ordering_constraint(
4796 legion_layout_constraint_set_t handle,
4797 const legion_dimension_kind_t* dims,
size_t num_dims,
bool contiguous);
4803 void legion_layout_constraint_set_add_tiling_constraint(
4804 legion_layout_constraint_set_t handle, legion_dimension_kind_t dim,
4805 size_t value,
bool tiles);
4811 void legion_layout_constraint_set_add_dimension_constraint(
4812 legion_layout_constraint_set_t handle, legion_dimension_kind_t dim,
4813 legion_equality_kind_t eq,
size_t value);
4819 void legion_layout_constraint_set_add_alignment_constraint(
4820 legion_layout_constraint_set_t handle, legion_field_id_t field,
4821 legion_equality_kind_t eq,
size_t byte_boundary);
4827 void legion_layout_constraint_set_add_offset_constraint(
4828 legion_layout_constraint_set_t handle, legion_field_id_t field,
4835 void legion_layout_constraint_set_add_pointer_constraint(
4848 legion_task_layout_constraint_set_t legion_task_layout_constraint_set_create(
4856 void legion_task_layout_constraint_set_destroy(
4857 legion_task_layout_constraint_set_t handle);
4862 void legion_task_layout_constraint_set_add_layout_constraint(
4863 legion_task_layout_constraint_set_t handle,
unsigned idx,
4864 legion_layout_constraint_id_t layout);
4873 void legion_runtime_initialize(
4874 int* argc,
char*** argv,
bool filter );
4879 int legion_runtime_start(
4880 int argc,
char** argv,
bool background );
4885 int legion_runtime_wait_for_shutdown(
void);
4890 void legion_runtime_set_return_code(
int return_code);
4895 void legion_runtime_set_top_level_task_id(legion_task_id_t top_id);
4900 size_t legion_runtime_get_maximum_dimension(
void);
4910 void legion_runtime_add_registration_callback(
4911 legion_registration_callback_pointer_t callback);
4916 legion_mapper_id_t legion_runtime_generate_library_mapper_ids(
4917 legion_runtime_t runtime,
const char* library_name,
size_t count);
4922 void legion_runtime_replace_default_mapper(
4923 legion_runtime_t runtime, legion_mapper_t mapper,
4929 legion_projection_id_t legion_runtime_generate_static_projection_id();
4934 legion_projection_id_t legion_runtime_generate_library_projection_ids(
4935 legion_runtime_t runtime,
const char* library_name,
size_t count);
4940 legion_sharding_id_t legion_runtime_generate_library_sharding_ids(
4941 legion_runtime_t runtime,
const char* library_name,
size_t count);
4946 legion_reduction_op_id_t legion_runtime_generate_library_reduction_ids(
4947 legion_runtime_t runtime,
const char* library_name,
size_t count);
4952 void legion_runtime_preregister_projection_functor(
4953 legion_projection_id_t
id,
bool exclusive,
unsigned depth,
4954 legion_projection_functor_logical_region_t region_functor,
4955 legion_projection_functor_logical_partition_t partition_functor);
4960 void legion_runtime_register_projection_functor(
4961 legion_runtime_t runtime, legion_projection_id_t
id,
bool exclusive,
4963 legion_projection_functor_logical_region_args_t region_functor,
4964 legion_projection_functor_logical_partition_args_t partition_functor);
4969 void legion_runtime_preregister_projection_functor_args(
4970 legion_projection_id_t
id,
bool exclusive,
unsigned depth,
4971 legion_projection_functor_logical_region_args_t region_functor,
4972 legion_projection_functor_logical_partition_args_t partition_functor);
4977 void legion_runtime_register_projection_functor_args(
4978 legion_runtime_t runtime, legion_projection_id_t
id,
bool exclusive,
4979 unsigned depth, legion_projection_functor_logical_region_t region_functor,
4980 legion_projection_functor_logical_partition_t partition_functor);
4985 void legion_runtime_preregister_projection_functor_mappable(
4986 legion_projection_id_t
id,
bool exclusive,
unsigned depth,
4987 legion_projection_functor_logical_region_mappable_t region_functor,
4988 legion_projection_functor_logical_partition_mappable_t partition_functor);
4993 void legion_runtime_register_projection_functor_mappable(
4994 legion_runtime_t runtime, legion_projection_id_t
id,
bool exclusive,
4996 legion_projection_functor_logical_region_mappable_t region_functor,
4997 legion_projection_functor_logical_partition_mappable_t partition_functor);
5002 legion_task_id_t legion_runtime_generate_library_task_ids(
5003 legion_runtime_t runtime,
const char* library_name,
size_t count);
5010 legion_task_variant_registrar_t legion_task_variant_registrar_create(
5011 legion_task_id_t tid,
bool global,
const char* variant_name);
5018 void legion_task_variant_registrar_destroy(
5019 legion_task_variant_registrar_t registrar);
5024 void legion_task_variant_registrar_set_execution_constraints(
5025 legion_task_variant_registrar_t registrar,
5026 legion_execution_constraint_set_t constraints);
5031 void legion_task_variant_registrar_set_layout_constraints(
5032 legion_task_variant_registrar_t registrar,
5033 legion_task_layout_constraint_set_t constraints);
5041 void legion_task_variant_registrar_set_options(
5042 legion_task_variant_registrar_t registrar,
5048 void legion_task_variant_registrar_set_leaf_memory_pool_bounds(
5049 legion_task_variant_registrar_t registrar, legion_memory_kind_t kind,
5050 size_t size,
unsigned alignment);
5055 legion_variant_id_t legion_runtime_register_task_variant_fnptr_with_registrar(
5056 legion_runtime_t runtime, legion_task_variant_registrar_t registrar,
5057 legion_task_pointer_wrapped_t wrapped_task_pointer,
5058 legion_variant_id_t variant_id,
const void* userdata,
size_t userlen,
5059 size_t return_type_size,
bool has_return_type_size);
5065 legion_runtime_preregister_task_variant_fnptr_with_registrar(
5066 legion_task_variant_registrar_t registrar,
5067 legion_task_pointer_wrapped_t wrapped_task_pointer,
5068 legion_variant_id_t variant_id,
const char* task_name,
5069 const void* userdata,
size_t userlen,
size_t return_type_size,
5070 bool has_return_type_size);
5075 legion_task_id_t legion_runtime_register_task_variant_fnptr(
5076 legion_runtime_t runtime, legion_task_id_t
id ,
5077 const char* task_name ,
5078 const char* variant_name ,
bool global,
5079 legion_execution_constraint_set_t execution_constraints,
5080 legion_task_layout_constraint_set_t layout_constraints,
5082 legion_task_pointer_wrapped_t wrapped_task_pointer,
const void* userdata,
5088 legion_task_id_t legion_runtime_preregister_task_variant_fnptr(
5089 legion_task_id_t
id ,
5090 legion_variant_id_t variant_id ,
5091 const char* task_name ,
5092 const char* variant_name ,
5093 legion_execution_constraint_set_t execution_constraints,
5094 legion_task_layout_constraint_set_t layout_constraints,
5096 legion_task_pointer_wrapped_t wrapped_task_pointer,
const void* userdata,
5099#ifdef REALM_USE_LLVM
5103 legion_task_id_t legion_runtime_register_task_variant_llvmir(
5104 legion_runtime_t runtime, legion_task_id_t
id ,
5105 const char* task_name ,
bool global,
5106 legion_execution_constraint_set_t execution_constraints,
5107 legion_task_layout_constraint_set_t layout_constraints,
5109 const char* entry_symbol,
const void* userdata,
size_t userlen);
5114 legion_task_id_t legion_runtime_preregister_task_variant_llvmir(
5115 legion_task_id_t
id ,
5116 legion_variant_id_t variant_id ,
5117 const char* task_name ,
5118 legion_execution_constraint_set_t execution_constraints,
5119 legion_task_layout_constraint_set_t layout_constraints,
5121 const char* entry_symbol,
const void* userdata,
size_t userlen);
5124#ifdef REALM_USE_PYTHON
5128 legion_task_id_t legion_runtime_register_task_variant_python_source(
5129 legion_runtime_t runtime, legion_task_id_t
id ,
5130 const char* task_name ,
bool global,
5131 legion_execution_constraint_set_t execution_constraints,
5132 legion_task_layout_constraint_set_t layout_constraints,
5134 const char* function_name,
const void* userdata,
size_t userlen);
5139 legion_task_id_t legion_runtime_register_task_variant_python_source_qualname(
5140 legion_runtime_t runtime, legion_task_id_t
id ,
5141 const char* task_name ,
bool global,
5142 legion_execution_constraint_set_t execution_constraints,
5143 legion_task_layout_constraint_set_t layout_constraints,
5145 const char** function_qualname,
size_t function_qualname_len,
5146 const void* userdata,
size_t userlen);
5152 void legion_task_preamble(
5153 const void* data,
size_t datalen, realm_id_t proc_id,
5154 legion_task_t* taskptr,
const legion_physical_region_t** regionptr,
5155 unsigned* num_regions_ptr, legion_context_t* ctxptr,
5156 legion_runtime_t* runtimeptr);
5161 void legion_task_postamble(
5162 legion_runtime_t runtime, legion_context_t ctx,
const void* retval,
5172 unsigned long long legion_get_current_time_in_micros(
void);
5177 unsigned long long legion_get_current_time_in_nanos(
void);
5182 legion_future_t legion_issue_timing_op_seconds(
5183 legion_runtime_t runtime, legion_context_t ctx);
5188 legion_future_t legion_issue_timing_op_microseconds(
5189 legion_runtime_t runtime, legion_context_t ctx);
5194 legion_future_t legion_issue_timing_op_nanoseconds(
5195 legion_runtime_t runtime, legion_context_t ctx);
5206 legion_logger_t legion_logger_create(
const char* name);
5213 void legion_logger_destroy(legion_logger_t handle);
5218 void legion_logger_spew(legion_logger_t handle,
const char* msg);
5223 void legion_logger_debug(legion_logger_t handle,
const char* msg);
5228 void legion_logger_info(legion_logger_t handle,
const char* msg);
5233 void legion_logger_print(legion_logger_t handle,
const char* msg);
5238 void legion_logger_warning(legion_logger_t handle,
const char* msg);
5243 void legion_logger_error(legion_logger_t handle,
const char* msg);
5248 void legion_logger_fatal(legion_logger_t handle,
const char* msg);
5253 bool legion_logger_want_spew(legion_logger_t handle);
5258 bool legion_logger_want_debug(legion_logger_t handle);
5263 bool legion_logger_want_info(legion_logger_t handle);
5268 bool legion_logger_want_print(legion_logger_t handle);
5273 bool legion_logger_want_warning(legion_logger_t handle);
5278 bool legion_logger_want_error(legion_logger_t handle);
5283 bool legion_logger_want_fatal(legion_logger_t handle);
5294 legion_machine_t legion_machine_create(
void);
5301 void legion_machine_destroy(legion_machine_t handle);
5306 void legion_machine_get_all_processors(
5308 size_t processors_size);
5313 size_t legion_machine_get_all_processors_size(legion_machine_t machine);
5318 void legion_machine_get_all_memories(
5320 size_t memories_size);
5325 size_t legion_machine_get_all_memories_size(legion_machine_t machine);
5339 legion_address_space_t legion_processor_address_space(
5354 legion_address_space_t legion_memory_address_space(
legion_memory_t mem);
5365 legion_processor_query_t legion_processor_query_create(
5366 legion_machine_t machine);
5373 legion_processor_query_t legion_processor_query_create_copy(
5374 legion_processor_query_t query);
5381 void legion_processor_query_destroy(legion_processor_query_t handle);
5388 void legion_processor_query_only_kind(
5389 legion_processor_query_t query, legion_processor_kind_t kind);
5396 void legion_processor_query_local_address_space(
5397 legion_processor_query_t query);
5404 void legion_processor_query_same_address_space_as_processor(
5412 void legion_processor_query_same_address_space_as_memory(
5420 void legion_processor_query_has_affinity_to_memory(
5422 unsigned min_bandwidth ,
unsigned max_latency );
5429 void legion_processor_query_best_affinity_to_memory(
5431 int bandwidth_weight ,
int latency_weight );
5436 size_t legion_processor_query_count(legion_processor_query_t query);
5442 legion_processor_query_t query);
5454 legion_processor_query_t query);
5465 legion_memory_query_t legion_memory_query_create(legion_machine_t machine);
5472 legion_memory_query_t legion_memory_query_create_copy(
5473 legion_memory_query_t query);
5480 void legion_memory_query_destroy(legion_memory_query_t handle);
5487 void legion_memory_query_only_kind(
5488 legion_memory_query_t query, legion_memory_kind_t kind);
5495 void legion_memory_query_local_address_space(legion_memory_query_t query);
5502 void legion_memory_query_same_address_space_as_processor(
5510 void legion_memory_query_same_address_space_as_memory(
5518 void legion_memory_query_has_affinity_to_processor(
5520 unsigned min_bandwidth ,
unsigned max_latency );
5527 void legion_memory_query_has_affinity_to_memory(
5529 unsigned min_bandwidth ,
unsigned max_latency );
5536 void legion_memory_query_best_affinity_to_processor(
5538 int bandwidth_weight ,
int latency_weight );
5545 void legion_memory_query_best_affinity_to_memory(
5547 int bandwidth_weight ,
int latency_weight );
5552 size_t legion_memory_query_count(legion_memory_query_t query);
5557 legion_memory_t legion_memory_query_first(legion_memory_query_t query);
5568 legion_memory_t legion_memory_query_random(legion_memory_query_t query);
5579 void legion_physical_instance_destroy(legion_physical_instance_t instance);
5588 void legion_slice_task_output_slices_add(
5594 void legion_slice_task_output_verify_correctness_set(
5595 legion_slice_task_output_t output,
bool verify_correctness);
5604 void legion_map_task_output_chosen_instances_clear_all(
5605 legion_map_task_output_t output);
5610 void legion_map_task_output_chosen_instances_clear_each(
5611 legion_map_task_output_t output,
size_t idx);
5616 void legion_map_task_output_chosen_instances_add(
5617 legion_map_task_output_t output, legion_physical_instance_t* instances,
5618 size_t instances_size);
5623 void legion_map_task_output_chosen_instances_set(
5624 legion_map_task_output_t output,
size_t idx,
5625 legion_physical_instance_t* instances,
size_t instances_size);
5630 void legion_map_task_output_target_procs_clear(
5631 legion_map_task_output_t output);
5636 void legion_map_task_output_target_procs_add(
5643 legion_map_task_output_t output,
size_t idx);
5648 void legion_map_task_output_task_priority_set(
5649 legion_map_task_output_t output, legion_task_priority_t priority);
5660 bool legion_mapper_runtime_create_physical_instance_layout_constraint(
5661 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5662 legion_memory_t target_memory, legion_layout_constraint_set_t constraints,
5664 legion_physical_instance_t* result,
bool acquire,
5665 legion_garbage_collection_priority_t priority);
5672 bool legion_mapper_runtime_create_physical_instance_layout_constraint_id(
5673 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5674 legion_memory_t target_memory, legion_layout_constraint_id_t layout_id,
5676 legion_physical_instance_t* result,
bool acquire,
5677 legion_garbage_collection_priority_t priority);
5684 bool legion_mapper_runtime_find_or_create_physical_instance_layout_constraint(
5685 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5686 legion_memory_t target_memory, legion_layout_constraint_set_t constraints,
5688 legion_physical_instance_t* result,
bool* created,
bool acquire,
5689 legion_garbage_collection_priority_t priority,
bool tight_region_bounds);
5697 legion_mapper_runtime_find_or_create_physical_instance_layout_constraint_id(
5698 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5700 legion_layout_constraint_id_t layout_id,
5702 legion_physical_instance_t* result,
bool* created,
bool acquire,
5703 legion_garbage_collection_priority_t priority,
5704 bool tight_region_bounds);
5711 bool legion_mapper_runtime_find_physical_instance_layout_constraint(
5712 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5713 legion_memory_t target_memory, legion_layout_constraint_set_t constraints,
5715 legion_physical_instance_t* result,
bool acquire,
5716 bool tight_region_bounds);
5723 bool legion_mapper_runtime_find_physical_instance_layout_constraint_id(
5724 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5725 legion_memory_t target_memory, legion_layout_constraint_id_t layout_id,
5727 legion_physical_instance_t* result,
bool acquire,
5728 bool tight_region_bounds);
5735 bool legion_mapper_runtime_acquire_instance(
5736 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5737 legion_physical_instance_t instance);
5744 bool legion_mapper_runtime_acquire_instances(
5745 legion_mapper_runtime_t runtime, legion_mapper_context_t ctx,
5746 legion_physical_instance_t* instances,
size_t instances_size);
5750 legion_shard_id_t legion_context_get_shard_id(
5751 legion_runtime_t , legion_context_t ,
5754 size_t legion_context_get_num_shards(
5755 legion_runtime_t , legion_context_t ,
5761 legion_future_t legion_context_consensus_match(
5762 legion_runtime_t , legion_context_t ,
5763 const void* ,
void* ,
size_t ,
5769 legion_physical_region_t legion_get_physical_region_by_id(
5770 legion_physical_region_t* regionptr,
int id,
int num_regions);
Definition c_bindings.h:316
Definition c_bindings.h:257
Definition c_bindings.h:211
Definition c_bindings.h:172
Definition c_bindings.h:219
Definition c_bindings.h:375
Definition c_bindings.h:283
Definition c_bindings.h:274
Definition c_bindings.h:265
Definition c_bindings.h:299
Definition c_bindings.h:290
Definition c_bindings.h:348
Definition c_bindings.h:365
Definition c_bindings.h:341
Definition c_bindings.h:126
Definition c_bindings.h:331
Definition c_bindings.h:388
Definition c_bindings.h:355
Definition c_bindings.h:308