102 static_assert(DIM > 0,
"DIM must be positive");
103 static_assert(DIM <= LEGION_MAX_DIM,
"DIM must be <= LEGION_MAX_DIM");
104 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
109 Memory::Kind kind,
const Domain& bounds,
110 const T* initial_value =
nullptr,
111 size_t alignment = std::alignment_of<T>(),
112 bool fortran_order_dims =
false,
bool escaping =
true);
114 const Rect<DIM, COORD_T>& bounds, Memory::Kind kind,
115 const T* initial_value =
nullptr,
116 size_t alignment = std::alignment_of<T>(),
117 bool fortran_order_dims =
false,
bool escaping =
true);
120 Memory memory,
const Domain& bounds,
const T* initial_value =
nullptr,
121 size_t alignment = std::alignment_of<T>(),
122 bool fortran_order_dims =
false,
bool escaping =
true);
124 const Rect<DIM, COORD_T>& bounds, Memory memory,
125 const T* initial_value =
nullptr,
126 size_t alignment = std::alignment_of<T>(),
127 bool fortran_order_dims =
false,
bool escaping =
true);
130 Memory::Kind kind,
const Domain& bounds,
131 std::array<DimensionKind, DIM> ordering,
132 const T* initial_value =
nullptr,
133 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
135 const Rect<DIM, COORD_T>& bounds, Memory::Kind kind,
136 std::array<DimensionKind, DIM> ordering,
137 const T* initial_value =
nullptr,
138 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
140 Memory memory,
const Domain& bounds,
141 std::array<DimensionKind, DIM> ordering,
142 const T* initial_value =
nullptr,
143 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
145 const Rect<DIM, COORD_T>& bounds, Memory memory,
146 std::array<DimensionKind, DIM> ordering,
147 const T* initial_value =
nullptr,
148 size_t alignment = std::alignment_of<T>(),
bool escaping =
true);
151 inline T read(
const Point<DIM, COORD_T>& p)
const;
153 inline void write(
const Point<DIM, COORD_T>& p, T value)
const;
155 inline T* ptr(
const Point<DIM, COORD_T>& p)
const;
157 inline T* ptr(
const Rect<DIM, COORD_T>& r)
const;
159 inline T* ptr(
const Rect<DIM, COORD_T>& r,
size_t strides[DIM])
const;
161 inline T& operator[](
const Point<DIM, COORD_T>& p)
const;
163 inline bool exists(
void)
const {
return instance.exists(); }
164 inline void destroy(Realm::Event precondition = Realm::Event::NO_EVENT);
166 inline Realm::RegionInstance get_instance(
void)
const;
168 inline Rect<DIM, COORD_T> get_bounds(
void)
const;
170 typedef T value_type;
171 typedef T& reference;
172 typedef const T& const_reference;
176 Realm::RegionInstance instance;
177 Realm::AffineAccessor<T, DIM, COORD_T> accessor;
178 std::array<DimensionKind, DIM> ordering;
179 Rect<DIM, COORD_T> bounds;
192 static_assert(std::is_integral<COORD_T>::value,
"must be integral type");
197 size_t field_size,
int dims, Memory::Kind kind,
const Domain& bounds,
198 const void* initial_value =
nullptr,
size_t alignment = 16,
199 bool fortran_order_dims =
false,
bool escaping =
true);
201 size_t field_size,
int dims, Memory::Kind kind,
IndexSpace bounds,
202 const void* initial_value =
nullptr,
size_t alignment = 16,
203 bool fortran_order_dims =
false,
bool escaping =
true);
206 size_t field_size,
int dims, Memory memory,
const Domain& bounds,
207 const void* initial_value =
nullptr,
size_t alignment = 16,
208 bool fortran_order_dims =
false,
bool escaping =
true);
210 size_t field_size,
int dims, Memory memory,
IndexSpace bounds,
211 const void* initial_value =
nullptr,
size_t alignment = 16,
212 bool fortran_order_dims =
false,
bool escaping =
true);
214 template<
typename T,
int DIM>
217 template<
typename T,
int DIM,
bool BC>
218 inline operator DeferredBuffer<T, DIM, COORD_T, BC>(
void)
const;
220 inline bool exists(
void)
const {
return instance.exists(); }
221 void destroy(Realm::Event precondition = Realm::Event::NO_EVENT);
222 inline Realm::RegionInstance get_instance(
void)
const {
return instance; }
224 static UntypedDeferredBuffer<COORD_T> allocate_buffer(
226 static void report_nondense_rect(
void);
228 template<PrivilegeMode,
typename,
int,
typename,
typename,
bool>
230 template<
typename,
bool,
int,
typename,
typename,
bool>
232 template<
typename,
int,
typename,
bool>
234 Realm::RegionInstance instance;
Definition geometry.h:159