![]() |
Realm
A distributed, event-based tasking library
|
#include <sparsity.h>
Public Member Functions | |
| REALM_PUBLIC_API Event | make_valid (bool precise=true) |
| REALM_PUBLIC_API bool | is_valid (bool precise=true) |
| REALM_PUBLIC_API const std::vector< SparsityMapEntry< N, T > > & | get_entries (void) |
| REALM_PUBLIC_API const std::vector< Rect< N, T > > & | get_approx_rects (void) |
| REALM_PUBLIC_API bool | overlaps (SparsityMapPublicImpl< N, T > *other, const Rect< N, T > &bounds, bool approx) |
| REALM_PUBLIC_API bool | compute_covering (const Rect< N, T > &bounds, size_t max_rects, int max_overhead, std::vector< Rect< N, T > > &covering) |
Protected Member Functions | |
| SparsityMapPublicImpl (void) | |
Protected Attributes | |
| atomic< bool > | entries_valid {false} |
| atomic< bool > | approx_valid {false} |
| std::vector< SparsityMapEntry< N, T > > | entries |
| std::vector< Rect< N, T > > | approx_rects |
SparsityMapPublicImpl is the public subset of the storage and functionality of the actual sparsity map implementation - this should be sufficient for all the needs of user code, but not for Realm internals (e.g. the part that actually computes new sparsity maps) - these objects are not allocated directly.
|
protected |
| REALM_PUBLIC_API bool Realm::SparsityMapPublicImpl< N, T >::compute_covering | ( | const Rect< N, T > & | bounds, |
| size_t | max_rects, | ||
| int | max_overhead, | ||
| std::vector< Rect< N, T > > & | covering | ||
| ) |
Attempt to compute a set of covering rectangles. See IndexSpace<N,T>::compute_covering for a description of this.
| bounds | the bounds of the rectangle |
| 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. |
| REALM_PUBLIC_API const std::vector< Rect< N, T > > & Realm::SparsityMapPublicImpl< N, T >::get_approx_rects | ( | void | ) |
Get the approximate rectangles of this sparsity map. A sparsity map can exist in an approximate form as well - this is a bounded list of rectangles that are guaranteed to cover all actual entries.
| REALM_PUBLIC_API const std::vector< SparsityMapEntry< N, T > > & Realm::SparsityMapPublicImpl< N, T >::get_entries | ( | void | ) |
Get the entries of this sparsity map. A sparsity map entry is similar to an IndexSpace - it's a rectangle and optionally a reference to another SparsityMap OR a pointer to a HierarchicalBitMap, which is a dense array of bits describing the validity of each point in the rectangle.
| REALM_PUBLIC_API bool Realm::SparsityMapPublicImpl< N, T >::is_valid | ( | bool | precise = true | ) |
Check if this sparsity map is valid.
| precise | if true, the sparsity map is computed precisely |
| REALM_PUBLIC_API Event Realm::SparsityMapPublicImpl< N, T >::make_valid | ( | bool | precise = true | ) |
Make this sparsity map valid. Applications should call this method before attempting to use the contents of a sparsity map or otherwise defer the actual use until the returned event has triggered.
The valid sparsity map is called "completed" and is computed in a deferred fashion and fetched by other nodes on demand.
| precise | if true, the sparsity map is computed precisely |
| REALM_PUBLIC_API bool Realm::SparsityMapPublicImpl< N, T >::overlaps | ( | SparsityMapPublicImpl< N, T > * | other, |
| const Rect< N, T > & | bounds, | ||
| bool | approx | ||
| ) |
Check if this sparsity map overlaps another sparsity map. This method is not cheap - try bounds-based checks first (see IndexSpace::overlaps).
| other | the other sparsity map |
| bounds | the bounds of the other sparsity map |
| approx | if true, use the approximate rectangles of this sparsity map |
|
protected |
|
protected |
|
protected |
|
protected |