97 static_assert(DIM > 0,
"DIM must be positive");
98 static_assert(DIM <= LEGION_MAX_DIM,
"DIM must be <= LEGION_MAX_DIM");
99 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
104 Memory::Kind kind,
const Domain& bounds,
105 const T* initial_value =
nullptr,
106 size_t alignment = std::alignment_of<T>(),
107 bool fortran_order_dims =
false,
bool escaping =
true);
109 const Rect<DIM, COORD_T>& bounds, Memory::Kind kind,
110 const T* initial_value =
nullptr,
111 size_t alignment = std::alignment_of<T>(),
112 bool fortran_order_dims =
false,
bool escaping =
true);
115 Memory memory,
const Domain& bounds,
const T* initial_value =
nullptr,
116 size_t alignment = std::alignment_of<T>(),
117 bool fortran_order_dims =
false,
bool escaping =
true);
119 const Rect<DIM, COORD_T>& bounds, Memory memory,
120 const T* initial_value =
nullptr,
121 size_t alignment = std::alignment_of<T>(),
122 bool fortran_order_dims =
false,
bool escaping =
true);
125 Memory::Kind kind,
const Domain& bounds,
126 std::array<DimensionKind, DIM> ordering,
127 const T* initial_value =
nullptr,
128 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
130 const Rect<DIM, COORD_T>& bounds, Memory::Kind kind,
131 std::array<DimensionKind, DIM> ordering,
132 const T* initial_value =
nullptr,
133 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
135 Memory memory,
const Domain& bounds,
136 std::array<DimensionKind, DIM> ordering,
137 const T* initial_value =
nullptr,
138 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
140 const Rect<DIM, COORD_T>& bounds, Memory memory,
141 std::array<DimensionKind, DIM> ordering,
142 const T* initial_value =
nullptr,
143 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
146 inline T read(
const Point<DIM, COORD_T>& p)
const;
148 inline void write(
const Point<DIM, COORD_T>& p, T value)
const;
150 inline T* ptr(
const Point<DIM, COORD_T>& p)
const;
152 inline T* ptr(
const Rect<DIM, COORD_T>& r)
const;
154 inline T* ptr(
const Rect<DIM, COORD_T>& r,
size_t strides[DIM])
const;
156 inline T& operator[](
const Point<DIM, COORD_T>& p)
const;
158 inline bool exists(
void)
const {
return instance.exists(); }
159 inline void destroy(Realm::Event precondition = Realm::Event::NO_EVENT);
161 inline Realm::RegionInstance get_instance(
void)
const;
163 inline Rect<DIM, COORD_T> get_bounds(
void)
const;
165 typedef T value_type;
166 typedef T& reference;
167 typedef const T& const_reference;
171 Realm::RegionInstance instance;
172 Realm::AffineAccessor<T, DIM, COORD_T> accessor;
173 std::array<DimensionKind, DIM> ordering;
174 Rect<DIM, COORD_T> bounds;
187 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
192 size_t field_size,
int dims, Memory::Kind kind,
const Domain& bounds,
193 const void* initial_value =
nullptr,
size_t alignment = 16,
194 bool fortran_order_dims =
false,
bool escaping =
true);
196 size_t field_size,
int dims, Memory::Kind kind,
IndexSpace bounds,
197 const void* initial_value =
nullptr,
size_t alignment = 16,
198 bool fortran_order_dims =
false,
bool escaping =
true);
201 size_t field_size,
int dims, Memory memory,
const Domain& bounds,
202 const void* initial_value =
nullptr,
size_t alignment = 16,
203 bool fortran_order_dims =
false,
bool escaping =
true);
205 size_t field_size,
int dims, Memory memory,
IndexSpace bounds,
206 const void* initial_value =
nullptr,
size_t alignment = 16,
207 bool fortran_order_dims =
false,
bool escaping =
true);
209 template<
typename T,
int DIM>
212 template<
typename T,
int DIM,
bool BC>
213 inline operator DeferredBuffer<T, DIM, COORD_T, BC>(
void)
const;
215 inline bool exists(
void)
const {
return instance.exists(); }
216 void destroy(Realm::Event precondition = Realm::Event::NO_EVENT);
217 inline Realm::RegionInstance get_instance(
void)
const {
return instance; }
219 static UntypedDeferredBuffer<COORD_T> allocate_buffer(
221 static void report_nondense_rect(
void);
223 template<PrivilegeMode,
typename,
int,
typename,
typename,
bool>
225 template<
typename,
bool,
int,
typename,
typename,
bool>
227 template<
typename,
int,
typename,
bool>
229 Realm::RegionInstance instance;
Definition geometry.h:154