Skip to content

Commit

Permalink
Add comment of unified id usage where preferred instead of mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhan12 committed Apr 10, 2024
1 parent b610f8f commit 7336064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/axom/core/tests/core_array_for_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,8 @@ AXOM_TYPED_TEST(core_array_for_all, device_insert)

int kernelAllocID = axom::execution_space<ExecSpace>::allocatorID();
#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE)
// Use unified memory
// Use unified memory for frequent movement between device operations
// and value checking on host
if(axom::execution_space<ExecSpace>::onDevice())
{
kernelAllocID = axom::getUmpireResourceAllocatorID(
Expand Down
9 changes: 6 additions & 3 deletions src/axom/quest/tests/quest_discretize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ void run_degen_segment_tests()

int allocID = axom::execution_space<axom::SEQ_EXEC>::allocatorID();

//Use unified memory on device
// Use unified memory for frequent movement between device operations
// and value checking on host
#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE)
if(axom::execution_space<ExecPolicy>::onDevice())
{
Expand Down Expand Up @@ -291,7 +292,8 @@ void run_single_segment_tests()
{
int allocID = axom::execution_space<axom::SEQ_EXEC>::allocatorID();

//Use unified memory on device
// Use unified memory for frequent movement between device operations
// and value checking on host
#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE)
if(axom::execution_space<ExecPolicy>::onDevice())
{
Expand Down Expand Up @@ -397,7 +399,8 @@ void run_multi_segment_tests()
{
int allocID = axom::execution_space<axom::SEQ_EXEC>::allocatorID();

//Use unified memory on device
//Use unified memory for frequent movement between device operations
// and value checking on host
#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE)
if(axom::execution_space<ExecPolicy>::onDevice())
{
Expand Down

0 comments on commit 7336064

Please sign in to comment.