Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
Realm::SparsityMap< N, T > Class Template Reference

#include <sparsity.h>

Public Types

typedef ::realm_id_t id_t

Public Member Functions

bool operator< (const SparsityMap< N, T > &rhs) const
bool operator== (const SparsityMap< N, T > &rhs) const
bool operator!= (const SparsityMap< N, T > &rhs) const
REALM_CUDA_HD bool exists (void) const
void destroy (Event wait_on=Event::NO_EVENT, unsigned count=1)
Event add_reference (unsigned count=1)
void remove_reference (unsigned count=1, Event wait_on=Event::NO_EVENT)
REALM_INTERNAL_API_EXTERNAL_LINKAGE SparsityMapPublicImpl< N, T > * impl (void) const

Static Public Member Functions

static REALM_INTERNAL_API_EXTERNAL_LINKAGE SparsityMap< N, T > construct (const std::vector< Point< N, T > > &points, bool always_create, bool disjoint)
static REALM_INTERNAL_API_EXTERNAL_LINKAGE SparsityMap< N, T > construct (const std::vector< Rect< N, T > > &rects, bool always_create, bool disjoint)

Public Attributes

id_t id

Member Typedef Documentation

◆ id_t

template<int N, typename T>
typedef ::realm_id_t Realm::SparsityMap< N, T >::id_t

Member Function Documentation

◆ add_reference()

template<int N, typename T>
Event Realm::SparsityMap< N, T >::add_reference ( unsigned count = 1)

Add an ownership reference to the sparsity map. Calling this method requires the client perform an additional call to 'destroy' which will remove the reference. The event returned by this method must be waited on before calling 'destroy' or must be passed as a precondition to 'destroy'.

Parameters
counthow many references to add
Returns
the event for when references have been applied

◆ construct() [1/2]

template<int N, typename T>
REALM_INTERNAL_API_EXTERNAL_LINKAGE SparsityMap< N, T > Realm::SparsityMap< N, T >::construct ( const std::vector< Point< N, T > > & points,
bool always_create,
bool disjoint )
static

Construct a sparsity map from a set of points or rectangles.

Parameters
points/rectsa vector of points/rects.
always_createif true, always create a sparsity map, even if the points completely fill their bounding box if false, return NO_SPACE if the points completely fill their bounding box (i.e. id == 0)
disjointif true, the points are assumed to be disjoint
Returns
a sparsity map

◆ construct() [2/2]

template<int N, typename T>
REALM_INTERNAL_API_EXTERNAL_LINKAGE SparsityMap< N, T > Realm::SparsityMap< N, T >::construct ( const std::vector< Rect< N, T > > & rects,
bool always_create,
bool disjoint )
static

◆ destroy()

template<int N, typename T>
void Realm::SparsityMap< N, T >::destroy ( Event wait_on = Event::NO_EVENT,
unsigned count = 1 )

Destroy the sparsity map. This method is synonymous with removing an ownership reference from the sparsity map. Note that each sparsity map is given one ownership reference when it is created so the client must either call destroy or remove_reference once in order to clean up the sparsity map. The creation event for the sparsity map must have a happens-before relationship with the wait-on even of the destroy call.

Parameters
wait_ona precondition event

◆ exists()

template<int N, typename T>
REALM_CUDA_HD bool Realm::SparsityMap< N, T >::exists ( void ) const

Check if this sparsity map exists.

Returns
true if this sparsity map exists, false otherwise

◆ impl()

template<int N, typename T>
REALM_INTERNAL_API_EXTERNAL_LINKAGE SparsityMapPublicImpl< N, T > * Realm::SparsityMap< N, T >::impl ( void ) const

Lookup the public implementation object for this sparsity map.

Returns
the public implementation object for this sparsity map

◆ operator!=()

template<int N, typename T>
bool Realm::SparsityMap< N, T >::operator!= ( const SparsityMap< N, T > & rhs) const

◆ operator<()

template<int N, typename T>
bool Realm::SparsityMap< N, T >::operator< ( const SparsityMap< N, T > & rhs) const

◆ operator==()

template<int N, typename T>
bool Realm::SparsityMap< N, T >::operator== ( const SparsityMap< N, T > & rhs) const

◆ remove_reference()

template<int N, typename T>
void Realm::SparsityMap< N, T >::remove_reference ( unsigned count = 1,
Event wait_on = Event::NO_EVENT )

Remove an ownership reference from this sparsity map. This method is synonymous with destroying a sparsity map. Note that each sparsity map is given one ownership reference when it is created so the client must either call destroy or remove_reference once in order to clean up the sparsity map. The event returned from add_reference must have a happens-before relationship with the wait-on even of the remove_reference call.

Parameters
countthe number of references to remove
wait_ona precondition event before removing the references

Member Data Documentation

◆ id

template<int N, typename T>
id_t Realm::SparsityMap< N, T >::id

The documentation for this class was generated from the following files:
  • /home/runner/work/realm/realm/realm-src/src/realm/indexspace.h
  • /home/runner/work/realm/realm/realm-src/src/realm/sparsity.h