Skip to content

Commit

Permalink
additional name for deregistering memory, plus check for registered m…
Browse files Browse the repository at this point in the history
…emory
  • Loading branch information
Jacob Nelson committed Dec 15, 2015
1 parent aca3bc9 commit 71b5d4a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions system/RMA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ class RMA {
free(base);
}

// deregistering memory allocated elsewhere is the same as freeing it in the MPI API
void deregister_or_free( void * base ) {
free(base);
}

// check if an address is already registered
bool registered( void * base ) {
return get_enclosing( reinterpret_cast<intptr_t>(base) ) != address_map_.end();
}

// non-collective local fence/flush operation
void fence() {
for( auto & kv : address_map_ ) {
Expand Down

0 comments on commit 71b5d4a

Please sign in to comment.