![]() |
Realm
A distributed, event-based tasking library
|
#include <indexspace.h>
Public Member Functions | |
| REALM_CUDA_HD | IndexSpace (void) |
| REALM_CUDA_HD | IndexSpace (const Rect< N, T > &_bounds) |
| IndexSpace (const Rect< N, T > &_bounds, SparsityMap< N, T > _sparsity) | |
| bool | overlaps (const IndexSpace< N, T > &other) const |
| bool | overlaps_approx (const IndexSpace< N, T > &other) const |
| template<typename FT > | |
| REALM_PUBLIC_API Event | create_subspace_by_field (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > &field_data, FT color, IndexSpace< N, T > &subspace, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<typename FT > | |
| REALM_PUBLIC_API Event | create_subspaces_by_field (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > &field_data, const std::vector< FT > &colors, std::vector< IndexSpace< N, T > > &subspaces, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<typename FT , typename FT2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_field (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > &field_data, const CodeDescriptor &codedesc, const std::vector< FT2 > &colors, std::vector< IndexSpace< N, T > > &subspaces, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| IndexSpace (const std::vector< Point< N, T > > &points, bool disjoint=false) | |
| IndexSpace (const std::vector< Rect< N, T > > &rects, bool disjoint=false) | |
| void | destroy (Event wait_on=Event::NO_EVENT) |
| REALM_CUDA_HD bool | empty (void) const |
| REALM_CUDA_HD bool | dense (void) const |
| Event | make_valid (bool precise=true) const |
| bool | is_valid (bool precise=true) const |
| IndexSpace< N, T > | tighten (bool precise=true) const |
| bool | contains (const Point< N, T > &p) const |
| bool | contains_all (const Rect< N, T > &r) const |
| bool | contains_any (const Rect< N, T > &r) const |
| size_t | volume (void) const |
| bool | contains_approx (const Point< N, T > &p) const |
| bool | contains_all_approx (const Rect< N, T > &r) const |
| bool | contains_any_approx (const Rect< N, T > &r) const |
| size_t | volume_approx (void) const |
| REALM_PUBLIC_API bool | compute_covering (size_t max_rects, int max_overhead, std::vector< Rect< N, T > > &covering) const |
| template<typename LAMBDA > | |
| REALM_PUBLIC_API void | foreach_subrect (LAMBDA lambda) |
| template<typename LAMBDA > | |
| REALM_PUBLIC_API void | foreach_subrect (LAMBDA lambda, const Rect< N, T > &restriction) |
| REALM_PUBLIC_API Event | fill (const std::vector< CopySrcDstField > &dsts, const ProfilingRequestSet &requests, const void *fill_value, size_t fill_value_size, Event wait_on=Event::NO_EVENT, int priority=0) const |
| REALM_PUBLIC_API Event | copy (const std::vector< CopySrcDstField > &srcs, const std::vector< CopySrcDstField > &dsts, const ProfilingRequestSet &requests, Event wait_on=Event::NO_EVENT, int priority=0) const |
| REALM_PUBLIC_API Event | copy (std::vector< CopySrcDstField > &&srcs, std::vector< CopySrcDstField > &&dsts, const ProfilingRequestSet &requests, Event wait_on=Event::NO_EVENT, int priority=0) const |
| REALM_PUBLIC_API Event | copy (const std::vector< CopySrcDstField > &srcs, const std::vector< CopySrcDstField > &dsts, const std::vector< const typename CopyIndirection< N, T >::Base * > &indirects, const ProfilingRequestSet &requests, Event wait_on=Event::NO_EVENT, int priority=0) const |
| REALM_PUBLIC_API Event | copy (std::vector< CopySrcDstField > &&srcs, std::vector< CopySrcDstField > &&dsts, const std::vector< const typename CopyIndirection< N, T >::Base * > &indirects, const ProfilingRequestSet &requests, Event wait_on=Event::NO_EVENT, int priority=0) const |
| REALM_PUBLIC_API Event | create_equal_subspace (size_t count, size_t granularity, unsigned index, IndexSpace< N, T > &subspace, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| REALM_PUBLIC_API Event | create_equal_subspaces (size_t count, size_t granularity, std::vector< IndexSpace< N, T > > &subspaces, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| REALM_PUBLIC_API Event | create_weighted_subspaces (size_t count, size_t granularity, const std::vector< int > &weights, std::vector< IndexSpace< N, T > > &subspaces, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| REALM_PUBLIC_API Event | create_weighted_subspaces (size_t count, size_t granularity, const std::vector< size_t > &weights, std::vector< IndexSpace< N, T > > &subspaces, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<typename FT , typename FT2 > | |
| REALM_PUBLIC_API Event | create_subspace_by_field (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > &field_data, const CodeDescriptor &codedesc, FT2 color, IndexSpace< N, T > &subspace, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 , typename TRANSFORM > | |
| REALM_PUBLIC_API Event | create_subspace_by_image (const TRANSFORM &transform, const IndexSpace< N2, T2 > &source, const IndexSpace< N, T > &image, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 , typename TRANSFORM > | |
| REALM_PUBLIC_API Event | create_subspaces_by_image (const TRANSFORM &transform, const std::vector< IndexSpace< N2, T2 > > &sources, std::vector< IndexSpace< N, T > > &images, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_image (const DomainTransform< N, T, N2, T2 > &domain_transform, const std::vector< IndexSpace< N2, T2 > > &sources, std::vector< IndexSpace< N, T > > &images, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspace_by_image (const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Point< N, T > > > &field_data, const IndexSpace< N2, T2 > &source, IndexSpace< N, T > &image, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_image (const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Point< N, T > > > &field_data, const std::vector< IndexSpace< N2, T2 > > &sources, std::vector< IndexSpace< N, T > > &images, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspace_by_image (const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Rect< N, T > > > &field_data, const IndexSpace< N2, T2 > &source, IndexSpace< N, T > &image, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_image (const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Rect< N, T > > > &field_data, const std::vector< IndexSpace< N2, T2 > > &sources, std::vector< IndexSpace< N, T > > &images, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_image_with_difference (const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Point< N, T > > > &field_data, const std::vector< IndexSpace< N2, T2 > > &sources, const std::vector< IndexSpace< N, T > > &diff_rhs, std::vector< IndexSpace< N, T > > &images, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_image_with_difference (const DomainTransform< N, T, N2, T2 > &domain_transform, const std::vector< IndexSpace< N2, T2 > > &sources, const std::vector< IndexSpace< N, T > > &diff_rhs, std::vector< IndexSpace< N, T > > &images, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 , typename TRANSFORM > | |
| REALM_PUBLIC_API Event | create_subspace_by_preimage (const TRANSFORM &transform, const IndexSpace< N2, T2 > &target, IndexSpace< N, T > &preimage, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 , typename TRANSFORM > | |
| REALM_PUBLIC_API Event | create_subspaces_by_preimage (const TRANSFORM &transform, const std::vector< IndexSpace< N2, T2 > > &targets, std::vector< IndexSpace< N, T > > &preimages, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_preimage (const DomainTransform< N2, T2, N, T > &domain_transform, const std::vector< IndexSpace< N2, T2 > > &targets, std::vector< IndexSpace< N, T > > &preimages, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspace_by_preimage (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Point< N2, T2 > > > &field_data, const IndexSpace< N2, T2 > &target, IndexSpace< N, T > &preimage, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_preimage (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Point< N2, T2 > > > &field_data, const std::vector< IndexSpace< N2, T2 > > &targets, std::vector< IndexSpace< N, T > > &preimages, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspace_by_preimage (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Rect< N2, T2 > > > &field_data, const IndexSpace< N2, T2 > &target, IndexSpace< N, T > &preimage, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_subspaces_by_preimage (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Rect< N2, T2 > > > &field_data, const std::vector< IndexSpace< N2, T2 > > &targets, std::vector< IndexSpace< N, T > > &preimages, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
| template<int N2, typename T2 > | |
| REALM_PUBLIC_API Event | create_association (const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Point< N2, T2 > > > &field_data, const IndexSpace< N2, T2 > &range, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) const |
Static Public Member Functions | |
| static REALM_PUBLIC_API Event | compute_union (const std::vector< IndexSpace< N, T > > &subspaces, IndexSpace< N, T > &result, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_intersection (const std::vector< IndexSpace< N, T > > &subspaces, IndexSpace< N, T > &result, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_CUDA_HD IndexSpace< N, T > | make_empty (void) |
| static REALM_PUBLIC_API Event | compute_union (const IndexSpace< N, T > &lhs, const IndexSpace< N, T > &rhs, IndexSpace< N, T > &result, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_unions (const std::vector< IndexSpace< N, T > > &lhss, const std::vector< IndexSpace< N, T > > &rhss, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_unions (const IndexSpace< N, T > &lhs, const std::vector< IndexSpace< N, T > > &rhss, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_unions (const std::vector< IndexSpace< N, T > > &lhss, const IndexSpace< N, T > &rhs, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_intersection (const IndexSpace< N, T > &lhs, const IndexSpace< N, T > &rhs, IndexSpace< N, T > &result, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_intersections (const std::vector< IndexSpace< N, T > > &lhss, const std::vector< IndexSpace< N, T > > &rhss, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_intersections (const IndexSpace< N, T > &lhs, const std::vector< IndexSpace< N, T > > &rhss, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_intersections (const std::vector< IndexSpace< N, T > > &lhss, const IndexSpace< N, T > &rhs, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_difference (const IndexSpace< N, T > &lhs, const IndexSpace< N, T > &rhs, IndexSpace< N, T > &result, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_differences (const std::vector< IndexSpace< N, T > > &lhss, const std::vector< IndexSpace< N, T > > &rhss, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_differences (const IndexSpace< N, T > &lhs, const std::vector< IndexSpace< N, T > > &rhss, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
| static REALM_PUBLIC_API Event | compute_differences (const std::vector< IndexSpace< N, T > > &lhss, const IndexSpace< N, T > &rhs, std::vector< IndexSpace< N, T > > &results, const ProfilingRequestSet &reqs, Event wait_on=Event::NO_EVENT) |
Public Attributes | |
| Rect< N, T > | bounds |
| SparsityMap< N, T > | sparsity |
An IndexSpace is a POD type that contains a bounding rectangle and an optional SparsityMap - the contents of the IndexSpace are the intersection of the bounding rectangle's volume and the optional SparsityMap's contents
| REALM_CUDA_HD Realm::IndexSpace< N, T >::IndexSpace | ( | void | ) |
| REALM_CUDA_HD Realm::IndexSpace< N, T >::IndexSpace | ( | const Rect< N, T > & | _bounds | ) |
| Realm::IndexSpace< N, T >::IndexSpace | ( | const Rect< N, T > & | _bounds, |
| SparsityMap< N, T > | _sparsity | ||
| ) |
|
explicit |
Construct an index space from a list of points or rects this construction can be significantly faster if the caller promises that all of the 'points' or 'rects' are disjoint.
| points | list of points to include in the index space. |
| disjoint | true if the points are guaranteed to be disjoint. |
|
explicit |
| REALM_PUBLIC_API bool Realm::IndexSpace< N, T >::compute_covering | ( | size_t | max_rects, |
| int | max_overhead, | ||
| std::vector< Rect< N, T > > & | covering | ||
| ) | const |
Attempt to compute a set of covering rectangles for the index space with the following properties:
a) Every point in the index space is included in (exactly) one rectangle. b) None of the resulting rectangles overlap each other. c) No more than 'max_rects' rectangles are used (0 = no limit). d) The relative storage overhead (%) is less than 'max_overhead', i.e. 100 * (volume(covering) / volume(space) - 1) <= max_overhead.
If successful, this function returns true and fills in the 'covering' vector. If unsuccessful, it returns false and leaves 'covering' unchanged.
For N=1 (i.e., 1-D index spaces), this function is optimal, returning a zero-overhead covering using a minimal number of rectangles if that satisfies the 'max_rects' bound, or a covering (using max_rects rectangles) with minimal overhead if that overhead is acceptable, or fails if no covering exists.
For N>1, heuristics are used, and the guarantees are much weaker:
a) A request with 'max_rects'==1 will precisely compute the overhead and succeed/fail appropriately.
b) A request with 'max_rects'==0 (no limit) will always succeed with zero overhead, although the number of rectangles used may not be minimal.
c) The computational complexity of the attempt will be bounded at: O(nm log m + nmk^2), where:
This allows for sorting the inputs and/or outputs, as well as dynamic programming approaches, but precludes more "heroic" optimizations. A use case that requires better results and/or admits specific optimizations will need to compute its own coverings.
| max_rects | Maximum number of rectangles to use (0 = no limit). |
| max_overhead | Maximum relative storage overhead (0 = no limit). |
| covering | Vector to fill in with covering rectangles. |
|
static |
Compute the difference of two index spaces.
| lhs | the left hand side of the difference |
| rhs | the right hand side of the difference |
| result | the resulting index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting |
|
static |
|
static |
|
static |
|
static |
Compute the intersection of two index spaces.
| lhs | the left hand side of the intersection |
| rhs | the right hand side of the intersection |
| result | the resulting index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting |
|
static |
|
static |
|
static |
|
static |
|
static |
Compute the union of two index spaces.
| lhs | the left hand side of the union |
| rhs | the right hand side of the union |
| result | the resulting index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
|
static |
|
static |
|
static |
|
static |
| bool Realm::IndexSpace< N, T >::contains | ( | const Point< N, T > & | p | ) | const |
Query for individual points or rectangles.
| p | point to query |
| r | rectangle to query |
| bool Realm::IndexSpace< N, T >::contains_all | ( | const Rect< N, T > & | r | ) | const |
| bool Realm::IndexSpace< N, T >::contains_all_approx | ( | const Rect< N, T > & | r | ) | const |
| bool Realm::IndexSpace< N, T >::contains_any | ( | const Rect< N, T > & | r | ) | const |
| bool Realm::IndexSpace< N, T >::contains_any_approx | ( | const Rect< N, T > & | r | ) | const |
| bool Realm::IndexSpace< N, T >::contains_approx | ( | const Point< N, T > & | p | ) | const |
Query whether a point is approximately contained in the index space. This function returns true if the point p is approximately contained in the index space. The approximation is guaranteed to be a superset, so if contains_approx returns false, then contains.
| p | point to query |
| r | rectangle to query |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::copy | ( | const std::vector< CopySrcDstField > & | srcs, |
| const std::vector< CopySrcDstField > & | dsts, | ||
| const ProfilingRequestSet & | requests, | ||
| Event | wait_on = Event::NO_EVENT, |
||
| int | priority = 0 |
||
| ) | const |
Copy data from source fields to destination fields in the index space.
| srcs | Vector of CopySrcDstField's describing the source fields. |
| dsts | Vector of CopySrcDstField's describing the destination fields. |
| requests | Set of profiling requests. |
| wait_on | Event to wait on before performing the copy operation. |
| priority | Task priority. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::copy | ( | const std::vector< CopySrcDstField > & | srcs, |
| const std::vector< CopySrcDstField > & | dsts, | ||
| const std::vector< const typename CopyIndirection< N, T >::Base * > & | indirects, | ||
| const ProfilingRequestSet & | requests, | ||
| Event | wait_on = Event::NO_EVENT, |
||
| int | priority = 0 |
||
| ) | const |
Copy data from source fields to destination fields in the index space with indirection.
| srcs | Vector of CopySrcDstField's describing the source fields. |
| dsts | Vector of CopySrcDstField's describing the destination fields. |
| indirects | Vector of pointers to the base class of the indirections. |
| requests | Set of profiling requests. |
| wait_on | Event to wait on before performing the copy operation. |
| priority | Task priority. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::copy | ( | std::vector< CopySrcDstField > && | srcs, |
| std::vector< CopySrcDstField > && | dsts, | ||
| const ProfilingRequestSet & | requests, | ||
| Event | wait_on = Event::NO_EVENT, |
||
| int | priority = 0 |
||
| ) | const |
Copy data from source fields to destination fields in the index space.
| srcs | Vector of CopySrcDstField's describing the source fields. |
| dsts | Vector of CopySrcDstField's describing the destination fields. |
| requests | Set of profiling requests. |
| wait_on | Event to wait on before performing the copy operation. |
| priority | Task priority. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::copy | ( | std::vector< CopySrcDstField > && | srcs, |
| std::vector< CopySrcDstField > && | dsts, | ||
| const std::vector< const typename CopyIndirection< N, T >::Base * > & | indirects, | ||
| const ProfilingRequestSet & | requests, | ||
| Event | wait_on = Event::NO_EVENT, |
||
| int | priority = 0 |
||
| ) | const |
Copy data from source fields to destination fields in the index space with indirection.
| srcs | Vector of CopySrcDstField's describing the source fields. It will be moved. |
| dsts | Vector of CopySrcDstField's describing the destination fields. It will be moved. |
| indirects | Vector of pointers to the base class of the indirections. |
| requests | Set of profiling requests. |
| wait_on | Event to wait on before performing the copy operation. |
| priority | Task priority. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_association | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Point< N2, T2 > > > & | field_data, |
| const IndexSpace< N2, T2 > & | range, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Create an association, fill in instances described by 'field_data' with a mapping from this index space to the 'range' index space.
| field_data | the field data to use for the computation |
| range | the range index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_equal_subspace | ( | size_t | count, |
| size_t | granularity, | ||
| unsigned | index, | ||
| IndexSpace< N, T > & | subspace, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Create equal index spaces from this index space.
| count | Number of subspaces to create. |
| granularity | Granularity of the subspaces. |
| index | Index of the subspace to create. |
| subspace | Index space to fill in with the result. |
| reqs | Set of profiling requests. |
| wait_on | Event to wait on before performing the partitioning operation. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_equal_subspaces | ( | size_t | count, |
| size_t | granularity, | ||
| std::vector< IndexSpace< N, T > > & | subspaces, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_field | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > & | field_data, |
| const CodeDescriptor & | codedesc, | ||
| FT2 | color, | ||
| IndexSpace< N, T > & | subspace, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Allows the "function" described by the field to be composed with a second (computable) function before matching the colors - the second function is provided via a CodeDescriptor object and should have the type FT->FT2.
| field_data | the field data to use for the computation |
| codedesc | the code descriptor for the second function |
| color | the color to match |
| subspace | the resulting subspace |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_field | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > & | field_data, |
| FT | color, | ||
| IndexSpace< N, T > & | subspace, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_image | ( | const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Point< N, T > > > & | field_data, |
| const IndexSpace< N2, T2 > & | source, | ||
| IndexSpace< N, T > & | image, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Computes subspaces of this index space by determining what subsets are reachable from subsets of some other index space - the field data points from the other index space to ours and is used to compute the image of each source - i.e. upon return (and waiting for the finish event), the following invariant holds: images[i] = { y | exists x, x in sources[i] ^ field_data(x) = y }
| field_data | the field data to use for the computation |
| source | the source index space |
| image | the resulting image index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_image | ( | const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Rect< N, T > > > & | field_data, |
| const IndexSpace< N2, T2 > & | source, | ||
| IndexSpace< N, T > & | image, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_image | ( | const TRANSFORM & | transform, |
| const IndexSpace< N2, T2 > & | source, | ||
| const IndexSpace< N, T > & | image, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Computes subspaces of this index space by determining what subsets are reachable from subsets of some other index space via a transformation. The transformed data points from source index spaces to ours are used to compute the images. - i.e. upon return (and waiting for the finish event), the following invariant holds: images[i] = { y | exists x, x in transform(sources[i]) = y }
| transform | the transformation to apply |
| source | the source index space |
| image | the resulting image index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_preimage | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Point< N2, T2 > > > & | field_data, |
| const IndexSpace< N2, T2 > & | target, | ||
| IndexSpace< N, T > & | preimage, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Computes subspaces of this index space by determining what subsets can reach subsets of some other index space - the field data points from this index space to the other and is used to compute the preimage of each target - i.e. upon return (and waiting for the finish event), the following invariant holds: preimages[i] = { x | field_data(x) in targets[i] }
| field_data | the field data to use for the computation |
| target | the target index space |
| preimage | the resulting preimage index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_preimage | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Rect< N2, T2 > > > & | field_data, |
| const IndexSpace< N2, T2 > & | target, | ||
| IndexSpace< N, T > & | preimage, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspace_by_preimage | ( | const TRANSFORM & | transform, |
| const IndexSpace< N2, T2 > & | target, | ||
| IndexSpace< N, T > & | preimage, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Computes subspaces of this index space by determining what subsets can reach subsets of some other index space via a transformation. The transormed data points from this index space to the other and is used to compute the preimage of each target - i.e. upon return (and waiting for the finish event), the following invariant holds: preimages[i] = { x | transform(x) in targets[i] }
| transform | the transformation to use for the computation |
| target | the target index space |
| preimage | the resulting preimage index space |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_field | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > & | field_data, |
| const CodeDescriptor & | codedesc, | ||
| const std::vector< FT2 > & | colors, | ||
| std::vector< IndexSpace< N, T > > & | subspaces, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_field | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, FT > > & | field_data, |
| const std::vector< FT > & | colors, | ||
| std::vector< IndexSpace< N, T > > & | subspaces, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_image | ( | const DomainTransform< N, T, N2, T2 > & | domain_transform, |
| const std::vector< IndexSpace< N2, T2 > > & | sources, | ||
| std::vector< IndexSpace< N, T > > & | images, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_image | ( | const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Point< N, T > > > & | field_data, |
| const std::vector< IndexSpace< N2, T2 > > & | sources, | ||
| std::vector< IndexSpace< N, T > > & | images, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_image | ( | const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Rect< N, T > > > & | field_data, |
| const std::vector< IndexSpace< N2, T2 > > & | sources, | ||
| std::vector< IndexSpace< N, T > > & | images, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_image | ( | const TRANSFORM & | transform, |
| const std::vector< IndexSpace< N2, T2 > > & | sources, | ||
| std::vector< IndexSpace< N, T > > & | images, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_image_with_difference | ( | const DomainTransform< N, T, N2, T2 > & | domain_transform, |
| const std::vector< IndexSpace< N2, T2 > > & | sources, | ||
| const std::vector< IndexSpace< N, T > > & | diff_rhs, | ||
| std::vector< IndexSpace< N, T > > & | images, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_image_with_difference | ( | const std::vector< FieldDataDescriptor< IndexSpace< N2, T2 >, Point< N, T > > > & | field_data, |
| const std::vector< IndexSpace< N2, T2 > > & | sources, | ||
| const std::vector< IndexSpace< N, T > > & | diff_rhs, | ||
| std::vector< IndexSpace< N, T > > & | images, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Computes subspaces of this index space by determining what subsets are reachable from subsets of some other index space taking into account that the computed image may be restricted by an intersection or difference operation. It can often be much faster to filter the projected points before stuffing them into an index space.
| field_data | the field data to use for the computation |
| sources | the source index spaces |
| diff_rhs | the index spaces to use for the difference operation |
| images | the resulting image index spaces |
| reqs | profiling requests |
| wait_on | event to wait on before starting. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_preimage | ( | const DomainTransform< N2, T2, N, T > & | domain_transform, |
| const std::vector< IndexSpace< N2, T2 > > & | targets, | ||
| std::vector< IndexSpace< N, T > > & | preimages, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_preimage | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Point< N2, T2 > > > & | field_data, |
| const std::vector< IndexSpace< N2, T2 > > & | targets, | ||
| std::vector< IndexSpace< N, T > > & | preimages, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_preimage | ( | const std::vector< FieldDataDescriptor< IndexSpace< N, T >, Rect< N2, T2 > > > & | field_data, |
| const std::vector< IndexSpace< N2, T2 > > & | targets, | ||
| std::vector< IndexSpace< N, T > > & | preimages, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_subspaces_by_preimage | ( | const TRANSFORM & | transform, |
| const std::vector< IndexSpace< N2, T2 > > & | targets, | ||
| std::vector< IndexSpace< N, T > > & | preimages, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_weighted_subspaces | ( | size_t | count, |
| size_t | granularity, | ||
| const std::vector< int > & | weights, | ||
| std::vector< IndexSpace< N, T > > & | subspaces, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
Create index spaces from this index space based on the specified weights.
| count | Number of subspaces to create. |
| granularity | Granularity of the subspaces. |
| weights | Vector of weights for each subspace. |
| subspace | Index space to fill in with the result. |
| reqs | Set of profiling requests. |
| wait_on | Event to wait on before performing the partitioning operation. |
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::create_weighted_subspaces | ( | size_t | count, |
| size_t | granularity, | ||
| const std::vector< size_t > & | weights, | ||
| std::vector< IndexSpace< N, T > > & | subspaces, | ||
| const ProfilingRequestSet & | reqs, | ||
| Event | wait_on = Event::NO_EVENT |
||
| ) | const |
| REALM_CUDA_HD bool Realm::IndexSpace< N, T >::dense | ( | void | ) | const |
Return true if there is no sparsity map (i.e. the bounds fully define the domain).
| void Realm::IndexSpace< N, T >::destroy | ( | Event | wait_on = Event::NO_EVENT | ) |
Reclaim any physical resources associated with this index space. It will clear the sparsity map of this index space if it exists.
| wait_on | event to wait on before destroying the index space. |
| REALM_CUDA_HD bool Realm::IndexSpace< N, T >::empty | ( | void | ) | const |
Retrun true if there are no points in the space (may be imprecise due to lazy loading of sparsity data).
| REALM_PUBLIC_API Event Realm::IndexSpace< N, T >::fill | ( | const std::vector< CopySrcDstField > & | dsts, |
| const ProfilingRequestSet & | requests, | ||
| const void * | fill_value, | ||
| size_t | fill_value_size, | ||
| Event | wait_on = Event::NO_EVENT, |
||
| int | priority = 0 |
||
| ) | const |
Fill values into the specified destination fields in the index space.
| dsts | Vector of CopySrcDstField's describing the destination fields. |
| requests | Set of profiling requests. |
| fill_value | Pointer to the fill value. |
| fill_value_size | Size of the fill value in bytes. |
| wait_on | Event to wait on before performing the fill operation. |
| priority | Task priority. |
Note: This version of fill() does not support indirection. Use explicit arguments for fill values and reduction operation info.
| REALM_PUBLIC_API void Realm::IndexSpace< N, T >::foreach_subrect | ( | LAMBDA | lambda | ) |
Iterates internally over points and calls the specified callable or lambda for each point in each subrectangle, providing an alternative to using IndexSpaceIterator's.
| lambda | A callable or lambda function that takes a Rect<N,T> and a Point<N,T> as input parameters. |
| restriction | An optional restriction on the subrectangles to iterate over. Only points and subrectangles within this restriction will be visited. |
| REALM_PUBLIC_API void Realm::IndexSpace< N, T >::foreach_subrect | ( | LAMBDA | lambda, |
| const Rect< N, T > & | restriction | ||
| ) |
| bool Realm::IndexSpace< N, T >::is_valid | ( | bool | precise = true | ) | const |
|
static |
Construct a guaranteed-empty index space.
| Event Realm::IndexSpace< N, T >::make_valid | ( | bool | precise = true | ) | const |
Start any operation needed to get detailed sparsity information. This function starts an operation to compute detailed sparsity information for the index space. The operation may take some time to complete, especially for complicated index spaces. By default, the sparsity map is computed precisely, but if performance is a concern, an approximate map can be computed by setting the precise parameter to false.
| precise | false is the sparsity map may be preserved even for dense spaces. |
| bool Realm::IndexSpace< N, T >::overlaps | ( | const IndexSpace< N, T > & | other | ) | const |
| bool Realm::IndexSpace< N, T >::overlaps_approx | ( | const IndexSpace< N, T > & | other | ) | const |
| IndexSpace< N, T > Realm::IndexSpace< N, T >::tighten | ( | bool | precise = true | ) | const |
Return the tightest description possible of the index space.
| precise | false is the sparsity map may be preserved even for dense spaces. |
| size_t Realm::IndexSpace< N, T >::volume | ( | void | ) | const |
Return actual number of points in index space (may be less than volume of bounding box).
| size_t Realm::IndexSpace< N, T >::volume_approx | ( | void | ) | const |
Approximate number of points in index space (may be less than volume of bounding box, but larger than actual volume).
| Rect<N, T> Realm::IndexSpace< N, T >::bounds |
| SparsityMap<N, T> Realm::IndexSpace< N, T >::sparsity |