Skip to content

Commit

Permalink
enable users to estimate memory that can be allocated in global addre…
Browse files Browse the repository at this point in the history
…ss space
  • Loading branch information
nelsonje committed Dec 15, 2015
1 parent ec7feba commit dea094e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions system/Grappa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -756,4 +756,8 @@ namespace Grappa {
return Grappa_finish(0);
}

size_t symmetric_heap_size() {
return Grappa::impl::global_memory_size_bytes;
}

} // namespace Grappa
5 changes: 4 additions & 1 deletion system/Grappa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ namespace Grappa {
/// Clean up Grappa. Call in SPMD context after all Grappa code
/// finishes. Running Grappa code after calling finalize() is illegal.
int finalize();


/// Give users an idea of how much global memory they can allocate
/// on this core. This is not guaranteed to be precise.
size_t symmetric_heap_size();

#ifndef GRAPPA_NO_ABBREV
/// Specify non-default behavior: stealable tasks
Expand Down

0 comments on commit dea094e

Please sign in to comment.