Skip to content

Commit

Permalink
Merge branch 'task/kab163/resource-aware-pool' of https://github.com/…
Browse files Browse the repository at this point in the history
…LLNL/Umpire into task/kab163/resource-aware-pool
  • Loading branch information
kab163 committed Oct 3, 2024
2 parents edf478a + 380d29e commit 30c90da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions examples/rap_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ constexpr int BLOCK_SIZE = 16;
using clock_value_t = long long;

#if defined(UMPIRE_ENABLE_CUDA)
__device__ clock_value_t my_clock() {return clock64();}
__device__ clock_value_t my_clock()
{
return clock64();
}
#elif defined(UMPIRE_ENABLE_HIP)
__device__ clock_value_t my_clock() {return hipGetClock();}
__device__ clock_value_t my_clock()
{
return hipGetClock();
}
#endif


__device__ void sleep(clock_value_t sleep_cycles)
{
clock_value_t start = my_clock();
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/resource/shared_memory_resource_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ TEST_F(SharedMemoryTest, UnitTests)
{
if (m_rank == 0) {
for (int loop{0}; loop < 100; loop++) {
ASSERT_NO_THROW(
allocator.deallocate(allocator.allocate(std::string("AllocLargest"), shmem_state->largest_allocation_size)););
ASSERT_NO_THROW(allocator.deallocate(
allocator.allocate(std::string("AllocLargest"), shmem_state->largest_allocation_size)););
}
}
}
Expand Down

0 comments on commit 30c90da

Please sign in to comment.